Skip to content
This repository has been archived by the owner on Jul 12, 2019. It is now read-only.

All child checkboxes in section unchecked on hide #31

Open
esseremmerik opened this issue Jan 7, 2019 · 4 comments
Open

All child checkboxes in section unchecked on hide #31

esseremmerik opened this issue Jan 7, 2019 · 4 comments

Comments

@esseremmerik
Copy link

Hi there,

This iteration on hide is causing child checkboxes to be unchecked when the section is hidden.

$section.find('select, input').each(function(){ if ( ($(this).attr('type')=='radio') || ($(this).attr('type')=='checkbox') ) { $(this).prop('checked', false).trigger('change'); } else{ $(this).val('').trigger('change'); } });

For my purpose, this is unwanted behaviour as the settings should "stay" intact by their default value state (checked or unchecked). For now I removed this part in my copy of the library, but it would be nice to have more control over what to uncheck in the underlaying section and what not.

@rguliev
Copy link
Collaborator

rguliev commented Jan 7, 2019

Hi,
I agree. I am going to add it soon in this way.

@BassemN
Copy link

BassemN commented Jan 23, 2019

I have the same issue with select HTML tag.

@BassemN
Copy link

BassemN commented Jan 23, 2019

After commenting the following lines, the selected stated is saved and not cleared after change

if ( ($(this).attr('type')=='radio') || ($(this).attr('type')=='checkbox') ) {
   //$(this).prop('checked', false).trigger('change');
}
else{
   //$(this).val('').trigger('change');
}
``

@rguliev
Copy link
Collaborator

rguliev commented Apr 15, 2019

This issue is fixed in the conditionize2.js
Also, take a look at my last comment here

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants