pict-section-recordset 1.9.5 → 1.9.6
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
|
@@ -192,8 +192,20 @@ class viewRecordSetList extends libPictRecordSetRecordView
|
|
|
192
192
|
// When the list is already on screen, scope the spinner to just the rows area so the title,
|
|
193
193
|
// filters, and pagination stay put (and the expensive filter view isn't disturbed). On the first
|
|
194
194
|
// render the rows container doesn't exist yet, so fall back to the whole list destination.
|
|
195
|
-
const
|
|
195
|
+
const tmpRowsElements = this.pict.ContentAssignment.getElement('#PRSP_RecordList_Container');
|
|
196
|
+
const tmpRowsContainerPresent = tmpRowsElements.length > 0;
|
|
196
197
|
const tmpDestination = tmpRowsContainerPresent ? '#PRSP_RecordList_Container' : pRecordListData.RenderDestination;
|
|
198
|
+
if (tmpRowsContainerPresent)
|
|
199
|
+
{
|
|
200
|
+
// Pin the rows area to its current height before swapping in the (short) spinner, so the page
|
|
201
|
+
// doesn't collapse and yank the content below it — pagination, the page's footer/colored fill —
|
|
202
|
+
// up into the fold and back. The floor is released once the real rows render (see _paintRecordList).
|
|
203
|
+
const tmpCurrentHeight = tmpRowsElements[0].offsetHeight;
|
|
204
|
+
if (tmpCurrentHeight > 0)
|
|
205
|
+
{
|
|
206
|
+
tmpRowsElements[0].style.minHeight = `${ tmpCurrentHeight }px`;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
197
209
|
this.pict.CSSMap.injectCSS();
|
|
198
210
|
this.pict.ContentAssignment.assignContent(tmpDestination, this.pict.parseTemplateByHash('PRSP-List-LoadingShell', pRecordListData));
|
|
199
211
|
}
|
|
@@ -789,7 +801,18 @@ class viewRecordSetList extends libPictRecordSetRecordView
|
|
|
789
801
|
// rows, each into its own stable container. The filter view, title, and header list are left as-is.
|
|
790
802
|
this.childViews.paginationTop.renderAsync('PRSP_Renderable_PaginationTop', '#PRSP_PaginationTop_Container', pRecordListData, null, () => { });
|
|
791
803
|
this.childViews.paginationBottom.renderAsync('PRSP_Renderable_PaginationBottom', '#PRSP_PaginationBottom_Container', pRecordListData, null, () => { });
|
|
792
|
-
this.childViews.recordList.renderAsync('PRSP_Renderable_RecordList', '#PRSP_RecordList_Container', pRecordListData, null,
|
|
804
|
+
this.childViews.recordList.renderAsync('PRSP_Renderable_RecordList', '#PRSP_RecordList_Container', pRecordListData, null,
|
|
805
|
+
function (pError)
|
|
806
|
+
{
|
|
807
|
+
// Release the height floor that was pinned while the spinner showed (see _projectLoadingShell),
|
|
808
|
+
// now that the real rows are back in and the container can size to its content again.
|
|
809
|
+
const tmpRows = this.pict.ContentAssignment.getElement('#PRSP_RecordList_Container');
|
|
810
|
+
if (tmpRows.length)
|
|
811
|
+
{
|
|
812
|
+
tmpRows[0].style.minHeight = '';
|
|
813
|
+
}
|
|
814
|
+
fLogRendered(pError);
|
|
815
|
+
}.bind(this));
|
|
793
816
|
}
|
|
794
817
|
|
|
795
818
|
onInitialize()
|