@db-ux/react-core-components 2.2.2 → 2.2.3-getBoundingClientRect-a18038f

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.
@@ -83,6 +83,21 @@ export const handleFixedDropdown = (element, parent, placement) => {
83
83
  element.style.position = 'fixed';
84
84
  };
85
85
  const getFloatingProps = (element, parent, placement) => {
86
+ if (!element || !parent) {
87
+ return {
88
+ top: 0,
89
+ bottom: 0,
90
+ right: 0,
91
+ height: 0,
92
+ width: 0,
93
+ left: 0,
94
+ childHeight: 0,
95
+ childWidth: 0,
96
+ correctedPlacement: placement,
97
+ innerWidth: window.innerWidth,
98
+ innerHeight: window.innerHeight
99
+ };
100
+ }
86
101
  const childRect = element.getBoundingClientRect();
87
102
  const { top, height, bottom, right, left, width } = parent.getBoundingClientRect();
88
103
  const { innerHeight, innerWidth } = window;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@db-ux/react-core-components",
3
- "version": "2.2.2",
3
+ "version": "2.2.3-getBoundingClientRect-a18038f",
4
4
  "description": "React components for @db-ux/core-components",
5
5
  "repository": {
6
6
  "type": "git",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "sideEffects": false,
40
40
  "dependencies": {
41
- "@db-ux/core-components": "2.2.2",
42
- "@db-ux/core-foundations": "2.2.2"
41
+ "@db-ux/core-components": "2.2.3-getBoundingClientRect-a18038f",
42
+ "@db-ux/core-foundations": "2.2.3-getBoundingClientRect-a18038f"
43
43
  }
44
44
  }