@abgov/jsonforms-components 2.43.0 → 2.43.1
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 +8 -0
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -9361,6 +9361,7 @@ const RenderPages = props => {
|
|
|
9361
9361
|
const saveFormFunction = enumerators === null || enumerators === void 0 ? void 0 : enumerators.saveFunction.get('save-form');
|
|
9362
9362
|
const saveForm = saveFormFunction && saveFormFunction();
|
|
9363
9363
|
const [isOpen, setIsOpen] = useState(false);
|
|
9364
|
+
const topElementRef = useRef(null);
|
|
9364
9365
|
const handleSubmit = () => {
|
|
9365
9366
|
if (submitForm) {
|
|
9366
9367
|
submitForm(data);
|
|
@@ -9378,6 +9379,7 @@ const RenderPages = props => {
|
|
|
9378
9379
|
};
|
|
9379
9380
|
return jsxs("div", {
|
|
9380
9381
|
"data-testid": "form-stepper-test-wrapper",
|
|
9382
|
+
ref: topElementRef,
|
|
9381
9383
|
children: [jsx(Visible, {
|
|
9382
9384
|
visible: visible,
|
|
9383
9385
|
children: jsx("div", {
|
|
@@ -9429,6 +9431,9 @@ const RenderPages = props => {
|
|
|
9429
9431
|
prevId = prevId - 1;
|
|
9430
9432
|
}
|
|
9431
9433
|
if (prevId >= 0) {
|
|
9434
|
+
if (topElementRef.current) {
|
|
9435
|
+
topElementRef.current.scrollIntoView();
|
|
9436
|
+
}
|
|
9432
9437
|
goToPage(prevId);
|
|
9433
9438
|
}
|
|
9434
9439
|
},
|
|
@@ -9446,6 +9451,9 @@ const RenderPages = props => {
|
|
|
9446
9451
|
nextId = nextId + 1;
|
|
9447
9452
|
}
|
|
9448
9453
|
if (!(currentStep === totalSteps && hideSummary)) {
|
|
9454
|
+
if (topElementRef.current) {
|
|
9455
|
+
topElementRef.current.scrollIntoView();
|
|
9456
|
+
}
|
|
9449
9457
|
goToPage(nextId);
|
|
9450
9458
|
}
|
|
9451
9459
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "2.43.
|
|
3
|
+
"version": "2.43.1",
|
|
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",
|