openproject
openproject copied to clipboard
Use trackBy and compareWith to ensure we're matching the same selection
Due to the way the query reloads after a filter value is changed, the available values are also new objects. It does not matter if they are hal resource classes or not in this case, as both objects are different.
However the selected object is coming from the filter and is also new. This means that the selected value does not object equal the available value anymore.
ng-select provides a compareWith function to ensure that they match, which was not applied and/or available for op-autocompleter so far.
https://community.openproject.org/wp/43570