Skip to content

Commit 3776d92

Browse files
author
Akos Kitta
committed
Show no match.
Signed-off-by: Akos Kitta <[email protected]>
1 parent 05f340b commit 3776d92

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

Diff for: arduino-ide-extension/src/browser/style/list-widget.css

+7
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@
5959
filter: contrast(90%);
6060
}
6161

62+
.filterable-list-container .no-match {
63+
font-weight: bold;
64+
color: var(--theia-panelTitle-inactiveForeground);
65+
align-items: center;
66+
margin-top: 10px;
67+
}
68+
6269
.component-list-item {
6370
padding: 10px 10px 10px 15px;
6471
font-size: var(--theia-ui-font-size1);

Diff for: arduino-ide-extension/src/browser/widgets/component-list/component-list.tsx

+10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { nls } from '@theia/core/lib/common/nls';
12
import * as React from '@theia/core/shared/react';
23
import AutoSizer from 'react-virtualized/dist/commonjs/AutoSizer';
34
import {
@@ -67,6 +68,7 @@ export class ComponentList<T extends ArduinoComponent> extends React.Component<
6768
rowHeight={this.cache.rowHeight}
6869
deferredMeasurementCache={this.cache}
6970
ref={this.setListRef}
71+
noRowsRenderer={this.renderNoMatch}
7072
/>
7173
);
7274
}}
@@ -136,6 +138,14 @@ export class ComponentList<T extends ArduinoComponent> extends React.Component<
136138
</CellMeasurer>
137139
);
138140
};
141+
142+
private renderNoMatch = (): JSX.Element => {
143+
return (
144+
<div className="no-match">
145+
{nls.localize('arduino/listWidget/noMatch', 'No match')}
146+
</div>
147+
);
148+
};
139149
}
140150

141151
export namespace ComponentList {

Diff for: i18n/en.json

+3
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,9 @@
272272
"libraryType": {
273273
"installed": "Installed"
274274
},
275+
"listWidget": {
276+
"noMatch": "No match"
277+
},
275278
"menu": {
276279
"advanced": "Advanced",
277280
"sketch": "Sketch",

0 commit comments

Comments
 (0)