Open sonuyadav7421 opened 4 years ago
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.
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.