diff --git a/stdlib/components/table/table.opa b/stdlib/components/table/table.opa index 53f91370..c5b88faa 100644 --- a/stdlib/components/table/table.opa +++ b/stdlib/components/table/table.opa @@ -522,10 +522,12 @@ CTable = {{ for_iter(0, col_table_size-1)(i -> match BMap.get(i, state.col_map) with | {some=col} -> + cell_id = gen_cell_id(table_id, config, row, col, simple) if ((i >= left) && (i <= right)) - then widget_value(simple, table_id, config, (row,col), channel, {request=callbacks.request_value}) + then + do widget_value(simple, table_id, config, (row,col), channel, {request=callbacks.request_value}) + dom_show_cell(0, #{cell_id},simple) else - cell_id = gen_cell_id(table_id, config, row, col, simple) dom_hide_cell(0, #{cell_id},simple) | {none} -> void ) @@ -786,15 +788,16 @@ CTable = {{ do Dom.transform([{Dom.select_raw("#{table_id}_table tbody")} +<- row_html]) // Check if the added row is in the display scope (bottom,nb_rows) = + row_id = gen_row_id(table_id, config, row) if nb_rows < row_page_size && not(is_filtered(row)) then // Show the added row do request_values(row) + do dom_show_row(0, #{row_id}) // a new row added to the display -> bottom++ (bottom + 1, nb_rows + 1) else // hide the row - row_id = gen_row_id(table_id, config, row) do dom_hide_row(0, #{row_id}) // bottom unchanged (bottom, nb_rows)