CITGuru / PyInquirer

A Python module for common interactive command line user interfaces
MIT License
1.92k stars 236 forks source link

Checkbox: disable choices based on answers #22

Open cyberbeast opened 5 years ago

cyberbeast commented 5 years ago

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?

CITGuru commented 5 years ago

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

rithvikvibhu commented 5 years ago

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