@pushwoosh/dumb-components 1.1.176 → 1.1.177

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.
@@ -228,6 +228,17 @@ function SelectCombobox({
228
228
  onReachEnd: loadMore
229
229
  });
230
230
  const onShellMouseDown = useShellMouseDown(inputRef, isOpen, open);
231
+ const toggleOpen = useCallback(() => {
232
+ if (isOpen) {
233
+ var _inputRef$current3;
234
+ close();
235
+ (_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 || _inputRef$current3.blur();
236
+ } else {
237
+ var _inputRef$current4;
238
+ open();
239
+ (_inputRef$current4 = inputRef.current) === null || _inputRef$current4 === void 0 || _inputRef$current4.focus();
240
+ }
241
+ }, [isOpen, open, close]);
231
242
  useFieldOpenEffects({
232
243
  isOpen,
233
244
  open,
@@ -265,10 +276,12 @@ function SelectCombobox({
265
276
  onShellMouseDown: onShellMouseDown,
266
277
  onClose: close,
267
278
  showClear: !!(clearable && hasValue),
279
+ showChevron: true,
280
+ onToggle: toggleOpen,
268
281
  onClear: () => {
269
- var _inputRef$current3;
282
+ var _inputRef$current5;
270
283
  onChange(null);
271
- (_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 || _inputRef$current3.focus();
284
+ (_inputRef$current5 = inputRef.current) === null || _inputRef$current5 === void 0 || _inputRef$current5.focus();
272
285
  },
273
286
  dropdownItems: dropdownItems,
274
287
  emptyText: resolveDropdownText(emptyText, query),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/dumb-components",
3
- "version": "1.1.176",
3
+ "version": "1.1.177",
4
4
  "description": "React components to build Pushwoosh products",
5
5
  "main": "index.js",
6
6
  "module": "index.js",