haya-select 1.0.53 → 1.0.55

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.53",
3
+ "version": "1.0.55",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -16,7 +16,7 @@
16
16
  "set-state-compare": "^1.0.45"
17
17
  },
18
18
  "peerDependencies": {
19
- "conjointment": ">= 0.1.3",
19
+ "conjointment": ">= 0.1.4",
20
20
  "prop-types": ">= 15.7.2",
21
21
  "react": ">= 16.0.0"
22
22
  }
@@ -575,7 +575,7 @@ export default memo(shapeComponent(class HayaSelect extends ShapeComponent {
575
575
  const {selectContainerLayout, loadedOptions, endOfSelectLayout, optionsContainerLayout, optionsPlacement, optionsVisibility} = this.s
576
576
  let left, top
577
577
 
578
- const style = this.stylingFor("optionsContainer", {
578
+ let style = {
579
579
  position: "absolute",
580
580
  zIndex: 99999,
581
581
  elevation: 99999,
@@ -585,7 +585,7 @@ export default memo(shapeComponent(class HayaSelect extends ShapeComponent {
585
585
  border: "1px solid #999",
586
586
  maxHeight: 300,
587
587
  overflowY: "auto"
588
- })
588
+ }
589
589
 
590
590
  if (!optionsAbsolute) {
591
591
  style.left = 0
@@ -593,10 +593,10 @@ export default memo(shapeComponent(class HayaSelect extends ShapeComponent {
593
593
  } else if (optionsPlacement == "below") {
594
594
  if (Platform.OS == "web") {
595
595
  // onLayout top value is sometimes negative so use browser JS to get it instead
596
- top = digg(this.tt.endOfSelectRef.current.getBoundingClientRect(), "top") + document.documentElement.scrollTop + 2
596
+ top = digg(this.tt.endOfSelectRef.current.getBoundingClientRect(), "top") + document.documentElement.scrollTop + 1
597
597
 
598
598
  // onLayout left values doesn't always update when changed
599
- left = digg(this.tt.endOfSelectRef.current.getBoundingClientRect(), "left") + document.documentElement.scrollLeft + 2
599
+ left = digg(this.tt.endOfSelectRef.current.getBoundingClientRect(), "left") + document.documentElement.scrollLeft
600
600
  } else {
601
601
  left = this.s.endOfSelectLayout.left
602
602
  top = selectContainerLayout.top
@@ -607,10 +607,10 @@ export default memo(shapeComponent(class HayaSelect extends ShapeComponent {
607
607
  } else if (optionsPlacement == "above") {
608
608
  if (Platform.OS == "web") {
609
609
  // onLayout top value is sometimes negative so use browser JS to get it instead
610
- top = digg(this.tt.selectContainerRef.current.getBoundingClientRect(), "top") + document.documentElement.scrollTop - 1
610
+ top = digg(this.tt.selectContainerRef.current.getBoundingClientRect(), "top") + document.documentElement.scrollTop
611
611
 
612
612
  // onLayout left values doesn't always update when changed
613
- left = digg(this.tt.selectContainerRef.current.getBoundingClientRect(), "left") + document.documentElement.scrollLeft - 1
613
+ left = digg(this.tt.selectContainerRef.current.getBoundingClientRect(), "left") + document.documentElement.scrollLeft
614
614
  } else {
615
615
  left = endOfSelectLayout.left
616
616
  top = selectContainerLayout.top
@@ -622,6 +622,8 @@ export default memo(shapeComponent(class HayaSelect extends ShapeComponent {
622
622
  throw new Error(`Unkonwn options placement: ${optionsPlacement}`)
623
623
  }
624
624
 
625
+ style = this.stylingFor("optionsContainer", style)
626
+
625
627
  return (
626
628
  <View
627
629
  dataSet={{class: "options-container", id: idForComponent(this)}}