Skip to content

Instantly share code, notes, and snippets.

@jasongaare
Last active June 8, 2017 14:11
Show Gist options
  • Save jasongaare/85f655d11c5b037226c4acc249998b36 to your computer and use it in GitHub Desktop.
Save jasongaare/85f655d11c5b037226c4acc249998b36 to your computer and use it in GitHub Desktop.
import React, { Component } from 'react';
import _ from 'lodash';
class FilterBar extends Component {
removeFilter = (filter) => {
const nextFilters = _.cloneDeep(this.props.filters);
nextFilters.ids.splice(nextFilters.ids.indexOf(filter.id), 1);
this.props.onFiltersChange(nextFilters);
}
...
}
export default FilterBar;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment