Skip to content

Commit

Permalink
[fix] CTable: missing calls to dom_show_row and dom_show_cell
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathieu Baudet committed Nov 29, 2011
1 parent 2f4a6d9 commit 38529e0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions stdlib/components/table/table.opa
Expand Up @@ -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
)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 38529e0

Please sign in to comment.