Fix state initialisation for DevicesPanel

This commit is contained in:
Germain Souquet 2021-09-03 10:25:45 +01:00
parent e16921e1f1
commit 475ef66c58

View file

@ -35,7 +35,7 @@ interface IProps {
interface IState {
devices: IMyDevice[];
deviceLoadError?: string;
selectedDevices?: string[];
selectedDevices: string[];
deleting?: boolean;
}
@ -43,6 +43,14 @@ interface IState {
export default class DevicesPanel extends React.Component<IProps, IState> {
private unmounted = false;
constructor(props: IProps) {
super(props);
this.state = {
devices: [],
selectedDevices: [],
};
}
public componentDidMount(): void {
this.loadDevices();
}