Skip to content
Snippets Groups Projects
Commit 79086dee authored by esikkala's avatar esikkala
Browse files

Fix filter removal

parent dc5d56a0
No related branches found
No related tags found
No related merge requests found
...@@ -18,19 +18,19 @@ const styles = theme => ({ ...@@ -18,19 +18,19 @@ const styles = theme => ({
const ChipsArray = props => { const ChipsArray = props => {
const handleDelete = item => () => { const handleDelete = item => () => {
if (!this.props.someFacetIsFetching) { if (!props.someFacetIsFetching) {
switch (item.filterType) { switch (item.filterType) {
case 'uriFilter': case 'uriFilter':
this.props.updateFacetOption({ props.updateFacetOption({
facetClass: this.props.facetClass, facetClass: props.facetClass,
facetID: item.facetID, facetID: item.facetID,
option: item.filterType, option: item.filterType,
value: item.value value: item.value
}) })
break break
case 'textFilter': case 'textFilter':
this.props.updateFacetOption({ props.updateFacetOption({
facetClass: this.props.facetClass, facetClass: props.facetClass,
facetID: item.facetID, facetID: item.facetID,
option: item.filterType, option: item.filterType,
value: null value: null
...@@ -38,14 +38,14 @@ const ChipsArray = props => { ...@@ -38,14 +38,14 @@ const ChipsArray = props => {
break break
case 'timespanFilter': case 'timespanFilter':
case 'integerFilter': case 'integerFilter':
this.props.updateFacetOption({ props.updateFacetOption({
facetClass: this.props.facetClass, facetClass: props.facetClass,
facetID: item.facetID, facetID: item.facetID,
option: item.filterType, option: item.filterType,
value: null value: null
}) })
this.props.fetchFacet({ props.fetchFacet({
facetClass: this.props.facetClass, facetClass: props.facetClass,
facetID: item.facetID facetID: item.facetID
}) })
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment