ember-table
ember-table copied to clipboard
Table does not accept valuePath with dots
When trying to render the following table:
columns = [
{
name: "id",
valuePath: "id",
},
{
name: "value path with dot",
valuePath: "a.b",
},
];
rows = [
{ id: 0, "a.b": 2 },
{ id: 1, "a.b": 3 },
];
<EmberTable as |t|>
<t.head @columns={{this.columns}} />
<t.body @rows={{this.rows}} />
</EmberTable>
It does not render the values from the column that has a dot (.) on the value path

I don't know if this should actually be fixed, but, if not, we can add this on the documentation saying that those are not supported.
Ember Version: 3.17.0 (i've also tested with 3.22 and the same problem happens) EmberTable Version: 3.0.1
Not sure if this helps... We're using valuePaths with dots. But we're doing so to point to values within nested objects.
So...
columns = [ { name: "value path with dot", valuePath: "a.b", }, ];
Works with...
rows = [ { id: 0, a: { b: 2} }, { id: 1, a: {b: 3} }, ];
@mjzefeldt Ohh got it. Yeah in my case the name of the attribute has a dot, so it would not work for us 😞 .
I had to "escape" the valuePaths removing those dots.