baseui 0.0.0-alpha-d3f908b → 0.0.0-alpha-fa426d6
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.
|
@@ -48,10 +48,7 @@ function MeasureColumn(_ref) {
|
|
|
48
48
|
React.useEffect(function () {
|
|
49
49
|
if (typeof document !== 'undefined') {
|
|
50
50
|
if (ref.current) {
|
|
51
|
-
|
|
52
|
-
onLayout(columnIndex, {
|
|
53
|
-
width: 0
|
|
54
|
-
});
|
|
51
|
+
onLayout(columnIndex, ref.current.getBoundingClientRect());
|
|
55
52
|
}
|
|
56
53
|
}
|
|
57
54
|
}, []);
|
|
@@ -142,9 +139,7 @@ function MeasureColumnWidths(_ref2) {
|
|
|
142
139
|
return generateSampleIndices(0, rows.length - 1, sampleSize);
|
|
143
140
|
}, [columns, rows, widths, sampleSize]);
|
|
144
141
|
var handleDimensionsChange = React.useCallback(function (columnIndex, dimensions) {
|
|
145
|
-
console.log('handle dimensions change', columnIndex, dimensions);
|
|
146
142
|
var nextWidth = Math.min(Math.max(columns[columnIndex].minWidth || 0, widthMap.get(columnIndex) || 0, dimensions.width + 1), columns[columnIndex].maxWidth || Infinity);
|
|
147
|
-
console.log('next width', columnIndex, nextWidth);
|
|
148
143
|
|
|
149
144
|
if (nextWidth !== widthMap.get(columnIndex)) {
|
|
150
145
|
widthMap.set(columnIndex, nextWidth);
|
|
@@ -29,8 +29,7 @@ function MeasureColumn({
|
|
|
29
29
|
React.useEffect(() => {
|
|
30
30
|
if (__BROWSER__) {
|
|
31
31
|
if (ref.current) {
|
|
32
|
-
|
|
33
|
-
onLayout(columnIndex, {width: 0});
|
|
32
|
+
onLayout(columnIndex, ref.current.getBoundingClientRect());
|
|
34
33
|
}
|
|
35
34
|
}
|
|
36
35
|
}, []);
|
|
@@ -134,7 +133,6 @@ export default function MeasureColumnWidths({
|
|
|
134
133
|
|
|
135
134
|
const handleDimensionsChange = React.useCallback(
|
|
136
135
|
(columnIndex, dimensions) => {
|
|
137
|
-
console.log('handle dimensions change', columnIndex, dimensions);
|
|
138
136
|
const nextWidth = Math.min(
|
|
139
137
|
Math.max(
|
|
140
138
|
columns[columnIndex].minWidth || 0,
|
|
@@ -143,7 +141,6 @@ export default function MeasureColumnWidths({
|
|
|
143
141
|
),
|
|
144
142
|
columns[columnIndex].maxWidth || Infinity,
|
|
145
143
|
);
|
|
146
|
-
console.log('next width', columnIndex, nextWidth);
|
|
147
144
|
|
|
148
145
|
if (nextWidth !== widthMap.get(columnIndex)) {
|
|
149
146
|
widthMap.set(columnIndex, nextWidth);
|
|
@@ -22,10 +22,7 @@ function MeasureColumn({
|
|
|
22
22
|
React.useEffect(() => {
|
|
23
23
|
if (typeof document !== 'undefined') {
|
|
24
24
|
if (ref.current) {
|
|
25
|
-
|
|
26
|
-
onLayout(columnIndex, {
|
|
27
|
-
width: 0
|
|
28
|
-
});
|
|
25
|
+
onLayout(columnIndex, ref.current.getBoundingClientRect());
|
|
29
26
|
}
|
|
30
27
|
}
|
|
31
28
|
}, []);
|
|
@@ -110,9 +107,7 @@ export default function MeasureColumnWidths({
|
|
|
110
107
|
return generateSampleIndices(0, rows.length - 1, sampleSize);
|
|
111
108
|
}, [columns, rows, widths, sampleSize]);
|
|
112
109
|
const handleDimensionsChange = React.useCallback((columnIndex, dimensions) => {
|
|
113
|
-
console.log('handle dimensions change', columnIndex, dimensions);
|
|
114
110
|
const nextWidth = Math.min(Math.max(columns[columnIndex].minWidth || 0, widthMap.get(columnIndex) || 0, dimensions.width + 1), columns[columnIndex].maxWidth || Infinity);
|
|
115
|
-
console.log('next width', columnIndex, nextWidth);
|
|
116
111
|
|
|
117
112
|
if (nextWidth !== widthMap.get(columnIndex)) {
|
|
118
113
|
widthMap.set(columnIndex, nextWidth);
|
|
@@ -37,10 +37,7 @@ function MeasureColumn(_ref) {
|
|
|
37
37
|
React.useEffect(function () {
|
|
38
38
|
if (typeof document !== 'undefined') {
|
|
39
39
|
if (ref.current) {
|
|
40
|
-
|
|
41
|
-
onLayout(columnIndex, {
|
|
42
|
-
width: 0
|
|
43
|
-
});
|
|
40
|
+
onLayout(columnIndex, ref.current.getBoundingClientRect());
|
|
44
41
|
}
|
|
45
42
|
}
|
|
46
43
|
}, []);
|
|
@@ -131,9 +128,7 @@ export default function MeasureColumnWidths(_ref2) {
|
|
|
131
128
|
return generateSampleIndices(0, rows.length - 1, sampleSize);
|
|
132
129
|
}, [columns, rows, widths, sampleSize]);
|
|
133
130
|
var handleDimensionsChange = React.useCallback(function (columnIndex, dimensions) {
|
|
134
|
-
console.log('handle dimensions change', columnIndex, dimensions);
|
|
135
131
|
var nextWidth = Math.min(Math.max(columns[columnIndex].minWidth || 0, widthMap.get(columnIndex) || 0, dimensions.width + 1), columns[columnIndex].maxWidth || Infinity);
|
|
136
|
-
console.log('next width', columnIndex, nextWidth);
|
|
137
132
|
|
|
138
133
|
if (nextWidth !== widthMap.get(columnIndex)) {
|
|
139
134
|
widthMap.set(columnIndex, nextWidth);
|