Antd auto complete for text inputs
Hi does refine support Antd auto complete for text inputs like https://ant.design/components/auto-complete
7 Replies
Hi, I am refine support bot :wave:. I am here to help you with your question. I searched for the answer to your question in the refine documentation and found an answer! 🏆
Answer: Refine supports Antd auto complete for text inputs. SOURCES: ./docs/api-reference/mui/hooks/useAutocomplete/index.md
Answer: Refine supports Antd auto complete for text inputs. SOURCES: ./docs/api-reference/mui/hooks/useAutocomplete/index.md
Note: If this is the answer you need, then we are very lucky. If not, please wait for someone from the refine core team or the community to try to help you.
passive-yellow•2y ago
Yes, refine supports Ant Design's Autocomplete component. You can find an example of how to use it in the refine documentation (https://refine.dev/docs/api-reference/mui/hooks/useAutocomplete). You can also find the source code for the example here (https://github.com/refinedev/refine/tree/master/examples/field-mui-use-autocomplete). To run the example in your local environment, run the following command:
npm create refine-app@latest -- --example field-mui-use-autocomplete
genetic-orangeOP•2y ago
That is for mui, not antdesign right?
passive-yellow•2y ago
Oh, you are right, sorry!
passive-yellow•2y ago
useSelect | refine
useSelect hook allows you to manage Ant Design `` component when records in a resource needs to be used as select options.
genetic-orangeOP•2y ago
This is also only a selectfield. I want to use autocomplete on an textfield so that it only shows suggestions from the database that the user can select but they can also input their own data.
It is basically this component from antdesign https://ant.design/components/auto-complete
passive-yellow•2y ago
You can get data by using useSelect or useList hooks, and then you can use ANTd's autocomplete component directly