handleRouteListDelete(r) {
  let self = this;
  routeService.deleteRouteList(r).then(() => {
      let newArr = self.state.routeLists.filter(function (obj) {
          return obj.id !== r.id;
      });
      self.setState({ routeLists: newArr, filtered: newArr })
  });
}
/**
 * Event handler used to delete a route from the database when the 
 * user clicks on the delete button.
 * @param {Object} r The route object to be deleted.
 */
Event handler used to delete a route from the database when the
user clicks on the delete button.
@param {Object} r The route object to be deleted.
Event handler used to delete a route from the database when the user clicks on the delete button . @param { Object } r The route object to be deleted .
handleRouteListDelete(r) {
  let self = this;
  routeService.deleteRouteList(r).then(() => {
      let newArr = self.state.routeLists.filter(function (obj) {
          return obj.id !== r.id;
      });
      self.setState({ routeLists: newArr, filtered: newArr })
  });
}
handleRouteListDelete ( r ) { let self = this ; routeService . deleteRouteList ( r ) . then ( ( ) => { let newArr = self . state . routeLists . filter ( function ( obj ) { return obj . id !== r . id ; } ) ; self . setState ( { routeLists : newArr , filtered : newArr } ) } ) ; }
Event handler used to delete a route from the database when the
 user clicks on the delete button.
Event handler used to delete a route from the database when the user clicks on the delete button .