mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
Limit the number of autocompletion elements displayed for extensions search tags. (#4207)
Don't show in changelog
This commit is contained in:
@@ -14,7 +14,9 @@ import {
|
||||
import Close from '@material-ui/icons/Close';
|
||||
import Search from '@material-ui/icons/Search';
|
||||
import FilterList from '@material-ui/icons/FilterList';
|
||||
import Autocomplete from '@material-ui/lab/Autocomplete';
|
||||
import Autocomplete, {
|
||||
createFilterOptions,
|
||||
} from '@material-ui/lab/Autocomplete';
|
||||
import ElementWithMenu from './Menu/ElementWithMenu';
|
||||
import HelpIcon from './HelpIcon';
|
||||
import { type MessageDescriptor } from '../Utils/i18n/MessageDescriptor.flow';
|
||||
@@ -128,6 +130,8 @@ export type SearchBarInterface = {|
|
||||
blur: () => void,
|
||||
|};
|
||||
|
||||
const filterTags = createFilterOptions({ limit: 200 });
|
||||
|
||||
/**
|
||||
* Material design search bar,
|
||||
* inspired from https://github.com/TeamWertarbyte/material-ui-search-bar
|
||||
@@ -299,6 +303,7 @@ const SearchBar = React.forwardRef<Props, SearchBarInterface>(
|
||||
<Autocomplete
|
||||
id={id}
|
||||
options={tags}
|
||||
filterOptions={filterTags}
|
||||
groupBy={options => i18n._(t`Apply a filter`)}
|
||||
classes={autocompleteStyles}
|
||||
freeSolo
|
||||
|
Reference in New Issue
Block a user