diff --git a/frontend-html/src/modules/Editors/DropdownEditor/DropdownEditorBody.tsx b/frontend-html/src/modules/Editors/DropdownEditor/DropdownEditorBody.tsx index 7ede5ef6bd..78efb66920 100644 --- a/frontend-html/src/modules/Editors/DropdownEditor/DropdownEditorBody.tsx +++ b/frontend-html/src/modules/Editors/DropdownEditor/DropdownEditorBody.tsx @@ -63,6 +63,7 @@ export function DropdownEditorBody() { rectCtrl={rectCtrl} beh={beh} rowHeight={rowHeight} + height={8 * rowHeight} /> )} @@ -77,7 +78,7 @@ export class DropdownEditorTable extends React.Component<{ rectCtrl: BoundingRect, beh: IDropdownEditorBehavior, rowHeight: number, - height?: number + height: number }> { refMultiGrid = createRef(); @observable @@ -86,7 +87,6 @@ export class DropdownEditorTable extends React.Component<{ hoveredRowIndex= - 1; columnCount = 0; readonly cellPadding = 20; - readonly maxHeight = 150; disposer: any; componentDidMount() { @@ -97,17 +97,6 @@ export class DropdownEditorTable extends React.Component<{ return this.props.dataTable.rowCount + (this.hasHeader ? 1 : 0); } - get height(){ - if(this.props.height){ - return this.props.height; - } - let height = 0; - for (let i = 0; i < this.rowCount; i++) { - height = height + this.props.rowHeight; - } - return Math.min(height, this.maxHeight) + this.scrollbarSize.horiz; - } - constructor(props: any) { super(props); this.columnCount = this.props.drivers.driverCount; @@ -188,7 +177,7 @@ export class DropdownEditorTable extends React.Component<{ columnWidth={({ index }) => widths[index]} rowHeight={this.props.rowHeight} fixedRowCount={this.hasHeader ? 1 : 0} - height={this.height} + height={this.props.height} width={windowWidth} cellRenderer={args => this.renderTableCell(args)} onScroll={this.props.beh.handleScroll}