wx-svelte-grid 2.1.4 → 2.1.5
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": "wx-svelte-grid",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.5",
|
|
4
4
|
"description": "A powerful and flexible DataGrid component written in Svelte",
|
|
5
5
|
"productTag": "grid",
|
|
6
6
|
"productTrial": false,
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"wx-lib-svelte": "0.5.1",
|
|
38
38
|
"wx-svelte-menu": "2.1.1",
|
|
39
39
|
"wx-svelte-core": "2.1.1",
|
|
40
|
-
"wx-grid-data-provider": "2.1.
|
|
41
|
-
"wx-grid-locales": "2.1.
|
|
42
|
-
"wx-grid-store": "2.1.
|
|
40
|
+
"wx-grid-data-provider": "2.1.5",
|
|
41
|
+
"wx-grid-locales": "2.1.5",
|
|
42
|
+
"wx-grid-store": "2.1.5"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"wx-svelte-editor": "2.1.2",
|
|
@@ -249,11 +249,12 @@
|
|
|
249
249
|
|
|
250
250
|
const hasVScroll = $derived(
|
|
251
251
|
clientWidth && clientHeight
|
|
252
|
-
? fullHeight + headerHeight + footerHeight
|
|
252
|
+
? fullHeight + headerHeight + footerHeight >=
|
|
253
|
+
clientHeight - (fullWidth >= clientWidth ? SCROLLSIZE : 0)
|
|
253
254
|
: false
|
|
254
255
|
);
|
|
255
256
|
const hasHScroll = $derived(
|
|
256
|
-
clientWidth && clientHeight ? fullWidth
|
|
257
|
+
clientWidth && clientHeight ? fullWidth >= clientWidth : false
|
|
257
258
|
);
|
|
258
259
|
|
|
259
260
|
// set global width
|
|
@@ -663,6 +664,9 @@
|
|
|
663
664
|
>
|
|
664
665
|
<div
|
|
665
666
|
class="wx-scroll"
|
|
667
|
+
style="overflow-x:{hasHScroll
|
|
668
|
+
? 'scroll'
|
|
669
|
+
: 'hidden'};overflow-y:{hasVScroll ? 'scroll' : 'hidden'};"
|
|
666
670
|
onscroll={onScroll}
|
|
667
671
|
use:scrollTo={{
|
|
668
672
|
scroll,
|
|
@@ -796,7 +800,6 @@
|
|
|
796
800
|
.wx-scroll {
|
|
797
801
|
position: relative;
|
|
798
802
|
flex: 1;
|
|
799
|
-
overflow: auto;
|
|
800
803
|
scroll-padding-top: var(--header-height);
|
|
801
804
|
scroll-padding-bottom: var(--footer-height);
|
|
802
805
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export function onresize(node, handler) {
|
|
2
|
-
const ro = new ResizeObserver(data =>
|
|
2
|
+
const ro = new ResizeObserver(data => {
|
|
3
|
+
requestAnimationFrame(() => handler(data[0].contentRect));
|
|
4
|
+
});
|
|
5
|
+
|
|
3
6
|
ro.observe(node.parentNode);
|
|
4
7
|
|
|
5
8
|
return {
|