David-Mulder / paper-datatable

A material design implementation of a data table.
GNU General Public License v3.0
237 stars 92 forks source link

paper-datatable-card not working in polymer 3 #141

Closed sonuyadav7421 closed 4 years ago

sonuyadav7421 commented 4 years ago

@David-Mulder

setData(idProp) { if (!idProp) idProp = "_id"; return { queryForIds: (sort, page, pageSize) => { return this.select(this.data, '_id', this.searchTerm, sort, (page - 1) pageSize, page pageSize, idProp); }, getByIds: (ids) => { return this.select(this.data, '*', ids, null, null, null, idProp); }, set: (item, property, value) => { return this.update(item._id, property, value); }, length: 0 } }

In above code function getByIds always return undefined. Please find attached console result for the same.

upload today

sonuyadav7421 commented 4 years ago

Issue fixed. Yehhhh @David-Mulder

Solution: We have to pass ("id" or "_id" as per you defined into your paper-data-card) to data array.