@abgov/jsonforms-components 1.5.0 → 1.5.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 +11 -9
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -3914,15 +3914,17 @@ const FormStepper = ({
|
|
|
3914
3914
|
}
|
|
3915
3915
|
function setTab(page) {
|
|
3916
3916
|
const rawCategoryLabels = rawCategories.elements.map(category => category.label);
|
|
3917
|
-
if (
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
page
|
|
3917
|
+
if (rawCategoryLabels.length !== CategoryLabels.length) {
|
|
3918
|
+
if (page > 1 && page <= rawCategoryLabels.length) {
|
|
3919
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3920
|
+
const selectedTabLabel = rawCategoryLabels[page - 1];
|
|
3921
|
+
const selectedTab = CategoryLabels.indexOf(selectedTabLabel);
|
|
3922
|
+
const newStep = selectedTab !== -1 ? selectedTab + 1 : page;
|
|
3923
|
+
page = newStep;
|
|
3924
|
+
}
|
|
3925
|
+
if (page > rawCategoryLabels.length) {
|
|
3926
|
+
page = page - 1;
|
|
3927
|
+
}
|
|
3926
3928
|
}
|
|
3927
3929
|
setStep(page);
|
|
3928
3930
|
if (page < 1 || page > categories.length + 1) return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.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",
|