@onehat/ui 0.3.192 → 0.3.195

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onehat/ui",
3
- "version": "0.3.192",
3
+ "version": "0.3.195",
4
4
  "description": "Base UI for OneHat apps",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -758,14 +758,16 @@ export function ComboComponent(props) {
758
758
  }}
759
759
  onSave={(selection) => {
760
760
  const entity = selection[0];
761
- if (entity?.id !== value && !isInTag) { // Tag doesn't use value, so don't do this comparison in the Tag
762
- // Either a phantom record was just solidified into a real record, or a new (non-phantom) record was added.
763
- // Select it and set the value of the combo.
764
- setGridSelection(selection);
765
- setValue(entity.id);
766
- } else {
767
- // we're not changing the Combo's value, but we might still need to change its displayValue
768
- setDisplayValue(entity.id);
761
+ if (!isInTag) {
762
+ if (entity?.id !== value) { // Tag doesn't use value, so don't do this comparison in the Tag
763
+ // Either a phantom record was just solidified into a real record, or a new (non-phantom) record was added.
764
+ // Select it and set the value of the combo.
765
+ setGridSelection(selection);
766
+ setValue(entity.id);
767
+ } else {
768
+ // we're not changing the Combo's value, but we might still need to change its displayValue
769
+ setDisplayValue(entity.id);
770
+ }
769
771
  }
770
772
  if (onGridSave) {
771
773
  onGridSave(selection);
@@ -814,7 +814,7 @@ function Form(props) {
814
814
  }
815
815
  }
816
816
 
817
- if (!_.isEmpty(formState.errors) || !formState.isValid) {
817
+ if (!formState.isValid) {
818
818
  isSaveDisabled = true;
819
819
  isSubmitDisabled = true;
820
820
  }