@onehat/ui 0.3.341 → 0.3.343

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.341",
3
+ "version": "0.3.343",
4
4
  "description": "Base UI for OneHat apps",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -278,7 +278,6 @@ export function ComboComponent(props) {
278
278
  }
279
279
 
280
280
  setTextInputValue(value);
281
- showMenu();
282
281
 
283
282
  clearTimeout(typingTimeout.current);
284
283
  typingTimeout.current = setTimeout(() => {
@@ -409,12 +408,6 @@ export function ComboComponent(props) {
409
408
  }
410
409
  },
411
410
  searchForMatches = async (value) => {
412
- if (!isMenuShown) {
413
- showMenu();
414
- }
415
-
416
- setIsSearchMode(true);
417
-
418
411
  let found;
419
412
  if (Repository) {
420
413
  if (Repository.isLoading) {
@@ -464,6 +457,11 @@ export function ComboComponent(props) {
464
457
  });
465
458
  setFilteredData(found);
466
459
  }
460
+
461
+ if (!isMenuShown) {
462
+ showMenu();
463
+ }
464
+ setIsSearchMode(true);
467
465
  };
468
466
 
469
467
  useEffect(() => {
@@ -85,6 +85,13 @@ function TagComponent(props) {
85
85
  return;
86
86
  }
87
87
 
88
+ if (_.isNil(comboValue)) {
89
+ // NOTE: We *shouldn't* get here, but for some unknown reason, we *were* getting here on rare occasions.
90
+ // The combo was giving us null values, and the Tag dutifully added null values to its value array.
91
+ // Stop this from happening.
92
+ return;
93
+ }
94
+
88
95
  // make sure value doesn't already exist
89
96
  let exists = false;
90
97
  _.each(value, (val) => {