haya-select 1.0.36 → 1.0.38

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.36",
3
+ "version": "1.0.38",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -363,7 +363,7 @@ export default memo(shapeComponent(class HayaSelect extends ShapeComponent {
363
363
  )
364
364
  }
365
365
 
366
- focusTextInput = () => digg(this.tt.searchTextInputRef, "current").focus()
366
+ focusTextInput = () => digg(this.tt.searchTextInputRef, "current")?.focus()
367
367
 
368
368
  setOptionsPosition() {
369
369
  if (!this.isActive()) {
@@ -406,7 +406,7 @@ export default memo(shapeComponent(class HayaSelect extends ShapeComponent {
406
406
  scrollLeft: document.documentElement.scrollLeft,
407
407
  scrollTop: document.documentElement.scrollTop
408
408
  },
409
- () => searchTextInputRef.current.focus()
409
+ () => this.focusTextInput()
410
410
  )
411
411
  }
412
412
 
@@ -426,7 +426,7 @@ export default memo(shapeComponent(class HayaSelect extends ShapeComponent {
426
426
  scrollLeft: document.documentElement.scrollLeft,
427
427
  scrollTop: document.documentElement.scrollTop
428
428
  },
429
- () => searchTextInputRef.current.focus()
429
+ () => this.focusTextInput()
430
430
  )
431
431
  }
432
432