-
Notifications
You must be signed in to change notification settings - Fork 116
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
Version 2 #328
base: main
Are you sure you want to change the base?
Conversation
…odular frameworks
Co-authored-by: Bohdan Zhuravel <[email protected]>
app/views/datagrid/_head.html.erb
Outdated
"datagrid-order-active-desc": grid.ordered_by?(column, true), | ||
column.html_class => column.html_class.present?, | ||
}, | ||
"data-column": column.name |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea.
We may support everything with tag_options
option (similar to input_options
and label_options
for filter
):
column(:all, tag_options: {class: 'no-sort', "data-no-sort": true, ...}, ...)
I prefer this for later release as this one is already big, but we can include it here if you think it facilitates migration.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Co-authored-by: Bohdan Zhuravel <[email protected]>
Co-authored-by: Bohdan Zhuravel <[email protected]>
Co-authored-by: Bohdan Zhuravel <[email protected]>
Wow, that is so weird that you used everything custom in the view except for the order. I tried to come up of an alternative way for you to do it, but didn't find anything better.
https://github.com/bogdan/datagrid/blob/v1.8.4/app/views/datagrid/_head.html.erb#L5 Also it accepts the We can introduce a different helper However, think the ideal way to fix this would be for apps to implement What do you think? |
@bogdan No problem, I’ll implement |
Looks good to me. I have a pull request ready in Talkable with all tests passing, and plan to move it to QA next week. |
@zhuravel I found out that introducing The problem I wasn't able to solve is the merge of https://github.com/bogdan/datagrid/blob/version-2/app/views/datagrid/_head.html.erb#L7 |
You might try to delegate that to Either way no problem, I’ll migrate to only use |
Major Changes
Range
forrange: true
filtersBackward compatibility
Version-2 is has some breaking changes to ensure best implementation of modern technologies in the gem.
Migration Guide
TODO
[X] Integrate into datagrid-demo
[X] Integrate into 7F app
[ ] Update wiki
Fixes #325.