PyInquirer icon indicating copy to clipboard operation
PyInquirer copied to clipboard

Checkbox: disable choices based on answers

Open cyberbeast opened this issue 6 years ago • 2 comments

I am trying to address a use-case where let's say I have a checkbox with 5 options. If I select option 1 then options 2 through 5 should be disabled. Similary, if I unselect option 2 then options 2 to 5 should be enabled again.

Is this possible with the current state of the implementation?

cyberbeast avatar Nov 07 '18 16:11 cyberbeast

Its not actually impossible if you employ a custom event handler. You can disable a checkbox with the disable properties

CITGuru avatar Nov 08 '18 17:11 CITGuru

Can we currently set custom event handlers? Didn't find anything in the readme.

rithvikvibhu avatar Apr 17 '19 07:04 rithvikvibhu