(condition)
| 187 | }; |
| 188 | |
| 189 | const _onClearFilter = (condition) => { |
| 190 | const newConditions = [...conditions]; |
| 191 | let clearIndex; |
| 192 | for (let i = 0; i < conditions.length; i++) { |
| 193 | if (conditions[i].id === condition.id) { |
| 194 | clearIndex = i; |
| 195 | break; |
| 196 | } |
| 197 | } |
| 198 | if (clearIndex > -1) newConditions.splice(clearIndex, 1); |
| 199 | |
| 200 | setConditions(newConditions); |
| 201 | |
| 202 | setDataLoading(true); |
| 203 | dispatch(runQueryWithFilters({ |
| 204 | project_id: chart.project_id, |
| 205 | chart_id: chart.id, |
| 206 | filters: newConditions, |
| 207 | shareToken: searchParams.get("token"), |
| 208 | })) |
| 209 | .then((data) => { |
| 210 | if (data.payload) { |
| 211 | setChart(data.payload); |
| 212 | } |
| 213 | setDataLoading(false); |
| 214 | }); |
| 215 | }; |
| 216 | |
| 217 | const _checkIfFilters = () => { |
| 218 | return getExposedChartFilters(chart).length > 0; |
nothing calls this directly
no test coverage detected