@dipusevilla/componentes-iu 1.0.22 → 1.0.24
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.js +10 -10
- package/dist/index.es.js +2829 -2801
- package/dist/index.umd.js +11 -11
- package/dist/types/types/FormTypes.d.ts +8 -0
- package/package.json +1 -1
|
@@ -3,6 +3,10 @@ import { Size } from "../components/InputGroup";
|
|
|
3
3
|
import { InputProps } from "../components/Input";
|
|
4
4
|
import { SelectProps } from "../components/Select";
|
|
5
5
|
import { UseFormGetValues, UseFormWatch } from "react-hook-form";
|
|
6
|
+
export type Condition = {
|
|
7
|
+
watchField: string;
|
|
8
|
+
watchValue: unknown | ((vals: Record<string, unknown>) => boolean);
|
|
9
|
+
};
|
|
6
10
|
/**
|
|
7
11
|
* Tipo de campo atómico admitido.
|
|
8
12
|
*/
|
|
@@ -75,6 +79,10 @@ export interface FieldSchema {
|
|
|
75
79
|
watchField: string;
|
|
76
80
|
watchValue: unknown | ((allValues: Record<string, unknown>) => boolean);
|
|
77
81
|
};
|
|
82
|
+
clearWhen?: Condition & {
|
|
83
|
+
/** valor al que limpiar; por defecto '' */
|
|
84
|
+
clearTo?: unknown;
|
|
85
|
+
};
|
|
78
86
|
/** Deshabilitar manualmente. */
|
|
79
87
|
disabled?: boolean;
|
|
80
88
|
/** Para date: mostrar hora. */
|