diff --git a/changelogs/upcoming/7718.md b/changelogs/upcoming/7718.md new file mode 100644 index 000000000000..b984e0ae2047 --- /dev/null +++ b/changelogs/upcoming/7718.md @@ -0,0 +1,4 @@ +**Bug fixes** + +- Fixed i18n of empty and loading state messages for the `FieldValueSelectionFilter` component + diff --git a/src/components/search_bar/filters/field_value_selection_filter.tsx b/src/components/search_bar/filters/field_value_selection_filter.tsx index b15a7a08789d..af27e8b02256 100644 --- a/src/components/search_bar/filters/field_value_selection_filter.tsx +++ b/src/components/search_bar/filters/field_value_selection_filter.tsx @@ -66,8 +66,6 @@ const defaults = { config: { multiSelect: true, filterWith: 'prefix', - loadingMessage: 'Loading...', - noOptionsMessage: 'No options found', searchThreshold: 10, }, }; @@ -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, }}