mercredi 7 juillet 2021

how to save mark of checkbox after opening and closing modal in react?

I have a list that can be filter and when I click on each item of list a popup will be show. on showing popup the filters will be still save but their marks remove. I want to khow how can I save their marks. (I used antd checkbox)

data.map((item, index) => (
                                  <Checkbox
                                            key={utils.key('select_checkbox_', index)}
                                            checked={!!item.checked}
                                            disabled={item.disabled}
                                            onChange={({ target }) => this.onChangeCheckBox(target.value, target.checked)}
                                            value={item.value}
                                        >
                                            {item.text}
                                        </Checkbox>
                                    ))```



Aucun commentaire:

Enregistrer un commentaire