Skip to content

Commit

Permalink
fix(ui): disable "filters" flickering
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Sep 9, 2024
1 parent 6412557 commit c677d38
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/ui/client/components/explorer/Explorer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import { useSearch } from '~/composables/explorer/search'
import 'vue-virtual-scroller/dist/vue-virtual-scroller.css'
import { config } from '~/composables/client'
import { panels } from '~/composables/navigation'
defineOptions({ inheritAttrs: false })
const { onItemClick } = defineProps<{
Expand Down Expand Up @@ -46,8 +48,9 @@ const filterClass = ref<string>('grid-cols-2')
const filterHeaderClass = ref<string>('grid-col-span-2')
const testExplorerRef = ref<HTMLInputElement | undefined>()
useResizeObserver(testExplorerRef, (entries) => {
const { width } = entries[0].contentRect
const { width: windowWidth } = useWindowSize()
watch(() => windowWidth.value * (panels.navigation / 100), (width) => {
if (width < 420) {
filterClass.value = 'grid-cols-2'
filterHeaderClass.value = 'grid-col-span-2'
Expand Down

0 comments on commit c677d38

Please sign in to comment.