Open ithielnor opened 8 years ago
It looks like this is by design: https://github.com/programcsharp/griddly/commit/dc935e941a636be876c6a066b7f0ad78576e7c0a#diff-afcf37e41443e6efc6072140d2dd621fR24
SelectColumn adds one (or more) RowId's to the settings, same as RowId. It then picks the first RowId to use as value but adds all of them as data attributes. Normally this works fine, but if you RowId first then that id will be first in the RowId's dictionary instead.
Maybe we need to rework the RowId design a bit? #26 is still open to allow setting names for buttons easier.
I know that's how the render works, but the helper function .SelectColumn
should be changed I think.
It seems to me that if you specify an Id in the .SelectColumn it should always win, no matter where you put other RowIds in the configuration.
Why not make .SelectColumn to an Insert(0, func) so value
will always be the id specified in the helper column. Though, this does get funky with multiple select columns...
If you write your settings like:
The
input
in the select column will be rendered withx.Blah.Id
as the value instead ofx.Id
. However, if you writeThe
input
value will bex.Id
as expected. It seems to me that the value should always be whatever expression was specified inSelectColumn