Skip to content

Commit 2b0f27f

Browse files
authored
Merge pull request #250 from finos/nofout
Fix FOUT during viewport expansion
2 parents 444ef45 + ccc747f commit 2b0f27f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/ts/table.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,8 @@ export class RegularTableViewModel extends RegularTableViewModelBase {
620620
while (dcidx < num_visible_columns) {
621621
// Fetch missing columns if needed
622622
if (!view_response.data[dcidx]) {
623+
// Style the partially-renderd rows so there is no FOUT
624+
yield undefined;
623625
const fetch_result = await this._fetchMissingColumns(
624626
viewport,
625627
view,
@@ -680,12 +682,14 @@ export class RegularTableViewModel extends RegularTableViewModelBase {
680682
let col_width =
681683
this._column_sizes.indices[_virtual_x + Math.floor(x0)] ||
682684
cont_head?.th?.offsetWidth;
685+
683686
if (!col_width) {
684687
col_width = 0;
685688
for (const { td } of cont_body.tds) {
686689
col_width += td?.offsetWidth || 0;
687690
}
688691
}
692+
689693
view_state.viewport_width += col_width;
690694
view_state.row_height =
691695
view_state.row_height || cont_body.row_height;

0 commit comments

Comments
 (0)