Premium support for our pure JavaScript UI components


Post by rclarke »

Hi again,

We've got an issue with data mapping when using the CheckColumn. All of our task data is on an object nested in the TaskModel instance, so our columns all have fields defined e.g. "data.Task.fieldName". This worked fine before, but we've recently noticed it no longer works on the check column.

I've put together an example here: https://codepen.io/Rhys-Clarke/pen/qBwXjXO. While making that though, I've found something stranger - if the field is just "Task.check" then the mapping works for both the check column and the default text column. If the field for the text column instead begins "data." (as we were told to do originally) this still works, but if the same change is made for the check column not only does that column stop working, but the text column breaks as well.

I'm guessing that the need to add "data." at the start of the fields has been fixed, so that could be an option for us, but the interaction between the two columns seems very strange!


Post by alex.l »

Hi,

If the field for the text column instead begins "data." (as we were told to do originally) this still works, but if the same change is made for the check column not only does that column stop working, but the text column breaks as well.

Please explain this with code examples, I can't get what is data and where did you specify that. Also can you specify in which version it worked for you?

All the best,
Alex


Post by rclarke »

Hi Alex,

We specified that in the field config for the columns, so for example we would have field: "data.Task.ourFieldName". I assume it's just referencing the data property on the model. I know we added that instead of just using field: "Task.ourFieldName" after upgrading (to 5.2.10, about a year ago) and finding that the data wasn't mapping across without it. I'd thought we were advised to do it, but I'm probably mistaken there!

I think we can just revert that and that should work for us.


Post by alex.l »

data is a private property (not documented) and should not be used. It is simply not correct way to specify field source.

All the best,
Alex


Post by rclarke »

Got it - I'd started to come to that conclusion anyway, I think we might have just got some wires crossed somewhere!
Thanks for the help.


Post by ghulam.ghous »

No worries. If you need any further assistance, don't hesitate to reach out to us.

Regards,
Ghous


Post Reply