Skip to content

Commit

Permalink
improve default placeholder text if new items can be created
Browse files Browse the repository at this point in the history
  • Loading branch information
haschek committed Jun 18, 2024
1 parent 741a355 commit e0f7dd8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- `onItemClick` handler is only executed when the breadcrumb has no own `onClick` handler defined
- `<Card />`
- `elevation` allows now `-1` as value, the card is borderless then
- `<MultiSuggestField />`
- use "Search for item, or enter term to create new one..." as default `placeholder` if `createNewItemFromQuery` is given

### Deprecated

Expand Down
5 changes: 5 additions & 0 deletions src/components/MultiSelect/MultiSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,11 @@ export function MultiSelect<T>({

const contentMultiSelect = (
<BlueprintMultiSelect<T>
placeholder={
!otherMultiSelectProps.placeholder && createNewItemFromQuery
? "Search for item, or enter term to create new one..."
: undefined
}
{...otherMultiSelectProps}
query={requestState.current.query}
onQueryChange={onQueryChange}
Expand Down

0 comments on commit e0f7dd8

Please sign in to comment.