Skip to content

Commit

Permalink
fix(@dpc-sdp/ripple-tide-search): fixed dropdown options not updating
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffdowdle committed Jul 13, 2023
1 parent 22d5439 commit 295d3d1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ const uiFilters = ref(props.userFilters)
// Updates filter options with aggregation value
onAggregationUpdateHook.value = (aggs) => {
const updateTimestamp = Date.now()
Object.keys(aggs).forEach((key) => {
uiFilters.value.forEach((uiFilter, idx) => {
if (uiFilter.id === key) {
Expand All @@ -122,6 +124,7 @@ onAggregationUpdateHook.value = (aggs) => {
...uiFilters.value[idx],
props: {
...uiFilters.value[idx].props,
timestamp: updateTimestamp,
options: getOptions()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ interface Props {
multiple: boolean
label: string
options?: any[]
timestamp: string
}
defineProps<Props>()
</script>

<template>
<FormKit
:id="id"
:key="`${id}-${timestamp}`"
:name="id"
type="RplFormDropdown"
:multiple="multiple"
Expand Down

0 comments on commit 295d3d1

Please sign in to comment.