KETSE / casebox

Casebox: Secure all your information and team communication in one place
https://www.casebox.org
216 stars 120 forks source link

Conditional fields where pidValues come from checkboxes are not shown upon change #13

Open RafaPolit opened 9 years ago

RafaPolit commented 9 years ago

I have created a child node of a checkbox, and on its config I have the following JSON:

{
  "dependency": { 
    "pidValues": [1]
  }
}

If I select either yes or no on the checkbox, I never get the new field to appear. If I save the case with the checkbox field set to 'yes' and then REOPEN the form to edit the case again, then the child field is visible as expected.

If I then select 'no', the field disappears 'on the fly' as I would expect select 'yes' would show the child node. But, I cannot get it to show back unless I save first.

Also, if I have changed anything on the child field BEFORE selecting NO, even if it is 'hidden', its value gets changed to whatever I wrote on the field before changing the checkbox value. This was certainly unexpected.

Is there any config that will allow me to show the child nodes 'on the fly' when the user selects 'yes' as the option for the parent checkbox?

Thanks in advance, Rafa.

tvitalie commented 9 years ago

Hi Rafa, cant reproduce this issue in Chrome under windows. Will create an ubuntu system as you'he described in /KETSE/casebox/issues/9 and will test on it.

Thank you for detailed descriptions on the issues you find.

oburlaca commented 9 years ago

@RafaPolit, are you using the mouse to select Yes/No? If so, after you choose a value in the dropdown, you have to click Enter, or move to another field or click outside the checkbox field. This will "commit" your changes for the field, i.e. will set the value.

Using the keyboard works fine.

This can be added as a todo for UX improvement: set the value of a dropdown as soon as it's selected with the mouse

RafaPolit commented 8 years ago

Yes, I am using the mouse. Indeed, clicking outside the field 'commits' the changes, but yes, I believe it would be a nice improvement if that could happen upon selection.

Thanks, Rafa.