Skip to content

Commit

Permalink
[FieldValueSelectionFilter] [i18n] Let EuiSelectable handle default…
Browse files Browse the repository at this point in the history
… loading and empty messages (elastic#7718)
  • Loading branch information
Heenawter authored and mgadewoll committed May 3, 2024
1 parent db65bc7 commit 930a6d8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
4 changes: 4 additions & 0 deletions changelogs/upcoming/7718.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
**Bug fixes**

- Fixed i18n of empty and loading state messages for the `FieldValueSelectionFilter` component

14 changes: 3 additions & 11 deletions src/components/search_bar/filters/field_value_selection_filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ const defaults = {
config: {
multiSelect: true,
filterWith: 'prefix',
loadingMessage: 'Loading...',
noOptionsMessage: 'No options found',
searchThreshold: 10,
},
};
Expand Down Expand Up @@ -400,16 +398,10 @@ export class FieldValueSelectionFilter extends Component<
options={items}
renderOption={(option) => option.view}
isLoading={isNil(this.state.options)}
loadingMessage={
config.loadingMessage || defaults.config.loadingMessage
}
emptyMessage={
config.noOptionsMessage || defaults.config.noOptionsMessage
}
loadingMessage={config.loadingMessage}
emptyMessage={config.noOptionsMessage}
errorMessage={this.state.error}
noMatchesMessage={
config.noOptionsMessage || defaults.config.noOptionsMessage
}
noMatchesMessage={config.noOptionsMessage}
listProps={{
isVirtualized: isOverSearchThreshold || false,
}}
Expand Down

0 comments on commit 930a6d8

Please sign in to comment.