* client: use JSON for filtering/remove_url

This commit is contained in:
Ildar Kamalov
2019-06-03 16:33:15 +03:00
parent c93cb43db8
commit 7f5ac19b59
3 changed files with 19 additions and 12 deletions

View File

@@ -32,6 +32,13 @@ class Filters extends Component {
);
};
handleDelete = (url) => {
// eslint-disable-next-line no-alert
if (window.confirm(this.props.t('filter_confirm_delete'))) {
this.props.removeFilter({ url });
}
}
columns = [{
Header: <Trans>enabled_table_header</Trans>,
accessor: 'enabled',
@@ -62,7 +69,7 @@ class Filters extends Component {
<button
type="button"
className="btn btn-icon btn-outline-secondary btn-sm"
onClick={() => this.props.removeFilter(value)}
onClick={() => this.handleDelete(value)}
title={this.props.t('delete_table_action')}
>
<svg className="icons">