mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 14:30:41 +00:00
fix: tree explorer nodes not filling parent container width
Add min-w-0 to TreeRoot to allow flex shrinking within sidebar. Add w-full and min-w-0 to tree node rows so absolutely-positioned virtualizer items fill the container width and text truncates correctly. Amp-Thread-ID: https://ampcode.com/threads/T-019cf1f6-5d46-7338-8019-2bcee8b19b51 Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
:get-children="
|
||||
(item) => (item.children?.length ? item.children : undefined)
|
||||
"
|
||||
class="m-0 p-0 pb-6"
|
||||
class="m-0 min-w-0 p-0 pb-6"
|
||||
>
|
||||
<TreeVirtualizer
|
||||
v-slot="{ item }"
|
||||
|
||||
@@ -105,7 +105,7 @@ defineOptions({
|
||||
})
|
||||
|
||||
const ROW_CLASS =
|
||||
'group/tree-node flex cursor-pointer select-none items-center gap-3 overflow-hidden py-2 outline-none hover:bg-comfy-input mx-2 rounded'
|
||||
'group/tree-node flex w-full min-w-0 cursor-pointer select-none items-center gap-3 overflow-hidden py-2 outline-none hover:bg-comfy-input mx-2 rounded'
|
||||
|
||||
const { item } = defineProps<{
|
||||
item: FlattenedItem<RenderedTreeExplorerNode<ComfyNodeDefImpl>>
|
||||
|
||||
Reference in New Issue
Block a user