diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 560ee53..3e51afe 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## 2.1.2 (2024-05-17) + +### Features + +- Add multi select with custom values to form (#41) + ## 2.0.1 (2024-05-15) ### Features diff --git a/packages/components/package.json b/packages/components/package.json index 0027ecf..25f2873 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -86,5 +86,5 @@ "typecheck": "tsc --emitDeclarationOnly false --noEmit" }, "types": "dist/index.d.ts", - "version": "2.0.1" + "version": "2.1.2" } diff --git a/packages/components/src/components/Form/Form.story.tsx b/packages/components/src/components/Form/Form.story.tsx index 49913d7..39f459b 100644 --- a/packages/components/src/components/Form/Form.story.tsx +++ b/packages/components/src/components/Form/Form.story.tsx @@ -36,6 +36,7 @@ const meta = { groupField1: string; groupField2: string; datetime: string; + multiSelect: string[]; }>((builder) => builder .addSlider({ @@ -162,6 +163,17 @@ const meta = { min: new Date().toISOString(), showSeconds: false, }) + .addSelect({ + path: 'multiSelect', + label: 'Multi Select', + description: 'Multi and allow custom value', + defaultValue: [], + options: [], + settings: { + isMulti: true, + allowCustomValue: true, + }, + }) ); return
; diff --git a/packages/components/src/components/Form/Form.tsx b/packages/components/src/components/Form/Form.tsx index ea41aad..ce94372 100644 --- a/packages/components/src/components/Form/Form.tsx +++ b/packages/components/src/components/Form/Form.tsx @@ -186,8 +186,13 @@ export const Form =