cornerstone
cornerstone copied to clipboard
Allow radio buttons to get deselected not working
It isn't possible to deselected a radio buttons.
To allow, i try to change :
https://github.com/bigcommerce/cornerstone/blob/53e5b5edde9d1075de9dab95dcb75554a04e8611/assets/js/theme/common/product-details-base.js#L67
to
if ($radio.attr('data-state') === undefined)
but it isn't perfect because sometime radio not checked.
@bichelesi this is standard behaviour for radio buttons - its required and to deselect one you always need to select other.
@yurytut1993 It’s standard HTML behaviour but there is a custom function to do this.
/**
* Allow radio buttons to get deselected
*/
It’s useful when you have disable option.
Without this behaviour, you have to refresh if you want to change option,.