Added support for using the mDataProp attribute for setting aoColumnDefs and aaSorting values. #31

Open
wants to merge 3 commits into
from

Projects

None yet

2 participants

@cliftonswafford

This patch allows the user to use the same string value supplied for the mDataProp value from aoColumns when the user is setting aoColumnDefs with aTargets, or setting column sorting.

This allows the user to modify the table (change the order of columns, add new columns in the middle, etc.) without having to reset all the aTargets and aaSorting values based on new indexes.

@DataTables
Owner

An interesting extension to "aTargets" this - thanks for the pull request. I'm somewhat concerned about using the same parameter for two different things though. There is distinct possibility of a clash occurring - a class name and a property with the same value would be bad news in this case as it could cause unpredicted results. I wonder also how many people us both aoColumns and aoColumnDefs at the same time - which would be required in this case.

I'm certainly open to extending aTargets along these lines, but I think these points would need to be addressed first.

Regards,
Allan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment