@jobber/components 2.80.0 → 2.80.1
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/CHANGELOG.md +11 -0
- package/dist/Chips/index.js +9 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,17 @@ menu: Changelog
|
|
|
8
8
|
All notable changes to this project will be documented in this file.
|
|
9
9
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
10
10
|
|
|
11
|
+
## [2.80.1](https://github.com/GetJobber/atlantis/compare/@jobber/components@2.80.0...@jobber/components@2.80.1) (2022-04-05)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* disable enter press on chip menu debounce ([#874](https://github.com/GetJobber/atlantis/issues/874)) ([569e4d3](https://github.com/GetJobber/atlantis/commit/569e4d317369fc6af12f2603d9212a159fb88602))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
11
22
|
# [2.80.0](https://github.com/GetJobber/atlantis/compare/@jobber/components@2.79.0...@jobber/components@2.80.0) (2022-04-05)
|
|
12
23
|
|
|
13
24
|
|
package/dist/Chips/index.js
CHANGED
|
@@ -277,6 +277,7 @@ function useInternalChipDismissible(_a) {
|
|
|
277
277
|
}
|
|
278
278
|
|
|
279
279
|
var menuId = uuid.v1();
|
|
280
|
+
// eslint-disable-next-line max-statements
|
|
280
281
|
function useInternalChipDismissibleInput(_a) {
|
|
281
282
|
var options = _a.options, _b = _a.isLoadingMore, isLoadingMore = _b === void 0 ? false : _b, onCustomOptionSelect = _a.onCustomOptionSelect, onOptionSelect = _a.onOptionSelect, onSearch = _a.onSearch;
|
|
282
283
|
var _c = __chunk_1.__read(React.useState([]), 2), allOptions = _c[0], setAllOptions = _c[1];
|
|
@@ -284,6 +285,7 @@ function useInternalChipDismissibleInput(_a) {
|
|
|
284
285
|
var _e = __chunk_1.__read(React.useState(false), 2), menuOpen = _e[0], setMenuOpen = _e[1];
|
|
285
286
|
var _f = __chunk_1.__read(React.useState(0), 2), activeIndex = _f[0], setActiveIndex = _f[1];
|
|
286
287
|
var _g = __chunk_1.__read(React.useState(false), 2), shouldCancelBlur = _g[0], setShouldCancelBlur = _g[1];
|
|
288
|
+
var _h = __chunk_1.__read(React.useState(false), 2), shouldCancelEnter = _h[0], setShouldCancelEnter = _h[1];
|
|
287
289
|
var canAddCustomOption = onCustomOptionSelect !== undefined && !isLoadingMore;
|
|
288
290
|
var maxOptionIndex = allOptions.length - 1;
|
|
289
291
|
var liveAnnounce = hooks.useLiveAnnounce().liveAnnounce;
|
|
@@ -320,6 +322,7 @@ function useInternalChipDismissibleInput(_a) {
|
|
|
320
322
|
handleSearchChange: function (event) {
|
|
321
323
|
setActiveIndex(0);
|
|
322
324
|
setSearchValue(event.currentTarget.value);
|
|
325
|
+
setShouldCancelEnter(true);
|
|
323
326
|
},
|
|
324
327
|
handleSetActiveOnMouseOver: function (index) {
|
|
325
328
|
return function () { return setActiveIndex(index); };
|
|
@@ -338,7 +341,11 @@ function useInternalChipDismissibleInput(_a) {
|
|
|
338
341
|
},
|
|
339
342
|
handleKeyDown: function (event) {
|
|
340
343
|
var callbacks = {
|
|
341
|
-
Enter: function () {
|
|
344
|
+
Enter: function () {
|
|
345
|
+
if (shouldCancelEnter)
|
|
346
|
+
return;
|
|
347
|
+
actions.handleSelectOption(computed.activeOption);
|
|
348
|
+
},
|
|
342
349
|
Tab: function () { return actions.handleSelectOption(computed.activeOption); },
|
|
343
350
|
",": function () {
|
|
344
351
|
if (searchValue.length === 0)
|
|
@@ -368,6 +375,7 @@ function useInternalChipDismissibleInput(_a) {
|
|
|
368
375
|
handleDebouncedSearch: lodash.debounce(function () {
|
|
369
376
|
onSearch && onSearch(searchValue);
|
|
370
377
|
setAllOptions(generateOptions(options, searchValue, canAddCustomOption));
|
|
378
|
+
setShouldCancelEnter(false);
|
|
371
379
|
}, 300),
|
|
372
380
|
};
|
|
373
381
|
return __chunk_1.__assign(__chunk_1.__assign(__chunk_1.__assign(__chunk_1.__assign({}, actions), { activeIndex: activeIndex,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components",
|
|
3
|
-
"version": "2.80.
|
|
3
|
+
"version": "2.80.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
"> 1%",
|
|
86
86
|
"IE 10"
|
|
87
87
|
],
|
|
88
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "b5aec350795fb765bcd3487362b962eaa52751e4"
|
|
89
89
|
}
|