handleDriverDelete(d) {
    var self = this;
    driverService.deleteDriver(d).then(() => {
        var newArr = self.state.drivers.filter(function (obj) {
            return obj.id !== d.id;
        });
        self.setState({ drivers: newArr, filtered: newArr })
    });
}
/**
 * Event handler used to delete a driver from the database when the 
 * user clicks on the delete button.
 * @param {Object} d The driver object to be deleted.
 */
Event handler used to delete a driver from the database when the
user clicks on the delete button.
@param {Object} d The driver object to be deleted.
Event handler used to delete a driver from the database when the user clicks on the delete button . @param { Object } d The driver object to be deleted .
handleDriverDelete(d) {
    var self = this;
    driverService.deleteDriver(d).then(() => {
        var newArr = self.state.drivers.filter(function (obj) {
            return obj.id !== d.id;
        });
        self.setState({ drivers: newArr, filtered: newArr })
    });
}
handleDriverDelete ( d ) { var self = this ; driverService . deleteDriver ( d ) . then ( ( ) => { var newArr = self . state . drivers . filter ( function ( obj ) { return obj . id !== d . id ; } ) ; self . setState ( { drivers : newArr , filtered : newArr } ) } ) ; }
Event handler used to delete a driver from the database when the
 user clicks on the delete button.
Event handler used to delete a driver from the database when the user clicks on the delete button .