diff --git a/.changeset/afraid-pumpkins-destroy.md b/.changeset/afraid-pumpkins-destroy.md new file mode 100644 index 0000000000..f972147392 --- /dev/null +++ b/.changeset/afraid-pumpkins-destroy.md @@ -0,0 +1,5 @@ +--- +'@evidence-dev/core-components': patch +--- + +fixed US map abbreviaabbreviations string handling diff --git a/packages/ui/core-components/src/lib/unsorted/viz/map/USMap.stories.svelte b/packages/ui/core-components/src/lib/unsorted/viz/map/USMap.stories.svelte index 9d9bc97865..3de642b604 100644 --- a/packages/ui/core-components/src/lib/unsorted/viz/map/USMap.stories.svelte +++ b/packages/ui/core-components/src/lib/unsorted/viz/map/USMap.stories.svelte @@ -37,3 +37,9 @@ {@const data = Query.create(`SELECT * from state_sales`, slowQuery)} + + + {@const data = Query.create(`SELECT * from state_sales`, query)} + + + diff --git a/packages/ui/core-components/src/lib/unsorted/viz/map/_USMap.svelte b/packages/ui/core-components/src/lib/unsorted/viz/map/_USMap.svelte index 98690ff83a..bd764a307e 100644 --- a/packages/ui/core-components/src/lib/unsorted/viz/map/_USMap.svelte +++ b/packages/ui/core-components/src/lib/unsorted/viz/map/_USMap.svelte @@ -16,6 +16,7 @@ import InvisibleLinks from '../../../atoms/InvisibleLinks.svelte'; import { getThemeStores } from '../../../themes/themes.js'; import { checkDeprecatedColor } from '../../../deprecated-colors.js'; + import { toBoolean } from '../../../utils.js'; const { theme, resolveColorPalette, resolveColorScale } = getThemeStores(); @@ -95,7 +96,7 @@ export let connectGroup = undefined; export let abbreviations = false; - $: abbreviations = abbreviations === 'true' || abbreviations === true; + $: abbreviations = toBoolean(abbreviations); let nameProperty = abbreviations ? 'abbrev' : 'name';