silverstripe/sapphire — comment on commit 1b42b2afa784bce3c3ef79c46972559ce754fd34
File: javascript/GridField.js line 14
By sminnee:

I'd say that this is a little too heavily coupled; i'd probably pass through a `data-statefieldname` attribute. That way we don't need to keep the naming convention of the GridState field name in sync between the back-end and front-end.

I'd also make it explicit at the top of the JS file which custom data attributes this code relies on.