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

Refactor Dropdown component & add automatic "null option" #1517

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

robines
Copy link
Member

@robines robines commented Oct 4, 2024

Drastically improve the Dropdown component:

  • Allow for both controlled and uncontrolled use
  • Add nullOption for automatically prepending a "null option" to the top of the dropdown options
    • By default this adds a blank option with null as its value.
    • The label can be customized, and it can also be disabled, to force users to select another option
    • If the null option is selected, italic style is applied to the dropdown, to further indicate that a special option is selected.

Also updated usage across project

This allows for prepending a null/blank option automatically
@robines robines added the frontend Task related to frontend. label Oct 4, 2024
@robines robines self-assigned this Oct 4, 2024
Copy link
Contributor

@Mathias-a Mathias-a left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Silky smooth

@robines
Copy link
Member Author

robines commented Oct 8, 2024

Venter på #1510 før jeg merger

@robines robines changed the title Add addNullOption argument to Dropdown Refactor Dropdown component Oct 25, 2024
@robines robines changed the title Refactor Dropdown component Refactor Dropdown component & add automatic "null option" Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Task related to frontend.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants