Skip to content

Commit 366bf67

Browse files
committed
fix: slot items resolver of Checkbox
1 parent 4f0457c commit 366bf67

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

.changeset/brave-keys-hear.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@modelscope-studio/antd': patch
3+
'modelscope_studio': patch
4+
---
5+
6+
fix: slot items resolver of Checkbox

frontend/antd/checkbox/group/checkbox.group.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ export const CheckboxGroup = sveltify<
1414
['default', 'options'],
1515
({ onValueChange, onChange, elRef, options, children, ...props }) => {
1616
const { items: slotItems } = useItems<['default', 'options']>();
17-
const resolvedSlotItems = slotItems.options
18-
? slotItems.options
19-
: slotItems.default;
17+
const resolvedSlotItems =
18+
slotItems.options.length > 0 ? slotItems.options : slotItems.default;
19+
2020
return (
2121
<>
2222
<div style={{ display: 'none' }}>{children}</div>

0 commit comments

Comments
 (0)