@regcheq/ui-vue-2 1.7.0 → 1.8.0
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/dist/index.esm.js +23 -2
- package/dist/index.js +23 -2
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -37688,7 +37688,7 @@ var script$4 = {
|
|
|
37688
37688
|
},
|
|
37689
37689
|
maxHeight: {
|
|
37690
37690
|
type: Number,
|
|
37691
|
-
default:
|
|
37691
|
+
default: 460
|
|
37692
37692
|
},
|
|
37693
37693
|
expandable: {
|
|
37694
37694
|
type: Boolean,
|
|
@@ -37857,6 +37857,27 @@ var script$4 = {
|
|
|
37857
37857
|
toggleExpand(rowId) {
|
|
37858
37858
|
this.expandedRowId = this.expandedRowId === rowId ? null : rowId;
|
|
37859
37859
|
this.$emit('update:expanded-row-id', this.expandedRowId);
|
|
37860
|
+
if (this.expandedRowId) {
|
|
37861
|
+
this.$nextTick(() => this.scrollExpandedIntoView());
|
|
37862
|
+
}
|
|
37863
|
+
},
|
|
37864
|
+
// Al expandir una fila, scrollea el contenedor propio de la tabla para
|
|
37865
|
+
// hacer visible el contenido desplegado (no toca el scroll de la página).
|
|
37866
|
+
scrollExpandedIntoView() {
|
|
37867
|
+
const scroll = this.$el.querySelector('.rq-table__scroll');
|
|
37868
|
+
const expanded = this.$el.querySelector('.rq-table__tr--expanded');
|
|
37869
|
+
if (!scroll || !expanded) return;
|
|
37870
|
+
const scrollRect = scroll.getBoundingClientRect();
|
|
37871
|
+
const expandedRect = expanded.getBoundingClientRect();
|
|
37872
|
+
const bottomDelta = expandedRect.bottom - scrollRect.bottom;
|
|
37873
|
+
if (bottomDelta > 0) {
|
|
37874
|
+
// no scrollear más allá de dejar el inicio del contenido visible
|
|
37875
|
+
const topDelta = expandedRect.top - scrollRect.top;
|
|
37876
|
+
scroll.scrollTo({
|
|
37877
|
+
top: scroll.scrollTop + Math.min(bottomDelta, topDelta),
|
|
37878
|
+
behavior: 'smooth'
|
|
37879
|
+
});
|
|
37880
|
+
}
|
|
37860
37881
|
},
|
|
37861
37882
|
cellKey(rowId, headerId) {
|
|
37862
37883
|
return `${rowId}::${headerId}`;
|
|
@@ -38355,7 +38376,7 @@ var script$3 = {
|
|
|
38355
38376
|
},
|
|
38356
38377
|
maxHeight: {
|
|
38357
38378
|
type: Number,
|
|
38358
|
-
default:
|
|
38379
|
+
default: 460
|
|
38359
38380
|
},
|
|
38360
38381
|
deleteLabel: {
|
|
38361
38382
|
type: String,
|
package/dist/index.js
CHANGED
|
@@ -37690,7 +37690,7 @@ var script$4 = {
|
|
|
37690
37690
|
},
|
|
37691
37691
|
maxHeight: {
|
|
37692
37692
|
type: Number,
|
|
37693
|
-
default:
|
|
37693
|
+
default: 460
|
|
37694
37694
|
},
|
|
37695
37695
|
expandable: {
|
|
37696
37696
|
type: Boolean,
|
|
@@ -37859,6 +37859,27 @@ var script$4 = {
|
|
|
37859
37859
|
toggleExpand(rowId) {
|
|
37860
37860
|
this.expandedRowId = this.expandedRowId === rowId ? null : rowId;
|
|
37861
37861
|
this.$emit('update:expanded-row-id', this.expandedRowId);
|
|
37862
|
+
if (this.expandedRowId) {
|
|
37863
|
+
this.$nextTick(() => this.scrollExpandedIntoView());
|
|
37864
|
+
}
|
|
37865
|
+
},
|
|
37866
|
+
// Al expandir una fila, scrollea el contenedor propio de la tabla para
|
|
37867
|
+
// hacer visible el contenido desplegado (no toca el scroll de la página).
|
|
37868
|
+
scrollExpandedIntoView() {
|
|
37869
|
+
const scroll = this.$el.querySelector('.rq-table__scroll');
|
|
37870
|
+
const expanded = this.$el.querySelector('.rq-table__tr--expanded');
|
|
37871
|
+
if (!scroll || !expanded) return;
|
|
37872
|
+
const scrollRect = scroll.getBoundingClientRect();
|
|
37873
|
+
const expandedRect = expanded.getBoundingClientRect();
|
|
37874
|
+
const bottomDelta = expandedRect.bottom - scrollRect.bottom;
|
|
37875
|
+
if (bottomDelta > 0) {
|
|
37876
|
+
// no scrollear más allá de dejar el inicio del contenido visible
|
|
37877
|
+
const topDelta = expandedRect.top - scrollRect.top;
|
|
37878
|
+
scroll.scrollTo({
|
|
37879
|
+
top: scroll.scrollTop + Math.min(bottomDelta, topDelta),
|
|
37880
|
+
behavior: 'smooth'
|
|
37881
|
+
});
|
|
37882
|
+
}
|
|
37862
37883
|
},
|
|
37863
37884
|
cellKey(rowId, headerId) {
|
|
37864
37885
|
return `${rowId}::${headerId}`;
|
|
@@ -38357,7 +38378,7 @@ var script$3 = {
|
|
|
38357
38378
|
},
|
|
38358
38379
|
maxHeight: {
|
|
38359
38380
|
type: Number,
|
|
38360
|
-
default:
|
|
38381
|
+
default: 460
|
|
38361
38382
|
},
|
|
38362
38383
|
deleteLabel: {
|
|
38363
38384
|
type: String,
|