Skip to content
Advertisement

Tag: antd

How can I use AntD FormInstance functions correctly?

I’m trying to validate user’s input before they submit the form. How can I pass input field values to my validateInput function and if it returns false trigger and apply the following properties in the field hasFeedback, validateStatus and help Answer <Form.Item> prop rules is an array so you can add many rules to it. If you want to check

How to reset ant design table selected rows?

I am using ant design table component and I have selected rows. I want onClick reset selected rows. I can not find out where it stores selected rows. Any Idea how to clear selected rows? Answer rowSelection also takes selectedRowKeys property that will help you control the selected rows at any point in time. Codesandbox Example | Antd Docs

Can I choose which AntD icon to use with allowClear = true?

If I pass allowClear={true} to an AntD Input component, a small circle with an × appears at the end of the field once a user has typed something, which can be clicked to empty the contents of the field. Is there some way to instruct AntD to use a different icon? The AntD docs for reference: Input with Clear Icon

Async form field validation in ant design

How to validate form fields asynchronously in ant design? function call How to show the error message from api response? As api call takes some time to complete at that time the validation function call get executed completely before api request complete. So how can i show the error message? Answer You’re missing await before validateZipcode and async before handlezipCodeChange:

How to customize Ant.design styles

Who knows how to customize Ant.design styles in proper way? For example, I want to change the default backgroundColor and height of Header section: Is it ok, or there is a better way to customize styles? Because I have not found some component’s attributes or smth. like this. Answer Antd has externized most of their styling variable in LESS variables

Advertisement