glints-aries 4.0.355 → 4.0.356

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.
@@ -1,4 +1,5 @@
1
1
  import React, { useEffect, useState } from 'react';
2
+ import { isEmpty } from 'lodash-es';
2
3
  import { Popover } from '../Popover';
3
4
  import { Typography } from '../Typography';
4
5
  import { Neutral } from '../utilities/colors';
@@ -90,12 +91,15 @@ export var Select = function Select(_ref) {
90
91
  var handleSelectClick = function handleSelectClick() {
91
92
  setPopoverActive(!popoverActive);
92
93
  };
94
+ useEffect(function syncInputValueFromSearchableProps() {
95
+ setInputValue(searchableProps == null ? void 0 : searchableProps.inputValue);
96
+ }, [searchableProps == null ? void 0 : searchableProps.inputValue]);
93
97
  useEffect(function () {
94
98
  setMenuOptions(options);
95
99
  }, [options]);
96
100
  useEffect(function () {
97
101
  if (showPopoverOnFocus) return;
98
- if (inputValue != '' && optionsLength > 0) {
102
+ if (!isEmpty(inputValue) && optionsLength > 0) {
99
103
  setPopoverActive(true);
100
104
  }
101
105
  if (inputValue === '' && optionsLength < 1) {
@@ -3,6 +3,7 @@
3
3
  exports.__esModule = true;
4
4
  exports.Select = void 0;
5
5
  var _react = _interopRequireWildcard(require("react"));
6
+ var _lodash = require("lodash");
6
7
  var _Popover = require("../Popover");
7
8
  var _Typography = require("../Typography");
8
9
  var _colors = require("../utilities/colors");
@@ -96,12 +97,15 @@ var Select = function Select(_ref) {
96
97
  var handleSelectClick = function handleSelectClick() {
97
98
  setPopoverActive(!popoverActive);
98
99
  };
100
+ (0, _react.useEffect)(function syncInputValueFromSearchableProps() {
101
+ setInputValue(searchableProps == null ? void 0 : searchableProps.inputValue);
102
+ }, [searchableProps == null ? void 0 : searchableProps.inputValue]);
99
103
  (0, _react.useEffect)(function () {
100
104
  setMenuOptions(options);
101
105
  }, [options]);
102
106
  (0, _react.useEffect)(function () {
103
107
  if (showPopoverOnFocus) return;
104
- if (inputValue != '' && optionsLength > 0) {
108
+ if (!(0, _lodash.isEmpty)(inputValue) && optionsLength > 0) {
105
109
  setPopoverActive(true);
106
110
  }
107
111
  if (inputValue === '' && optionsLength < 1) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glints-aries",
3
- "version": "4.0.355",
3
+ "version": "4.0.356",
4
4
  "description": "Glints ui-kit for frontend",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./es/index.js",