Skip to content

Commit

Permalink
fix(hacky): use settimeout to open the transform popover
Browse files Browse the repository at this point in the history
  • Loading branch information
nextchamp-saqib committed Feb 8, 2024
1 parent 14193b1 commit 04f74ea
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions frontend/src/query/visual/TransformSection.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup>
import { Option } from 'lucide-vue-next'
import { inject, nextTick, ref } from 'vue'
import { inject, ref } from 'vue'
import SectionHeader from './SectionHeader.vue'
import TransformEditor from './TransformEditor.vue'
import TransformListItem from './TransformListItem.vue'
Expand All @@ -12,12 +12,9 @@ const activeTransformIdx = ref(null)
async function onAddTransform() {
assistedQuery.addTransform()
await nextTick()
activeTransformIdx.value = assistedQuery.transforms.length - 1
await nextTick()
activeTransformIdx.value = null
await nextTick()
activeTransformIdx.value = assistedQuery.transforms.length - 1
setTimeout(() => {
activeTransformIdx.value = assistedQuery.transforms.length - 1
}, 500)
}
function onRemoveTransform() {
assistedQuery.removeTransformAt(activeTransformIdx.value)
Expand Down

0 comments on commit 04f74ea

Please sign in to comment.