Skip to content

Commit f7a7b52

Browse files
committed
feat(FilterBar): allow customizing search field placeholder and noTypeahead props
1 parent c78e412 commit f7a7b52

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

packages/main/src/components/FilterBar/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,8 @@ const FilterBar = forwardRef<HTMLDivElement, FilterBarPropTypes>((props, ref) =>
386386
<FilterGroupItem data-with-toolbar={!hideToolbar} filterKey={`${uniqueId}-search`}>
387387
<div className={classNames.searchContainer}>
388388
{cloneElement(search, {
389-
placeholder: searchText,
390-
noTypeahead: true,
389+
placeholder: search.props.placeholder ?? searchText,
390+
noTypeahead: search.props.noTypeahead ?? true,
391391
showClearIcon: true,
392392
type: InputType.Search,
393393
icon: <Icon name={searchIcon} />,

packages/main/src/components/FilterBar/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export interface FilterBarPropTypes extends CommonProps {
8484
/**
8585
* Defines the search field rendered as first filter item.
8686
*
87-
* __Note:__ Per default `placeholder`, `icon`, `noTypeahead`, `showClearIcon` and `type` are applied to the search input.
87+
* __Note:__ By default, `placeholder`, `icon`, `noTypeahead`, `showClearIcon`, and `type` are applied to the search input. Only `placeholder` and `noTypeahead` can be overridden.
8888
*
8989
* __Note:__ The field is only available in the FilterBar not inside the filter configuration dialog.
9090
*/

0 commit comments

Comments
 (0)