Skip to content

Allow filterable dropdown to accept custom inputs#1

Open
chilleyQSI wants to merge 1 commit into
masterfrom
soft-choices
Open

Allow filterable dropdown to accept custom inputs#1
chilleyQSI wants to merge 1 commit into
masterfrom
soft-choices

Conversation

@chilleyQSI

Copy link
Copy Markdown
Collaborator

FilterableDropdown widget can accept choices which are not strictly enforced. In order to do this, choices are input under gooey_options rather than as a kwarg to the add_argument() method.

Example

@Gooey()
def main():
    p = GooeyParser()
    p.add_argument('not_strictly_enforced',
                   widget='FilterableDropdown',
                   gooey_options={
                       'choices': ['apple', 'banana', 'carrot']})

    p.add_argument('strictly_enforced',
                   widget='FilterableDropdown',
                   choices=['apple', 'banana', 'carrot'])
    ...

Not sure if the same should be added to the simple Dropdown class or if it makes sense to leave that as strictly enforced only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant