fair-rose
fair-rose15mo ago

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
refine-support-bot
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

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.
ambitious-aqua
ambitious-aqua15mo 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
fair-rose
fair-rose15mo ago
That is for mui, not antdesign right?
ambitious-aqua
ambitious-aqua15mo ago
Oh, you are right, sorry!
ambitious-aqua
ambitious-aqua15mo ago
useSelect | refine
useSelect hook allows you to manage Ant Design `` component when records in a resource needs to be used as select options.
fair-rose
fair-rose15mo 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
ambitious-aqua
ambitious-aqua15mo ago
You can get data by using useSelect or useList hooks, and then you can use ANTd's autocomplete component directly