Loading ...
Sorry, an error occurred while loading the content.
 

DataTable sortedBy column stays highlighted

Expand Messages
  • michaelggiag
    *As I wrote this, I discovered the problem. I ll post anyways since it might help someone else.* The problem is that, while the docs say you can specify asc
    Message 1 of 1 , Feb 5, 2009

      *As I wrote this, I discovered the problem. I'll post anyways since it might help someone else.*

      The problem is that, while the docs say you can specify "asc" or "desc", if you do that, you'll hit the bug I describe. You need to use YAHOO.widget.DataTable.CLASS_ASC or YAHOO.widget.DataTable.CLASS_DESC.

      At least, thats all I've figured out :). I might have misunderstood how it's supposed to work.

      Thanks!

      ---

      Hello,

      I searched the group but didn't find any problems like this.

      I have a simple datatable using dynamicdata. I provide my own generateRequest and POST json objects to the server and get results back. This works perfectly, thanks!

      However, I set a default sortedBy key, and this column doesn't un-highlight when another column is clicked. The sort works correctly, but the first column header stays highlighted and maintains the sort arrow icon. I must click the "broken" column twice, then clicking other columns works properly.

      I set the default sortedBy by config = { sortedBy: { key: "ID" } }

      The same thing also happens when I set sortOptions on a column definition (sortOptions: { defaultDir: "desc" }). However, in this case, it requires 3 clicks for it to flip the sort order and have things work as normal again.

      These effects are stackable: If I click 3 bad columns in a row, my datatable ends up showing 3 highlighted column headers (the columns themselves are not highlighted).

      Removing the config (sortOptions on columns, or sortedBy config on datatable) makes those columns work just fine.

       

    Your message has been successfully submitted and would be delivered to recipients shortly.