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

Hard wiring between search component and search service should be avoided #5090

Open
yregaieg opened this issue Sep 20, 2019 · 0 comments
Open

Comments

@yregaieg
Copy link
Contributor

yregaieg commented Sep 20, 2019

Type of issue: (check with "[x]")

  • New feature request
  • Bug
  • Support request
  • Documentation

Current behaviour:
I wasn't aware of the hardwiring inside the search component to the searchService dataLoaded observable
and I had a usecase where even though I used a switchMap for my type ahead to search for autocomplete candidates I always end up with results from an earlier request (one that takes longer to reply since it has a wider result set) kicking in after I get the correct display with expected results and causes the search component to refresh with an outdated resultset not matching the term in the search input
so I have this line : https://github.com/Alfresco/alfresco-ng2-components/blob/development/lib/core/services/search.service.ts#L63
and this line : https://github.com/Alfresco/alfresco-ng2-components/blob/development/lib/content-services/search/components/search.component.ts#L118
to blame

I wonder how no one before me stumbled across this with the people picker for permissions entring or in any similar scenario where search service and search component are used for similar scenarios
this actually means one can not have multiple search results in ADF shown in the same view
because every time a result kicks in all search components are notified
so no way to create a dashboard with some panels listing the results of some predefined queries for instance

Expected behavior:
The wiring should either be done in a cleaner way in the glue code or through config

Steps to reproduce the issue:

Component name and version:
ADF-3.0, SearchService, SearchComponent

Browser and version:
ALL

Node version (for build issues):
10.x

New feature request:
Type ahead search

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

No branches or pull requests

1 participant