Skip to content

Commit

Permalink
FEATURE: Increased number of visible rows in combo box to 8 (#2127)
Browse files Browse the repository at this point in the history
* Increased number of visible rows in combo box to 8
* Specified dropdown height to be 8 rows
  • Loading branch information
JindrichSusen committed Nov 3, 2023
1 parent 4e1ab27 commit dbd3517
Showing 1 changed file with 3 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export function DropdownEditorBody() {
rectCtrl={rectCtrl}
beh={beh}
rowHeight={rowHeight}
height={8 * rowHeight}
/>
</div>
)}
Expand All @@ -77,7 +78,7 @@ export class DropdownEditorTable extends React.Component<{
rectCtrl: BoundingRect,
beh: IDropdownEditorBehavior,
rowHeight: number,
height?: number
height: number
}> {
refMultiGrid = createRef<MultiGrid>();
@observable
Expand All @@ -86,7 +87,6 @@ export class DropdownEditorTable extends React.Component<{
hoveredRowIndex= - 1;
columnCount = 0;
readonly cellPadding = 20;
readonly maxHeight = 150;
disposer: any;

componentDidMount() {
Expand All @@ -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;
Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit dbd3517

Please sign in to comment.