Why Edit button is available when the table doesn't have any row for the filter?

Why Edit button is available when the table doesn't have any row for the filter?

VyacheslavVyacheslav Posts: 70Questions: 27Answers: 0

Why Edit button is available when the table doesn't have any row for the filter?

We know that buttons extended from 'selected' must change the status of able/disable depending on the selected line or not. If we apply the filter kind of table.column(0).search('nothing').draw() to select none of rows - buttons is available.

Unfortunately I cannot provide an example with Editor extension(. The link http://plnkr.co/edit/SQ5JE9?p=preview shows that the correct behavior of 'selected' buttons would be with {selected: true, page:"current"} conditions.

I'm not sure this is a bug, but it looks strange to see available 'edit' button when no rows in the table.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,522Questions: 1Answers: 10,473 Site admin

    Although there might not be a visible row selected, filtered out rows can still be selected before they are filtered. Just before they have been filtered out does not automatically deselect them. If you remove the filter you will see the row's selected state has been retained.

    Allan

  • VyacheslavVyacheslav Posts: 70Questions: 27Answers: 0

    Allan, I understand the logic, but it would be more obvious to see the data that will be edited. The current behavior complicates matters(

  • allanallan Posts: 63,522Questions: 1Answers: 10,473 Site admin
    Answer ✓

    Thanks for the feedback. I will look at providing an option for automatic deselection when rows are filtered out in future.

    Allan

This discussion has been closed.