This repository was archived by the owner on Mar 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 53
Dropdown component #388
Labels
Comments
Linking the PR: #334 |
Linking the deployed container with the People Picker prototype: https://stardustacc2.z13.web.core.windows.net/ |
|
|
Linking PR #422 Will also update API in the issue description. |
The API has been changed slightly and you can view it in the Docs for the component |
|
21 tasks
Implemented in #422. Closing. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add basic implementation for Dropdown component.
API
For now, use an API similar to SUIR (example):
Based on prototype in #334:
Since we only support "search" and "multiple", make these required for now.
Dropdown will only include the Input and associated List (menu), no buttons, field label, etc.
Separate
active
items fromselected
:active
means the item is in input box as an active valueselected
means the item is highlighted in the menuMore keyboard handlers:
API Proposal
className
Additional classes.
fluid
Boolean to make it stretch as much as container allows.
items
Shorthand to provide items in the dropdown. Similar to providing ListItems as shorthand inside list.

label
Shorthand to provide a label before the dropdown.

multiple
Boolean to provide multi-selection functionality. Will add the active shorthands as Labels before the Input, each with 'X' icon for removal.

onChange
Callback provided to allow user to handle change. Invoked with the props and also with the active option(s), which can be either the shorthand for the active item, or the shorthand collection for the active items.
onInput
Callback provided to allow user to handle input change in the edit text. Only makes sense if dropdown is a search. Invoked with both the props and the new value of the text in the input.
placeholder
Text to act as placeholder, optional, in case the dropdown is a search (with text field). Makes sense only if dropdown is a search.

search
Boolean to make the dropdown able to search through the options, with autosuggestions. If false, the search input will be replaced by trigger button.
styles
Styles that are applied on top of the default ones.
variables
Variables that are applied on top of the default ones.
The text was updated successfully, but these errors were encountered: