@abgov/jsonforms-components 1.42.8 → 1.42.9

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.
Files changed (2) hide show
  1. package/index.esm.js +7 -3
  2. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -5597,6 +5597,7 @@ const FormStepper = props => {
5597
5597
  const componentProps = (_b = (_a = uischema.options) === null || _a === void 0 ? void 0 : _a.componentProps) !== null && _b !== void 0 ? _b : {};
5598
5598
  const optionProps = uischema.options || {};
5599
5599
  const [step, setStep] = React.useState(0);
5600
+ const [staleCategories, setStaleCategories] = React.useState(categorization.elements);
5600
5601
  const [isFormValid, setIsFormValid] = React.useState(false);
5601
5602
  const [showNextBtn, setShowNextBtn] = React.useState(true);
5602
5603
  const [isOpen, setIsOpen] = React.useState(false);
@@ -5639,6 +5640,9 @@ const FormStepper = props => {
5639
5640
  setStep((componentProps === null || componentProps === void 0 ? void 0 : componentProps.controlledNav) ? 1 : 0);
5640
5641
  // eslint-disable-next-line react-hooks/exhaustive-deps
5641
5642
  }, []);
5643
+ useEffect(() => {
5644
+ setStaleCategories(categories);
5645
+ }, [categories]);
5642
5646
  /* istanbul ignore next */
5643
5647
  if ((categories === null || categories === void 0 ? void 0 : categories.length) < 1) {
5644
5648
  // eslint-disable-next-line
@@ -5700,7 +5704,7 @@ const FormStepper = props => {
5700
5704
  children: jsxs("div", {
5701
5705
  id: `${path || `goa`}-form-stepper`,
5702
5706
  className: "formStepper",
5703
- children: [jsxs(GoAFormStepper, {
5707
+ children: [categories.length === staleCategories.length && jsxs(GoAFormStepper, {
5704
5708
  testId: ((_e = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _e === void 0 ? void 0 : _e.testId) || 'form-stepper-test',
5705
5709
  step: step,
5706
5710
  onChange: step => {
@@ -8008,7 +8012,7 @@ const AddressLookUpControl = props => {
8008
8012
  };
8009
8013
  useEffect(() => {
8010
8014
  const fetchSuggestions = () => __awaiter(void 0, void 0, void 0, function* () {
8011
- if (searchTerm.length > 2 && searchTerm.charAt(searchTerm.length - 1) !== ' ') {
8015
+ if (searchTerm.length > 2) {
8012
8016
  setLoading(true);
8013
8017
  setOpen(true);
8014
8018
  yield fetchAddressSuggestions(formUrl, searchTerm, isAlbertaAddress).then(response => {
@@ -8059,7 +8063,7 @@ const AddressLookUpControl = props => {
8059
8063
  } else if (key === 'ArrowUp') {
8060
8064
  setSelectedIndex(prevIndex => prevIndex > 0 ? prevIndex - 1 : suggestions.length - 1);
8061
8065
  handleInputChange('addressLine1', value);
8062
- } else if (key === 'Enter' || key === ' ' && value.length > 2) {
8066
+ } else if (key === 'Enter') {
8063
8067
  handleInputChange('addressLine1', value);
8064
8068
  setLoading(false);
8065
8069
  if (selectedIndex >= 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/jsonforms-components",
3
- "version": "1.42.8",
3
+ "version": "1.42.9",
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",