fix dropdown behavior (#23708)

This commit is contained in:
Christopher Suh
2023-07-10 14:59:21 -07:00
committed by GitHub
parent 46c43e3567
commit 95599ae39b

View File

@@ -79,7 +79,7 @@ export class Dropdown extends BaseDropdown {
} }
} }
export class DropdownList extends BaseDropdown { export class DropdownList extends Dropdown {
protected borderWidth = 1; protected borderWidth = 1;
private button?: Button; private button?: Button;
@@ -145,7 +145,7 @@ export class DropdownList extends BaseDropdown {
/** /**
* Render the dropdown contents * Render the dropdown contents
*/ */
protected renderContents(container: HTMLElement): IDisposable | null { protected override renderContents(container: HTMLElement): IDisposable | null {
let div = DOM.append(container, this._contentContainer); let div = DOM.append(container, this._contentContainer);
div.style.width = (DOM.getTotalWidth(this.element) - this.borderWidth * 2) + 'px'; // Subtract border width div.style.width = (DOM.getTotalWidth(this.element) - this.borderWidth * 2) + 'px'; // Subtract border width
return { dispose: () => { } }; return { dispose: () => { } };