@smart-react-components/ui 2.0.0-alpha-31 → 2.0.0-alpha-33

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.
@@ -23,7 +23,7 @@ const TableContainer = props => {
23
23
  `;
24
24
  let left = 0;
25
25
  let leftZIndex = x + 1;
26
- const xEls = el.current.querySelectorAll('table > * > tr > *');
26
+ const xEls = el.current.querySelectorAll('table:first-child > * > tr > *');
27
27
  if (x > 0 && xEls.length > 0) {
28
28
  if (props.hasInternalScroll) {
29
29
  styled += 'overflow-x: auto;';
@@ -38,22 +38,17 @@ const TableContainer = props => {
38
38
  left += xEls[i].offsetWidth;
39
39
  }
40
40
  }
41
- const yEls = el.current.querySelectorAll('table > thead > tr');
41
+ const yEls = el.current.querySelectorAll('table:first-child > thead > tr');
42
42
  if (y > 0 && yEls.length > 0) {
43
43
  if (props.hasInternalScroll) {
44
44
  styled += 'overflow-y: auto;';
45
45
  }
46
- styled += `
47
- > table > thead {
48
- position: relative;
49
- z-index: ${(x !== null && x !== void 0 ? x : 0) + 1 + 1};
50
- }
51
- `;
52
46
  for (let i = yEls.length - 1; i > yEls.length - 1 - y; i--) {
53
47
  const top = yEls[i].offsetTop;
54
48
  styled += `
55
49
  > table > thead > tr:nth-of-type(${i + 1}) > * {
56
50
  top: ${top}px;
51
+ ${(!x || xEls.length === 0) ? `z-index: ${i};` : ''}
57
52
  }
58
53
  `;
59
54
  }
@@ -71,6 +66,8 @@ const TableContainer = props => {
71
66
  };
72
67
  TableContainer.defaultProps = {
73
68
  elementProps: {},
69
+ flex: '1 1 auto',
74
70
  hasInternalScroll: true,
71
+ minHeight: 1,
75
72
  };
76
73
  exports.default = TableContainer;
@@ -9,6 +9,7 @@ const styled_components_1 = __importDefault(require("styled-components"));
9
9
  const css_1 = require("../../util/css");
10
10
  exports.Content = styled_components_1.default.div `
11
11
  flex: 1 1 auto;
12
+ min-width: 1px;
12
13
  `;
13
14
  exports.default = (0, styled_components_1.default)(Div_1.default).attrs(({ hasIconLeft, hasIconRight }) => ({
14
15
  getAlertSize: (v, t) => `
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smart-react-components/ui",
3
- "version": "2.0.0-alpha-31",
3
+ "version": "2.0.0-alpha-33",
4
4
  "license": "MIT",
5
5
  "main": "index.js",
6
6
  "description": "SRC UI includes React and Styled components.",