haya-select 1.0.30 → 1.0.32
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": "haya-select",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.32",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"license": "ISC",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"classnames": "^2.3.1",
|
|
13
|
-
"debounce": "^
|
|
13
|
+
"debounce": "^2.1.0",
|
|
14
14
|
"diggerize": "^1.0.4",
|
|
15
15
|
"fetching-object": "^1.0.1",
|
|
16
|
-
"set-state-compare": "^1.0.
|
|
16
|
+
"set-state-compare": "^1.0.43"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"prop-types": ">= 15.7.2",
|
package/src/select/index.jsx
CHANGED
|
@@ -311,7 +311,7 @@ export default memo(shapeComponent(class HayaSelect extends ShapeComponent {
|
|
|
311
311
|
|
|
312
312
|
loadOptionsFromArray(options, searchValue) {
|
|
313
313
|
const lowerSearchValue = searchValue?.toLowerCase()
|
|
314
|
-
const loadedOptions = options.filter(({text}) => !lowerSearchValue || text
|
|
314
|
+
const loadedOptions = options.filter(({text}) => !lowerSearchValue || text?.toLowerCase()?.includes(lowerSearchValue))
|
|
315
315
|
|
|
316
316
|
this.setState({loadedOptions})
|
|
317
317
|
}
|
|
@@ -357,7 +357,9 @@ export default memo(shapeComponent(class HayaSelect extends ShapeComponent {
|
|
|
357
357
|
focusTextInput = () => digg(this.tt.searchTextInputRef, "current").focus()
|
|
358
358
|
|
|
359
359
|
setOptionsPosition() {
|
|
360
|
-
if (!this.isActive())
|
|
360
|
+
if (!this.isActive()) {
|
|
361
|
+
return // Debounce after un-mount handeling.
|
|
362
|
+
}
|
|
361
363
|
|
|
362
364
|
this.setOptionsPositionBelow()
|
|
363
365
|
this.setOptionsPositionAboveIfOutsideScreen()
|