problem with adding rows while table is ordered (how to temporarily deactivate ordering?)
problem with adding rows while table is ordered (how to temporarily deactivate ordering?)
Hi,
Here is what I want to achieve:
The user should add rows to the table by clicking on a button. An empty row should appear on the top of the table, so the user can fill it by inline-editing the cells.
I'm adding rows to my table by sending an ajax request with empty data to my backend and reloading my table after the resulting success event. This creates empty rows, but depending on how the user ordered his table it will appear at the top or at the bottom of the table, which is confusing.
Even if I found a clever way to assure the new empty row is always at top, the ordering will instantaneously move the row to another position after the user filled in the first cell, which is confusing too.
Any good ideas on that?
My idea was to "deactivate" the ordering with adding a new row. And activate it again as soon as the user clicks on a table-header.
I found order().neutral()
, but since it resets the order to the initial state, it doesn't really help me here, since I don't want to destroy the order the user set, I only want to prevent my new row being affected immediately by the ordering.
Thanks,
Tim