fixed sensorlist
This commit is contained in:
parent
f71fcfb0f8
commit
763db4283f
|
@ -33,9 +33,12 @@ export function mapDispatchToProps(dispatch: Dispatch<any>): SensorListDispatchP
|
|||
onReadAllByDomain: (domain: Domain) => {
|
||||
dispatch(ReadAllByDomainActions.request(domain));
|
||||
},
|
||||
onSensorSelect: (id: number) => {
|
||||
onSelectSensor: (id: number) => {
|
||||
dispatch(routerPush('/sensor/' + String(id)));
|
||||
},
|
||||
onAddSensor: (target: Target) => {
|
||||
dispatch(routerPush('/sensor/' + String(11)));
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,8 @@ export interface DispatchProps {
|
|||
onReadAllByTarget?(target: Target): void;
|
||||
onReadAllByProbe?(probe: Probe): void;
|
||||
onReadAllByDomain?(domain: Domain): void;
|
||||
onSensorSelect?(id: number): void;
|
||||
onSelectSensor?(id: number): void;
|
||||
onAddSensor?(target: Target): void;
|
||||
}
|
||||
|
||||
export type SensorListProps = StateProps & DispatchProps;
|
||||
|
@ -93,7 +94,7 @@ export class SensorList extends React.Component<SensorListProps, SensorListState
|
|||
selected: selectedSensor,
|
||||
});
|
||||
|
||||
this.props.onSensorSelect(selectedSensor.id);
|
||||
this.props.onSelectSensor(selectedSensor.id);
|
||||
}
|
||||
|
||||
public checkCellStatus(status: any): boolean {
|
||||
|
|
Loading…
Reference in New Issue
Block a user