-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
given a 2-column table, first column must be sortable #83
Comments
@listx please refer to this comment: #77 (comment) (to an issue by you 😄) where I mention that you start by the html view... so, basically if the html view has 2 columns, then your sortable and searchable columns methods should have 2 columns... if you only care about one of them (by specifying its sortable or searchable behavior through JS), then the other can be anything. Realizing this (now) is (very, very, very) far from ideal... so I'm making a note to rework how columns are defined... but this will be available in another release. |
Ah yes, I meant to reference #77 because you did say that ordering was important. I suppose we can close this issue for now and just move the discussion (if any --- this is not my specialty and I defer all judgments to you) to #84. Feel free to close --- I am not sure how you want to keep things organized in the issue tracker. |
OK, will close this issue for now. I think that based on a scenario like the one you describe (which matches some scenarios described in other issues), a better API for handling columns (both sortable and searchable) is the right thing to do. So, this will be addressed on #84 and targeted to be released on v.0.4.0 ... though as it will be a change in the API, not sure if it should be considered a major version bump (v.1.0.0)... |
I have this in my
recruiting_partnership_datatable.rb
:and also in my JS file:
This always crashes on initial load. If I then click on the 2nd column header to sort it, it works as expected. I supposed the initial sorting is messing it up.
The title of this issue is drawn from the current workaround, which is to switch the
columns
field values like this:. Now it doesn't crash, but now the UI is wrong (click on first column header to sort by the 2nd column values).
The text was updated successfully, but these errors were encountered: