hope you’re doing well!
I am looking to set the value of Input from the state that i receive from props! I could set all the information from “profile” state in the placeholder but when putting it in the value field it doesn’t show anything
here’s my code and the form i use :
hope you’re doing well!
I am building a larger application when i stumbled uppon this issue. I am trying to create a dynamic checkbox list with react and antd but it is not working properly.
I was wondering if it is possible to change the color of the text in Antd. For instance, I’d like this button to have the color of the text black
#000000 and the icon
DownloadOutlined in purple
I designed editable tabs by using antd library, version 3.23.6. But I don’t know how can replace the default add button with my custom add button.
Here’s my simplified problem:
I’m using ant-desing(v3.26.14) List component in React. Normally if I try to pass plain array to ‘dataSource’ property then everything is fine. But when I try to pass array via callback it’s given error.
There is a Antd table with data, when i click to button “Change”, the entire line with data is passed to the function in the form of an object, now it remains to insert data into the fields, but I can’t, what should I do?
I am using react for a school project. The dynamic data does not binds to Options from Ant Design, react js. The result is an empty option list. In actual the data comes from an external API. For testing purpose I assigned the data the state variable. The data comes in 2D array, so I am mapping through the data twice.
I am using
FormItem as the app UI table filter condition, and using
Col to layout the component. Current I am facing a problem that when user scale the window, the
FormItem could not auto fit the screen resize. So I want to make the
FormItem flexiable, when user scale the broswer window, the
FormItem could auto rearrangement to multiline to fit the screen change automatically. This is the code current I am using:
I’m having an Ant Design
<Form> component with
<Form.Items> which have onChange events. If the onChange event function is true I’m displaying extra content.
So in the example sandbox I created, when changing all the the
<Radio> to Yes it fires the onChange event which is validated and then showing a div with the text “You checked all answered with yes”.
As I’m using
<Form> it is a form controlled environment so I’m using
form to set and reset values. But when calling
form.resetFields() the onChange handlers are not called. So the message won’t go away as the state not refreshes. So I have to find a way to call a function from the parent component which refreshes the form values in the child component.
useImperativeHandle() for every field to update on more complex forms to call functions from the parent seems way too complex for such a simple task. And adding custom events to communicate with parent components seem to be a not very react way when reading this stack overflow thread
Is there something from the Ant Design form I’m missing? Because this must be a common task. What’s a good way to approach this problem?