Device manager - updated dropdown style in filtered device list (PSG-689) (#9226)

* add FilterDropdown wrapper on Dropdown for filter styles

* test and fix strict errors

* fix comment
This commit is contained in:
Kerry 2022-08-30 19:11:33 +02:00 committed by GitHub
parent 825a0af4a9
commit 50f6986f6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 389 additions and 20 deletions

View file

@ -68,7 +68,7 @@ class MenuOption extends React.Component<IMenuOptionProps> {
}
}
interface IProps {
export interface DropdownProps {
id: string;
// ARIA label
label: string;
@ -108,13 +108,13 @@ interface IState {
* but somewhat simpler as react-select is 79KB of minified
* javascript.
*/
export default class Dropdown extends React.Component<IProps, IState> {
export default class Dropdown extends React.Component<DropdownProps, IState> {
private readonly buttonRef = createRef<HTMLDivElement>();
private dropdownRootElement: HTMLDivElement = null;
private ignoreEvent: MouseEvent = null;
private childrenByKey: Record<string, ReactNode> = {};
constructor(props: IProps) {
constructor(props: DropdownProps) {
super(props);
this.reindexChildren(this.props.children);