haya-select 1.0.54 → 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 +1 -1
- package/src/select/index.jsx +8 -6
package/package.json
CHANGED
package/src/select/index.jsx
CHANGED
|
@@ -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
|
-
|
|
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 +
|
|
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
|
|
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
|
|
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
|
|
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)}}
|