Search Api not working properly
See original GitHub issueI’ve just tried to use search feature and it seems it doesn’t work as expected for the object
records.
According to the docs :
Let’s say the field’s value for a cell is an object: { … , fullName: {firstName: ‘some-first-name’, lastName: ‘some-last-name’} }, Its getValue function for displaying the first and last name as a full name, would be: getValue: ({value, column}) => value.firstName + ’ ’ + value.lastName The returned value will be used for searching, sorting etc…
This seem to Work half way. I have this object:
{
name: 'abc'
number: 123
property: {
abc: 'aaaa'
}
}
// my column definition for the property.abc getter
getProperty = (val) => val.abc
field: 'property',
getValue: ({ value }) => getProperty(value),
Search will work fine for the name
number
values but for the property.abc
it will work only for the first 2 characters and then it doesn’t work further unless I flatten the object so all properties are on one level and the value is accessed via direct property name instead of getValue
function
Issue Analytics
- State:
- Created 10 months ago
- Comments:7 (4 by maintainers)
Fixed in V1.1.2
Thanks, will look into it…