Skip to content

Commit 1888ee0

Browse files
committed
fix: tree select
1 parent 030be91 commit 1888ee0

File tree

2 files changed

+20
-17
lines changed

2 files changed

+20
-17
lines changed

web/src/app/workspace/bots/[botId]/bot-sharing.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,9 @@ export const BotSharing = ({ children }: { children?: React.ReactNode }) => {
130130
options={departments as TreeSelectItem[]}
131131
values={selectedDepartents.filter((d) => d !== '*')}
132132
onValuesChange={(v) => setSelectedDepartents(v)}
133-
className={cn('relative h-60 overflow-auto rounded-md border')}
133+
className={cn(
134+
'relative h-60 max-w-115 overflow-auto rounded-md border',
135+
)}
134136
/>
135137
{isSharedGlobal && (
136138
<div className="bg-accent/50 absolute top-0 left-0 h-full w-full" />

web/src/app/workspace/collections/[collectionId]/collection-sharing.tsx

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -129,26 +129,27 @@ export const CollectionSharing = ({
129129
/>
130130
</Label>
131131

132-
<div>
133-
<div className="mb-2 flex h-4 flex-row items-center justify-between gap-2 text-sm">
134-
<div>
135-
{page_bot('shared_department')} (
136-
{selectedDepartents.filter((d) => d !== '*').length})
137-
</div>
132+
<div className="mb-2 flex h-4 flex-row items-center justify-between gap-2 text-sm">
133+
<div>
134+
{page_bot('shared_department')} (
135+
{selectedDepartents.filter((d) => d !== '*').length})
138136
</div>
137+
</div>
139138

140-
<div className="relative h-60">
141-
<TreeMultipleSelect
142-
options={departments as TreeSelectItem[]}
143-
values={selectedDepartents.filter((d) => d !== '*')}
144-
onValuesChange={(v) => setSelectedDepartents(v)}
145-
className={cn('relative h-60 overflow-auto rounded-md border')}
146-
/>
147-
{isSharedGlobal && (
148-
<div className="bg-accent/50 absolute top-0 left-0 h-full w-full" />
139+
<div className="relative h-60">
140+
<TreeMultipleSelect
141+
options={departments as TreeSelectItem[]}
142+
values={selectedDepartents.filter((d) => d !== '*')}
143+
onValuesChange={(v) => setSelectedDepartents(v)}
144+
className={cn(
145+
'relative h-60 max-w-115 overflow-auto rounded-md border',
149146
)}
150-
</div>
147+
/>
148+
{isSharedGlobal && (
149+
<div className="bg-accent/50 absolute top-0 left-0 h-full w-full" />
150+
)}
151151
</div>
152+
152153
<DialogFooter>
153154
<Button variant="outline" onClick={() => setSharingVisible(false)}>
154155
{common_action('cancel')}

0 commit comments

Comments
 (0)