score:4
i found solution, you can use "filteroptions" method to add a new button at the bottom.
check this::
<autocomplete
id="supplieridd"
style={{ width: 300 }}
options={suppliers.map((supplier) => supplier.name)}
renderinput={(params) =>
<>
<textfield {...params} label="булстат" margin="normal" onclick={()=>{console.log("hi")}} variant="outlined" />
</>
}
filteroptions={(options) => {
const result = [...options]
result.push(
((
<button
variant="outlined"
color="primary"
onmousedown={onaddnew}
>
+ add new
</button>
) as unknown) as string, // typecasting required for typescript
)
return result
}}
/>
Source: stackoverflow.com
Related Query
- Append a button at the end of Autocomplete options in Material-UI
- Append a button at the end of options in react-select
- How Can i limit the maximum number of options that can be selected in a Material UI lab Autocomplete component
- How can I create a button to a dialog box inside the PopperComponent of Material UI Labs Autocomplete
- Material UI - Autocomplete that will show options ONLY when I type @ just like the way skype does or any other chat editor
- Compile error using the Component Lab > Autocomplete feature for SVG Icons in Material UI
- Material UI Autocomplete - Disable listbox after the item selection
- How can I change the width of Material UI Autocomplete popover
- Material UI - Facing an issue that drop down options are coming below the modal window footer
- Material UI Autocomplete implementation with options containing array of objects (ID and label)
- How to remove selected value when click button of Autocomplete Material UI?
- How to add floating action button on the right-bottom side of the screen using material ui in react
- React Material UI Autocomplete show options with issue
- How to Disable the ENTER Key in React Material UI Autocomplete form
- Formik, Material UI Autocomplete and Firestore - where query to find the array parameter
- material ui autocomplete doesn't recognize options parameter as array
- Material UI Autocomplete - Search only from the beginning of the word
- How to Pass index in the onChange of autocomplete - React material UI
- Material UI React - Autocomplete - How to reset the internal state
- Display number of matching search options on Textfield input in Material UI Autocomplete
- Disable options based on currently selected option with Material UI Autocomplete component
- Positioning a Material UI button to the rightmost of row
- Is there a way to change the close icons on the autocomplete component of material ui?
- How to add onClick event on the options in Autocomplete Component(Material UI)?
- ReactJS Material UI how to prevent Autocomplete to change the value
- How can I access the custom target attribute within material UI select options in React js
- Style the TextField children of the material ui autocomplete
- How to get the TextField value with onclick button event React Material UI
- Material UI AutoComplete React. Display different options in list and save different option in form state (with multiple values)
- Material ui / typography and button on the same line
More Query from same tag
- How to get direct parent's key in Firebase real-time database?
- Cannot import firebase to React
- Module not found error: package path ./cjs/react.development is not exported from package
- Upload an image and change the background
- Specifying different momentJS locales per React component
- Creating graph with recharts with multiple data arrays
- Simple slider for products items
- react js importing multiple component from a single jsx file
- TypeError: Cannot read properties of undefined (reading 'profilePic'), react
- Why does React.createRef() for material-ui Button element in TypeScript not work correctly?
- How to use object values and retrieve it in antd form
- How to pass props to custom components in react-select
- Redirecting to a React Component - Express
- text and icon in a antd button are not aligned vertically
- Nested state with the same name
- React call bootstrap function?
- How to stop the for loop inside useEffect in react js?
- Filtering documents in mongodb and nodejs
- React / ES6 - Why calling a function inside another only works with es6 arrow functions?
- Binding forms at multiple different mount points with redux-form
- React, Electron, And Router
- How to use .toFixed() (or any alternative) on Nerdamer.solve solutions?
- How can I extract the data portion of a promise object to pass as props to a component?
- Double sided input slider in React, after reach initial range 0 also it move towards, left direction and increase the value, why?
- Implementing multiple language url nextjs and next-i18n-next
- react-testing-library doesn't find element in this case
- inertia.js get response message from Interia.post()
- Is it OK to un-subscribe and re-subscribe all my @Lexical/react command listeners on every render?
- Make text become white upon changing value in react? React-spring?
- TypeScript: remove key from type/subtraction type