diff --git a/.changeset/mean-squids-ring.md b/.changeset/mean-squids-ring.md new file mode 100644 index 0000000..85d6ab5 --- /dev/null +++ b/.changeset/mean-squids-ring.md @@ -0,0 +1,5 @@ +--- +'naive-plus': patch +--- + +fix(np-form): correct checkbox column value type for grouped selections diff --git a/packages/naive-plus/src/np-form/src/interface.ts b/packages/naive-plus/src/np-form/src/interface.ts index f9baacc..0b8dd1f 100644 --- a/packages/naive-plus/src/np-form/src/interface.ts +++ b/packages/naive-plus/src/np-form/src/interface.ts @@ -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' @@ -135,9 +135,9 @@ export type FormColumnComponent = | { type: 'checkbox' props?: Omit - defaultValue?: CheckboxValue + defaultValue?: CheckboxGroupValue options: Run> - onChange?: (value: CheckboxValue, ctx: OnChangeCtx) => void + onChange?: (value: CheckboxGroupValue, ctx: OnChangeCtx) => void } | { type: 'autoComplete'