@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
|
@@ -758,14 +758,16 @@ export function ComboComponent(props) {
|
|
|
758
758
|
}}
|
|
759
759
|
onSave={(selection) => {
|
|
760
760
|
const entity = selection[0];
|
|
761
|
-
if (
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
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);
|