shadcn-zod-formkit 1.27.3 → 1.27.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/dist/shadcn-zod-formkit-1.27.4.tgz +0 -0
- package/package.json +1 -1
- package/dist/shadcn-zod-formkit-1.27.3.tgz +0 -0
package/dist/index.d.mts
CHANGED
|
@@ -88,6 +88,7 @@ type FieldConfig<T, RT = Record<string, any>> = FieldProps<T, RT> | FieldConfig<
|
|
|
88
88
|
interface FieldProps<T = Record<string, any>, RT = Record<string, any>> {
|
|
89
89
|
name: keyof T;
|
|
90
90
|
label: string;
|
|
91
|
+
withAddBtn?: boolean;
|
|
91
92
|
form?: UseFormReturn<any>;
|
|
92
93
|
isRemovebleOption?: boolean;
|
|
93
94
|
withDuplicatTag?: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -88,6 +88,7 @@ type FieldConfig<T, RT = Record<string, any>> = FieldProps<T, RT> | FieldConfig<
|
|
|
88
88
|
interface FieldProps<T = Record<string, any>, RT = Record<string, any>> {
|
|
89
89
|
name: keyof T;
|
|
90
90
|
label: string;
|
|
91
|
+
withAddBtn?: boolean;
|
|
91
92
|
form?: UseFormReturn<any>;
|
|
92
93
|
isRemovebleOption?: boolean;
|
|
93
94
|
withDuplicatTag?: boolean;
|
package/dist/index.mjs
CHANGED
|
@@ -5526,6 +5526,7 @@ var StringValueListInput = class extends BaseInput {
|
|
|
5526
5526
|
};
|
|
5527
5527
|
var FieldStringValueList = ({ form, input, isSubmitting }) => {
|
|
5528
5528
|
const fieldName = input.name;
|
|
5529
|
+
const withAddBtn = input.withAddBtn ?? false;
|
|
5529
5530
|
useEffect(() => {
|
|
5530
5531
|
const current = form.getValues(fieldName);
|
|
5531
5532
|
if (!Array.isArray(current)) {
|
|
@@ -5589,7 +5590,7 @@ var FieldStringValueList = ({ form, input, isSubmitting }) => {
|
|
|
5589
5590
|
},
|
|
5590
5591
|
index
|
|
5591
5592
|
)),
|
|
5592
|
-
/* @__PURE__ */ jsx("div", { className: "flex justify-end mt-2", children: /* @__PURE__ */ jsx(
|
|
5593
|
+
/* @__PURE__ */ jsx("div", { className: "flex justify-end mt-2", children: withAddBtn && /* @__PURE__ */ jsx(
|
|
5593
5594
|
Button,
|
|
5594
5595
|
{
|
|
5595
5596
|
type: "button",
|