mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-13 20:29:27 +00:00
Added support for 3rd party core settings.
Closes arduino/arduino-pro-ide#10. Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
@@ -72,12 +72,7 @@ export class FilterableListContainer<T extends ArduinoComponent> extends React.C
|
||||
|
||||
protected search(query: string): void {
|
||||
const { searchable } = this.props;
|
||||
searchable.search({ query: query.trim() }).then(result => {
|
||||
const { items } = result;
|
||||
this.setState({
|
||||
items: this.sort(items)
|
||||
});
|
||||
});
|
||||
searchable.search({ query: query.trim() }).then(items => this.setState({ items: this.sort(items) }));
|
||||
}
|
||||
|
||||
protected sort(items: T[]): T[] {
|
||||
@@ -91,7 +86,7 @@ export class FilterableListContainer<T extends ArduinoComponent> extends React.C
|
||||
dialog.open();
|
||||
try {
|
||||
await installable.install({ item, version });
|
||||
const { items } = await searchable.search({ query: this.state.filterText });
|
||||
const items = await searchable.search({ query: this.state.filterText });
|
||||
this.setState({ items: this.sort(items) });
|
||||
} finally {
|
||||
dialog.close();
|
||||
@@ -113,7 +108,7 @@ export class FilterableListContainer<T extends ArduinoComponent> extends React.C
|
||||
dialog.open();
|
||||
try {
|
||||
await installable.uninstall({ item });
|
||||
const { items } = await searchable.search({ query: this.state.filterText });
|
||||
const items = await searchable.search({ query: this.state.filterText });
|
||||
this.setState({ items: this.sort(items) });
|
||||
} finally {
|
||||
dialog.close();
|
||||
|
||||
Reference in New Issue
Block a user