score:1
Accepted answer
for removing the select dropdown icon you will have to pass iconcomponent: () => null
in selectprops
, props applied to the select element. it accepts an object of the select elements props
for more information about select
's props https://material-ui.com/api/select/
here is the working example https://codesandbox.io/s/quizzical-frost-g4s52?file=/src/app.js
<textfield disabled={true}
label="itemno"
value={currentitem.itemno}
variant="outlined"
inputlabelprops={{ style: { fontsize: 18, color: 'grey', backgroundcolor: 'white', fontfamily: "monospace" }, shrink: true }}
select
// for passing props in select component
selectprops={{ iconcomponent: () => null }}
>
{this.state.itemno && this.state.itemno.map((item) => (
<menuitem style={{ fontsize: 14, fontfamily: "monospace" }} key={item.key} value={item.id}>
{item.key}
</menuitem>
))}
</textfield>
Source: stackoverflow.com
Related Query
- How to remove arrow from React TextField Select
- Material React Select Multiple: How i can remove from my array when i click in a selected element?
- How to remove curved border and inset box shadow from Material UI TextField React component?
- How to remove duplicate values from an array of objects in react for select components of MUI
- How can I remove an attribute from a React component's state object
- How can I remove the underline of TextField from Material-UI?
- How can I remove unused imports/declarations from the entire project of React Typescript?
- React JS: how to properly remove an item from this.state.data where data is an array of objects
- React Select - How to show / iterate through data from api call in option instead of hardcoding options?
- Manually lose focus from TextField select component, Material UI & React
- How to use react ref to get value from html select element?
- How to remove storybook from the react project
- Remove the arrow and cross that appears for TextField type=“time” material-ui React
- How to remove caret from dropdown nav item in React Bootstrap
- How to access values from React Select and pass them to Formik values on Submit?
- React How to remove the animation of Material-UI Select
- How to update select items based on the selection from the first select items using react
- How do I pass in the variant property of the material-ui TextField from a wrapping React component
- How can I style the arrow of react select component?
- Remove blue outline from Select box React Material UI
- Writing CSS in JS code to remove arrow buttons from TextField
- How to remove all the unsed imports from a React Js project? (VSCode)
- React - Material UI: How to remove scrollbar from table
- How to remove an element from an array that is inside an object in React JS (ES6)
- How to map an array of strings from react state to a select box
- how to pass the current item to the function so that i can remove it from array in react component?
- React - how to populate one select menu based on a value of another select menu using data from a local .json file
- How to remove unchecked checkbox from React state array?
- How to exclude some options from React Select options
- How to remove elements from array using redux, immer, react
More Query from same tag
- React hooks setState not updating immediately
- Use styled-components to center React Bootstrap Modal
- React Docs - origin of "serverRequest"
- Use context from consumer in children
- eslint error on deployment on local server of react web app
- login problem and onSubmit problem in react js
- How to move an image left of text in a table column in Material UI?
- how to reveal/unrveal password inside input in Data Driven Forms (it npm react package)?
- React Native onChangeText like onChange in ReactJS
- this.state.todolist.push() in reactjs returns a number?
- React setInterval function keeps running in the background after rerender
- Change object structure Javascript
- Issue with image download using node
- Why does a list element not initially render but does after a state change in React?
- Cannot upload id by using uuid on firebase with React.js
- How to convert string to JSX to using in React
- how to add code more in react to hide and show pages when I click again
- How do I add a post route to my react application
- React Native and right way to handle TextInput data?
- Not able to aply font weight in react
- Uncaught ReferenceError: regeneratorRuntime when using Sync/Await
- How to render CKEditor4 wiris MathML formula in react JS
- React Testing Library - Simulating uploading file with FileReader
- Example from textbook: Missing opening tag on div element in return statement?
- Correct way of Creating multiple stores with mobx and injecting it into to a Component - ReactJs
- how and when to call a react component methods after state change from redux
- How to take a key up/down in web chat using react
- Accessing a function of a React element imported from external library
- React state property undefined in function component using Context API
- How do i remove the div with id="__next" in Next.js