@dartech/arsenal-ui 1.3.32 → 1.3.33
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/index.js +5 -4
- package/package.json +1 -1
- package/src/interfaces/ui.d.ts +1 -0
- package/src/lib/Forms/ControlCheckbox.d.ts +1 -2
package/index.js
CHANGED
@@ -518,12 +518,12 @@ const ControlCheckbox = _a => {
|
|
518
518
|
name = '',
|
519
519
|
label = '',
|
520
520
|
required = false,
|
521
|
-
defaultValue =
|
521
|
+
// defaultValue = false,
|
522
522
|
disabled = false,
|
523
523
|
hideErrorMessage = false,
|
524
524
|
onChange: customOnChange
|
525
525
|
} = _a,
|
526
|
-
checkboxProps = __rest(_a, ["control", "validate", "name", "label", "required", "
|
526
|
+
checkboxProps = __rest(_a, ["control", "validate", "name", "label", "required", "disabled", "hideErrorMessage", "onChange"]);
|
527
527
|
const {
|
528
528
|
field: {
|
529
529
|
ref,
|
@@ -535,7 +535,7 @@ const ControlCheckbox = _a => {
|
|
535
535
|
} = useController({
|
536
536
|
name,
|
537
537
|
control,
|
538
|
-
defaultValue
|
538
|
+
defaultValue: false
|
539
539
|
});
|
540
540
|
const value = useWatch({
|
541
541
|
control,
|
@@ -4786,7 +4786,8 @@ const CreatePropertyFormFields = ({
|
|
4786
4786
|
children: customCheckboxes.map((field, index) => jsx(ControlCheckbox, {
|
4787
4787
|
control: control,
|
4788
4788
|
name: `${propertyFieldName}.${field.name}`,
|
4789
|
-
label: field.label
|
4789
|
+
label: field.label,
|
4790
|
+
checked: field.checked
|
4790
4791
|
}, index))
|
4791
4792
|
}) : null]
|
4792
4793
|
}), propertyType && jsxs(Fragment, {
|
package/package.json
CHANGED
package/src/interfaces/ui.d.ts
CHANGED
@@ -42,6 +42,7 @@ export type CustomPropertyFieldProps = {
|
|
42
42
|
label: string;
|
43
43
|
}[];
|
44
44
|
required?: boolean;
|
45
|
+
checked?: boolean;
|
45
46
|
};
|
46
47
|
export type PropertyFillType = 'expression' | 'widget' | 'null' | 'string' | 'json_valid' | 'json_notvalid' | 'dem_builder';
|
47
48
|
export type StatusVariant = 'default' | 'success' | 'error' | 'warning';
|
@@ -22,7 +22,6 @@ export type ControlCheckboxProps = CheckboxProps & {
|
|
22
22
|
/**
|
23
23
|
* React Hook Form `defaultValue`
|
24
24
|
*/
|
25
|
-
defaultValue?: unknown;
|
26
25
|
/**
|
27
26
|
* Is disabled input flag
|
28
27
|
*/
|
@@ -47,5 +46,5 @@ export type ControlCheckboxProps = CheckboxProps & {
|
|
47
46
|
* Material UI `Checkbox` controlled component. Used with react-hook-form
|
48
47
|
* @category Forms
|
49
48
|
*/
|
50
|
-
export declare const ControlCheckbox: ({ control, validate, name, label, required,
|
49
|
+
export declare const ControlCheckbox: ({ control, validate, name, label, required, disabled, hideErrorMessage, onChange: customOnChange, ...checkboxProps }: ControlCheckboxProps) => JSX.Element;
|
51
50
|
export default ControlCheckbox;
|