Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Fix `CreateShorthandOptions` should be typed @lucivpav ([#1886](https://github.com/stardust-ui/react/pull/1886))
- Add `shadowLevel1Dark` in Teams themes @notandrew ([#1887](https://github.com/stardust-ui/react/pull/1887))
- When merging themes use deep merge for site and component variables @miroslavstastny ([#1907](https://github.com/stardust-ui/react/pull/1907))
- Fix `Dropdown` to properly accept `id` on `searchInput` @silviuavram ([#1938](https://github.com/stardust-ui/react/pull/1938))

### Features
- Add `TextArea` component @lucivpav ([#1897](https://github.com/stardust-ui/react/pull/1897))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,17 @@ const fields = [
label: { content: `Your best friend's name is:`, id: labelId },
name: 'chooseFriend',
key: 'choose-friend',
id: 'choose-friend-shorthand',
control: {
as: Dropdown,
items: ['John Doe', 'Dohn Joe', 'John Joe', 'Dohn Doe'],
'aria-labelledby': labelId,
search: true,
placeholder: 'Choose a friend',
searchInput: {
id: 'choose-friend-shorthand', // id needs to end up on the search input.
},
id: undefined, // not on the main wrapper element.
},
},
{ control: { as: Button, content: 'Submit' }, key: 'submit' },
Expand Down
5 changes: 5 additions & 0 deletions packages/react/src/components/Dropdown/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,11 @@ class Dropdown extends AutoControlledComponent<WithAsProp<DropdownProps>, Dropdo
onStateChange={this.handleStateChange}
labelId={this.props['aria-labelledby']}
environment={this.context.target.defaultView}
inputId={
this.props.searchInput && this.props.searchInput['id']
? this.props.searchInput['id']
: undefined
}
>
{({
getInputProps,
Expand Down