Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remote-complete issue - results are not set if term does not perfectly match part of the choice #787

Closed
kenegozi opened this issue Nov 13, 2015 · 1 comment · Fixed by #788

Comments

@kenegozi
Copy link
Contributor

When using remote complete on choice or choices, with either reference or reference_many, the behavior is such that the returned values has to match a Contains predicate in order to work, otherwise the results do not show up, this is due to the | filter in the directive's template.

the | filter is needed for local filtering of options, but when using a remote call, the remote server is in charge of filtering, so local filtering gets in the way

A sample scenario: when adding a reference to something with a title, the backend might treat incoming request (like ang adm) as prefix terms, returning {1, "Angular Admin" } as the result. Since "Angular Admin").indexOf('ang adm') < 0, the value that was returned would not show up on the dropdown, and would not be selectable.

A proposed solution (in an upcoming PR) removes the filter in case of a remote-complete instance of the field.

kenegozi added a commit to kenegozi/ng-admin that referenced this issue Nov 14, 2015
@kenegozi
Copy link
Contributor Author

oh man the CI server refuses to build again (UnknownError: unknown error: Chrome failed to start: crashed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant