KeyTable remember selected value

KeyTable remember selected value

sliekenssliekens Posts: 97Questions: 17Answers: 2

When using KeyTable, a user's selection may change unintentionally when table processing occurs.

Test case: https://editor.datatables.net/examples/extensions/keyTable.html

  1. Select New York in the Office column
  2. Sort the table by the Position column (ascending)
  3. The selected Office is now San Fransisco instead of New York. Uh oh!

Can I make it so that KeyTable remembers what the user had selected?

Answers

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    That's very interesting. KeyTable 1.1.2 will function as you want. The new behaviour was introduced in 1.2.0 and was designed to make the paging easier (keep focus visible while paging).

    For paging, that seems like the correct behaviour, but perhaps not so for sorting / filtering.

    Allan

This discussion has been closed.