@snapdragonsnursery/react-components 1.1.6 → 1.1.7

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": "@snapdragonsnursery/react-components",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -640,7 +640,8 @@ const ChildSearchModal = ({
640
640
 
641
641
  {/* Content */}
642
642
  <div
643
- className="flex-1 overflow-hidden min-h-0"
643
+ className="flex-1 overflow-hidden min-h-0 max-h-0"
644
+ style={{ maxHeight: 'calc(90vh - 200px)' }}
644
645
  ref={(el) => {
645
646
  if (el) {
646
647
  const rect = el.getBoundingClientRect();
@@ -651,7 +652,8 @@ const ChildSearchModal = ({
651
652
  computedStyle: window.getComputedStyle(el),
652
653
  flexGrow: window.getComputedStyle(el).flexGrow,
653
654
  flexShrink: window.getComputedStyle(el).flexShrink,
654
- minHeight: window.getComputedStyle(el).minHeight
655
+ minHeight: window.getComputedStyle(el).minHeight,
656
+ maxHeight: window.getComputedStyle(el).maxHeight
655
657
  });
656
658
  }
657
659
  }}
@@ -673,6 +675,7 @@ const ChildSearchModal = ({
673
675
  {!loading && !error && (
674
676
  <div
675
677
  className="overflow-y-auto h-full max-h-full"
678
+ style={{ maxHeight: '100%' }}
676
679
  ref={(el) => {
677
680
  if (el) {
678
681
  const rect = el.getBoundingClientRect();
@@ -681,7 +684,8 @@ const ChildSearchModal = ({
681
684
  clientHeight: el.clientHeight,
682
685
  scrollTop: el.scrollTop,
683
686
  contentHeight: rect.height,
684
- hasOverflow: el.scrollHeight > el.clientHeight
687
+ hasOverflow: el.scrollHeight > el.clientHeight,
688
+ parentHeight: el.parentElement?.offsetHeight
685
689
  });
686
690
  }
687
691
  }}