enso-ui/tables

CoreTable ajax method undefined dtRowId

thedoan opened this issue · 2 comments

This is a **bug.

Prerequisites

i use enso-ui tables 1.1.5

Description

When i click row action button destroy, nothing happen
When i debug with console.log, i see that path undefined ex:/admin/posts/undefined

Steps to Reproduce

I found why and where it happend. It in CoreTable ajax's method
I think that instead of row['dtRowId'], you use row[this.template.dtRowId] make it undefined because this.template.dtRowId is undefined

Expected behavior

/admin/posts/number

Actual behavior

/admin/posts/undefined

Hi,

I guess the tables docs might have been left behind. We wrote in the changelog about this.

Long story short, if you use Tables outside Enso you can easily configure the default "dtRowId" => "dtRowId" key in the tables config instead of the new default "id".

And you can override this setting per template.

Or refactor your tables to drop the "dtRowId" alias in favour of id.

A contribution to the docs in this sense would be appreciated ;)

thank mr. aocneanu