File tree 1 file changed +8
-1
lines changed
packages/client/src/pages
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -259,11 +259,18 @@ watchDebounced(filterName, (v) => {
259
259
}, { debounce: 300 })
260
260
261
261
const devtoolsState = useDevToolsState ()
262
+
263
+ // responsive layout
264
+ const splitpanesRef = ref <HTMLDivElement >()
265
+ const splitpanesReady = ref (false )
266
+ const { width : splitpanesWidth } = useElementSize (splitpanesRef )
267
+ // prevent `Splitpanes` layout from being changed before it ready
268
+ const horizontal = computed (() => splitpanesReady .value ? splitpanesWidth .value < 700 : false )
262
269
</script >
263
270
264
271
<template >
265
272
<PanelGrids h-screen >
266
- <Splitpanes >
273
+ <Splitpanes ref = " splitpanesRef " :horizontal = " horizontal " @ready = " splitpanesReady = true " >
267
274
<Pane flex flex-col border =" r base" >
268
275
<div w-full flex gap2 px2 py2 >
269
276
<VueInput v-if =" loaded" v-model =" filterName" :loading-debounce-time =" 250" :loading =" !filtered" placeholder =" Find components..." flex-1 />
You can’t perform that action at this time.
0 commit comments