Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to render enums as select dropdown #4594

Merged
merged 1 commit into from
Jan 10, 2024

Conversation

gjvoosten
Copy link
Collaborator

@gjvoosten gjvoosten commented Dec 7, 2023

When so defined in the dictionary, an enum will be a single select, an enumset will be a multiselect. The number of visible entries in the select can be set with the htmlSize property.

Closes AB#994

User changes

  • None

Superuser changes

  • None

Admin changes

  • None

System admin changes

  • anet.yml or anet-dictionary.yml needs change
    You can now do:
          someField:
            type: enum
            asA: select
    
    to render an enum as a dropdown instead of a row of buttons, or:
          someField:
            type: enumset
            asA: select
            htmlSize: 4
    
    to render an enumset as a multiselect dropdown, with 4 visible choices.
  • db needs migration
  • documentation has changed
  • graphql schema has changed

Checklist

  • Described the user behavior in PR body
  • Referenced/updated all related issues
  • commits follow a repo#issue: Title title format and these 7 rules
  • commits have a clean history, otherwise PR may be squash-merged
  • Added and/or updated unit tests
  • Added and/or updated e2e tests
  • Added and/or updated data migrations
  • Updated documentation
  • Resolved all build errors and warnings
  • Opened debt issues for anything not resolved here

@gjvoosten gjvoosten force-pushed the AB-994-add-select-widget-for-enum branch 2 times, most recently from 120db71 to 6f611a5 Compare December 13, 2023 07:51
@gjvoosten gjvoosten marked this pull request as ready for review December 13, 2023 08:32
@gjvoosten gjvoosten force-pushed the AB-994-add-select-widget-for-enum branch from 6f611a5 to de55c54 Compare December 20, 2023 15:55
An enum will be a single select, an enumset will be a multiselect.
The number of visible entries in the select can be set with the htmlSize property.
@midmarch midmarch merged commit 8ee284b into main Jan 10, 2024
23 checks passed
@midmarch midmarch deleted the AB-994-add-select-widget-for-enum branch January 10, 2024 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants