handleRecipientDelete(r){
    var  self  =  this;
    recipientService.deleteRecipient(r).then(()=>{
        var  newArr  =  self.state.recipients.filter(function(obj) {
            return  obj.id  !==  r.id;
        });
        self.setState({recipients:  newArr, filtered_recipients: newArr})
    });
}
/**
 * Event handler used to delete a recipient from the database when the 
 * user clicks on the delete button.
 * @param {Object} r The recipient object to be deleted.
 */
Event handler used to delete a recipient from the database when the
user clicks on the delete button.
@param {Object} r The recipient object to be deleted.
Event handler used to delete a recipient from the database when the user clicks on the delete button . @param { Object } r The recipient object to be deleted .
handleRecipientDelete(r){
    var  self  =  this;
    recipientService.deleteRecipient(r).then(()=>{
        var  newArr  =  self.state.recipients.filter(function(obj) {
            return  obj.id  !==  r.id;
        });
        self.setState({recipients:  newArr, filtered_recipients: newArr})
    });
}
handleRecipientDelete ( r ) { var self = this ; recipientService . deleteRecipient ( r ) . then ( ( ) => { var newArr = self . state . recipients . filter ( function ( obj ) { return obj . id !== r . id ; } ) ; self . setState ( { recipients : newArr , filtered_recipients : newArr } ) } ) ; }
Event handler used to delete a recipient from the database when the
 user clicks on the delete button.
Event handler used to delete a recipient from the database when the user clicks on the delete button .