Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/mean-squids-ring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'naive-plus': patch
---

fix(np-form): correct checkbox column value type for grouped selections
6 changes: 3 additions & 3 deletions packages/naive-plus/src/np-form/src/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ import type {
} from 'naive-ui'
import type { NpRadioProps, RadioOption, RadioValue } from '../../np-radio'
import type {
CheckboxGroupValue,
CheckboxOption,
CheckboxValue,
NpCheckboxProps,
} from '../../np-checkbox'
import type EventBus from '../../utils/event-bus'
Expand Down Expand Up @@ -135,9 +135,9 @@ export type FormColumnComponent<FormData extends AnyObject = AnyObject> =
| {
type: 'checkbox'
props?: Omit<NpCheckboxProps, OmitValue>
defaultValue?: CheckboxValue
defaultValue?: CheckboxGroupValue
options: Run<FormData, Array<CheckboxOption | any>>
onChange?: (value: CheckboxValue, ctx: OnChangeCtx<FormData>) => void
onChange?: (value: CheckboxGroupValue, ctx: OnChangeCtx<FormData>) => void
}
| {
type: 'autoComplete'
Expand Down
Loading