@abgov/jsonforms-components 2.64.6 → 2.64.7
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.esm.js +9 -4
- package/package.json +1 -1
- package/renderer-catalog.json +2 -2
package/index.esm.js
CHANGED
|
@@ -7351,21 +7351,26 @@ const InnerGoAInputText = props => {
|
|
|
7351
7351
|
const [manualInput, setManualInput] = useState(false);
|
|
7352
7352
|
const [localValue, setLocalValue] = useState(initialValue);
|
|
7353
7353
|
const debouncedValue = useDebounce(localValue, 300);
|
|
7354
|
+
const hasDefault = Object.prototype.hasOwnProperty.call(schema, 'default');
|
|
7354
7355
|
useEffect(() => {
|
|
7356
|
+
if (data === undefined || data === null) {
|
|
7357
|
+
return;
|
|
7358
|
+
}
|
|
7355
7359
|
setLocalValue(isSinField && typeof data === 'string' ? formatSinForDisplay(data) : data);
|
|
7356
7360
|
}, [data, isSinField]);
|
|
7357
7361
|
useEffect(() => {
|
|
7358
|
-
if (!user || data) return;
|
|
7359
|
-
const autoPopulatedValue =
|
|
7360
|
-
if (autoPopulatedValue && autoPopulatedValue !== data
|
|
7362
|
+
if (!user || data || manualInput || hasDefault) return;
|
|
7363
|
+
const autoPopulatedValue = autoPopulateValue(user, props);
|
|
7364
|
+
if (autoPopulatedValue && autoPopulatedValue !== data) {
|
|
7361
7365
|
handleChange(props.path, autoPopulatedValue);
|
|
7362
7366
|
setLocalValue(autoPopulatedValue);
|
|
7363
7367
|
}
|
|
7364
7368
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7365
7369
|
}, [user]);
|
|
7366
7370
|
useEffect(() => {
|
|
7367
|
-
if (typeof handleChange === 'function' &&
|
|
7371
|
+
if (typeof handleChange === 'function' && hasDefault && !manualInput) {
|
|
7368
7372
|
handleChange(props.path, schema.default);
|
|
7373
|
+
setLocalValue(schema.default);
|
|
7369
7374
|
}
|
|
7370
7375
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7371
7376
|
}, [schema.default]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "2.64.
|
|
3
|
+
"version": "2.64.7",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Government of Alberta - React renderers for JSON Forms based on the design system.",
|
|
6
6
|
"repository": "https://github.com/GovAlta/adsp-monorepo",
|
package/renderer-catalog.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
|
-
"generatedAt": "2026-05-
|
|
4
|
-
"sourceCommit": "
|
|
3
|
+
"generatedAt": "2026-05-28T19:15:57.492Z",
|
|
4
|
+
"sourceCommit": "46f246351769be0ffb3415361c87d5bbe15521f2",
|
|
5
5
|
"sourcePath": "libs/jsonforms-components/src/index.ts",
|
|
6
6
|
"rendererCount": 33,
|
|
7
7
|
"renderers": [
|