Skip to content

Commit

Permalink
revert component change
Browse files Browse the repository at this point in the history
  • Loading branch information
briangregoryholmes committed Dec 19, 2023
1 parent 0a81ce9 commit 5c87d70
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions web-common/src/features/dashboards/filters/Filters.svelte
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
<!-- @component
The main feature-set component for dashboard filters
-->
<script context="module" lang="ts">
import { writable } from "svelte/store";
import type { Writable } from "svelte/store";
export const temporaryFilters: Writable<
{
name: string;
label: string;
selectedValues: any[];
filterType: string;
}[]
> = writable([]);
</script>

<script lang="ts">
import {
Chip,
Expand Down Expand Up @@ -133,32 +119,14 @@ The main feature-set component for dashboard filters
};
}) ?? [];
const currentTemporaryFilters =
$temporaryFilters
.filter((dimensionValues) => dimensionValues.name !== undefined)
.map((dimensionValues) => {
const name = dimensionValues.name as string;
return {
name,
label: getDisplayName(
dimensionIdMap.get(name) as MetricsViewSpecDimensionV2
),
selectedValues: [],
filterType: "exclude",
};
}) ?? [];
currentDimensionFilters = [
...currentDimensionIncludeFilters,
...currentDimensionExcludeFilters,
...currentTemporaryFilters,
];
// sort based on name to make sure toggling include/exclude is not jarring
currentDimensionFilters.sort((a, b) => (a.name > b.name ? 1 : -1));
}
$: console.log($temporaryFilters);
function setActiveDimension(name, value = "") {
activeDimensionName = name;
searchText = value;
Expand Down

0 comments on commit 5c87d70

Please sign in to comment.