You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Passing a reference to a field that contains the key works fine while using raw does not work. E.g.:
export default class Company {
attributeToFilterBy = 'age';
attributeToFindBy = 'firstname';
employees = [
new Person("Mike", "Smith", 21),
new Person("Marie", "Claire", 50),
new Person("Albert", "Einstein", 47),
new Person("Edgar", "Miller", 33),
new Person("Simon", "Baker", 50)
];
@filterBy('employees', 'attributeToFilterBy', 50)
filteredEmployees;
@filterBy('employees', raw('age'), 50)
filteredEmployeesRaw;
@findBy('employees', 'attributeToFindBy', raw('Marie'))
foundEmployee;
@findBy('employees', raw('firstname'), raw('Marie'))
foundEmployeeRaw;
}
filteredEmployees correctly contains two Person objects, filteredEmployeesRaw contains the entire target array. foundEmployee correctly contains a single Person object, foundEmployeeRaw the entire target array.
I have tried different setups, using native classes or ember object. Originally the error occurred when upgrading a project using typescript from ember 3.12.0 to 3.15.0
The text was updated successfully, but these errors were encountered:
Ok so I have the same issue on my app and it's mandatory for us.
I narrowed down the issue to the optional feature default-async-observers which is enabled by default in 3.15.0.
In a fresh ember 3.15 install the array macros
filterBy
andfindBy
are not working as expected when usingraw()
to provide the key reference.I created a repository that illustrates the issue here: https://github.com/DanielGroeger/issue-eam-raw
Passing a reference to a field that contains the key works fine while using raw does not work. E.g.:
filteredEmployees
correctly contains two Person objects,filteredEmployeesRaw
contains the entire target array.foundEmployee
correctly contains a single Person object,foundEmployeeRaw
the entire target array.I have tried different setups, using native classes or ember object. Originally the error occurred when upgrading a project using typescript from ember 3.12.0 to 3.15.0
The text was updated successfully, but these errors were encountered: