@bigbinary/neeto-fields-frontend 1.0.3 → 1.0.5
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/README.md +12 -4
- package/dist/index.cjs.js +4731 -276
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +4737 -282
- package/dist/index.js.map +1 -1
- package/package.json +3 -1
- package/types.d.ts +6 -0
package/README.md
CHANGED
|
@@ -163,6 +163,8 @@ default, but you can customize its behavior by passing optional props.
|
|
|
163
163
|
to be rendered inside the pane and `validations` for the formik input fields
|
|
164
164
|
in the `children`. `validations` must be provided as a map with the field
|
|
165
165
|
name as key and the corresponding yup validation schema as the value.
|
|
166
|
+
`initialValues` must also be provided as a map with the field name as key and
|
|
167
|
+
the corresponding value.
|
|
166
168
|
7. `showStateFilter`: Boolean value which specifies whether to show or hide
|
|
167
169
|
state filters.
|
|
168
170
|
8. `fieldStatesTaxonomy`: Specifies the names to be rendered for `active` and
|
|
@@ -194,6 +196,9 @@ import { FieldsDashboard } from "@bigbinary/neeto-fields-frontend";
|
|
|
194
196
|
validations: {
|
|
195
197
|
hostSpecificInputName: validationSchema,
|
|
196
198
|
},
|
|
199
|
+
initialValues: {
|
|
200
|
+
hostSpecificInputName: initialValue,
|
|
201
|
+
},
|
|
197
202
|
}}
|
|
198
203
|
breadcrumbs={[
|
|
199
204
|
{
|
|
@@ -224,6 +229,9 @@ import { FieldsDashboard } from "@bigbinary/neeto-fields-frontend";
|
|
|
224
229
|
validations: {
|
|
225
230
|
hostSpecificInputName: validationSchema,
|
|
226
231
|
},
|
|
232
|
+
initialValues: {
|
|
233
|
+
hostSpecificInputName: initialValue,
|
|
234
|
+
},
|
|
227
235
|
}}
|
|
228
236
|
breadcrumbs={[
|
|
229
237
|
{
|
|
@@ -254,6 +262,7 @@ button is clicked.
|
|
|
254
262
|
2. `allowedKinds`: Specifies the list of field kinds allowed to be created.
|
|
255
263
|
3. `children`: Children components for the pane.
|
|
256
264
|
4. `additionalValidations`: Validations for the formik fields in `children`.
|
|
265
|
+
5. `initialValues`: Initial values for the formik fields in `children`.
|
|
257
266
|
|
|
258
267
|
#### Usage:
|
|
259
268
|
|
|
@@ -266,6 +275,7 @@ import { AddField } from "@biginary/neeto-fields-frontend";
|
|
|
266
275
|
additionalValidations={{
|
|
267
276
|
hostSpecificInputName: validationSchema,
|
|
268
277
|
}}
|
|
278
|
+
initialValues={{ hostSpecificInputName: initialValue }}
|
|
269
279
|
>
|
|
270
280
|
<HostSpecificInputFields />
|
|
271
281
|
</AddField>;
|
|
@@ -296,6 +306,8 @@ specific resource.
|
|
|
296
306
|
key and the component rendering callback function as the value. The callback
|
|
297
307
|
function can expect the `field` object as argument.
|
|
298
308
|
7. `className`: Class names for styling.
|
|
309
|
+
8. showBorder: Boolean value to specify whether to show or hide borders. Default
|
|
310
|
+
true.
|
|
299
311
|
|
|
300
312
|
#### Usage:
|
|
301
313
|
|
|
@@ -455,8 +467,6 @@ This is a React Query hook for fetching all the fields.
|
|
|
455
467
|
|
|
456
468
|
- `resourceType`: The resource_type of the fields to be fetched.
|
|
457
469
|
- `ownerId`: The ID of the owner in case the owner is not an organization.
|
|
458
|
-
- `pageSize` The page size for fetching the fields.
|
|
459
|
-
- `pageIndex`: The page index for fetching the fields.
|
|
460
470
|
|
|
461
471
|
#### Usage:
|
|
462
472
|
|
|
@@ -465,8 +475,6 @@ const {
|
|
|
465
475
|
data: { fields },
|
|
466
476
|
} = useFetchFields({
|
|
467
477
|
resourceType: "users",
|
|
468
|
-
pageSize: 10,
|
|
469
|
-
pageIndex: 1,
|
|
470
478
|
ownerId: "ownerId",
|
|
471
479
|
});
|
|
472
480
|
```
|