Skip to content

Commit

Permalink
Merge pull request #194 from kiancross/fix-disabled-but-selected
Browse files Browse the repository at this point in the history
Return selected choices even if they are disabled
  • Loading branch information
tmbo committed Dec 24, 2021
2 parents 5a51177 + ccec9ed commit e8cb192
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions questionary/prompts/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,7 @@ def _is_selected(self, choice: Choice):
compare_default = self.default == choice
else:
compare_default = self.default == choice.value
return (
choice.checked or compare_default and self.default is not None
) and not choice.disabled
return choice.checked or compare_default and self.default is not None

def _assign_shortcut_keys(self):
available_shortcuts = self.SHORTCUT_KEYS[:]
Expand Down

0 comments on commit e8cb192

Please sign in to comment.