Skip to content

Commit ede7479

Browse files
author
Akos Kitta
committed
Last item's <select> must be visible.
Signed-off-by: Akos Kitta <[email protected]>
1 parent cc43c8e commit ede7479

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

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

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import 'react-virtualized/styles.css';
12
import * as React from '@theia/core/shared/react';
23
import AutoSizer from 'react-virtualized/dist/commonjs/AutoSizer';
34
import {
@@ -101,10 +102,13 @@ export class ComponentList<T extends ArduinoComponent> extends React.Component<
101102
private clear(index: number): void {
102103
this.cache.clear(index, 0);
103104
this.list?.recomputeRowHeights(index);
104-
// Update the last item if the if the one before was updated
105-
if (index === this.props.items.length - 2) {
106-
this.cache.clear(index + 1, 0);
107-
this.list?.recomputeRowHeights(index + 1);
105+
// The last two items are special as the required height of the
106+
// container might change when hovering over those two last items.
107+
if (
108+
index === this.props.items.length - 1 ||
109+
index === this.props.items.length - 2
110+
) {
111+
this.list?.recomputeGridSize();
108112
}
109113
}
110114

0 commit comments

Comments
 (0)