handleSave() {
    this.handleClose();
    if (this.state.show) {
        this.handleDriverDelete(this.state.driverToDelete);
        this.setState({driverToDelete: {}});
    }
    else if (this.state.allShow) {
        this.handleAllDriversDelete(this.state.allDriversDelete);
        this.setState({ allDriversDelete: [] });
    }
}
// For deleting 1 or all drivers
For deleting 1 or all drivers
For deleting 1 or all drivers
handleSave() {
    this.handleClose();
    if (this.state.show) {
        this.handleDriverDelete(this.state.driverToDelete);
        this.setState({driverToDelete: {}});
    }
    else if (this.state.allShow) {
        this.handleAllDriversDelete(this.state.allDriversDelete);
        this.setState({ allDriversDelete: [] });
    }
}
handleSave ( ) { this . handleClose ( ) ; if ( this . state . show ) { this . handleDriverDelete ( this . state . driverToDelete ) ; this . setState ( { driverToDelete : { } } ) ; } else if ( this . state . allShow ) { this . handleAllDriversDelete ( this . state . allDriversDelete ) ; this . setState ( { allDriversDelete : [ ] } ) ; } }
For deleting 1 or all drivers
For deleting 1 or all drivers