react-final-form icon indicating copy to clipboard operation
react-final-form copied to clipboard

Overriding reset behavior does not seems to work for checkbox and radio buttons

Open utkarsh22garg opened this issue 4 years ago • 2 comments

Are you submitting a bug report or a feature request?

I am submitting a bug report.

What is the current behavior?

I have overridden the reset button behavior by overriding onClick of reset button. But when I click reset, all values are removed at first, but when you click on checkbox item/radio item, previous values come up.

What is the expected behavior?

Expected behavior should be that on clicking reset button, only console logs should be made (since I have overridden the click behavior) and even after reset checkbox and radio button should be showing all selected values.

Sandbox Link

https://codesandbox.io/s/react-final-form-list-of-checkboxes-and-radio-buttons-forked-6voxz?file=/src/index.js

What's your environment?

  • react-final-form -v6.0.1

Please let me know in case I am missing something.

utkarsh22garg avatar Jul 20 '21 14:07 utkarsh22garg

Hi @erikras, can you please look at this?

utkarsh22garg avatar Jul 26 '21 10:07 utkarsh22garg

reset doesn't work with react-final-form quick glance over existing issues - the features is completely missing. You can explicitly reset the form using `<Button onClick={() => { form.reset(); someComplexLogicFunc(); } } />

callmeberzerker avatar Aug 14 '21 01:08 callmeberzerker