omines / datatables-bundle

DataTables bundle for Symfony
https://omines.github.io/datatables-bundle/
MIT License
262 stars 114 forks source link

[FR] Add dataPriority option to columns #101

Closed adlerweb closed 3 years ago

adlerweb commented 4 years ago

When using the responsive datatables extension columns automatically hide on small screens. Usually the rightmost columns are hidden first, however it is possible to specify a priority for each column to change this behavior. At the moment such a priority can be set in datatables-bundle using a configuration option, however this uses column numbers, requires manual updates when adding or removing columns and is somewhat confusing to maintain. This PR adds a possibility to set the corresponding column attribute using a column configuration.

adlerweb commented 4 years ago

Extension makes sense, not really sure I like the dataPriority name. Shouldn't we just have a free-form data array for this purpose?

Hm, only for data-* or should it be a generic "attributes"-array, risking collisions with arguments automatically generated?

curry684 commented 4 years ago

data only, we don't want to interfere with 'native' behavior.

curry684 commented 4 years ago

@shades684 agree with this?

curry684 commented 3 years ago

Agreeing with @shades684 and closing.