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

autocomplete: fix suggestions list #177

Merged
merged 1 commit into from
Apr 30, 2020
Merged

Conversation

jma
Copy link
Contributor

@jma jma commented Apr 29, 2020

Old version of the third party library ngx-bootstrap had sometime wired
behaviors. A hack to avoid a form submission when a suggestion
selected with a return key has been removed. Moreover, the autocomplete
can use angular navigation to go to a record detailed view, the
corresponding detailed view component should observe the route to change
his content when the url change.

  • Use ngx-bootstrap version 3.6.2.
  • Remove an useless hack due to an old version of ngx-bootstrap.
  • Enables route change detection for the record detailed view.
  • Fixes ngx-bootstrap imports to be angular 9 and ngx-bootstrap>6
    compliant.

Note: several versions of ngx-bootstrap has been tried, but some of
them failed:

  • 3.3.x: does not display a typeahead suggestion list for slow query.
  • 3.6.1: does not compile our project in production.

Co-Authored-by: Johnny Mariéthoz Johnny.Mariethoz@rero.ch

Required by

Why are you opening this PR?

  • To fix the autocomplete component.

How to test?

  • Basically needs to test all the widget used by the library

Code review check list

  • Commit message template compliance.
  • Commit message without typos.
  • File names.
  • Functions names.
  • Functions docstrings.
  • Unnecessary commited files?
  • Extracted translations?

@jma jma force-pushed the maj-ngx-bootstrap-3.6 branch from c1ba8c2 to a70af2b Compare April 29, 2020 05:56
@jma jma marked this pull request as ready for review April 29, 2020 06:02
@jma jma requested a review from sebdeleze April 29, 2020 06:07
@@ -187,6 +187,7 @@ export class AutocompleteComponent implements OnInit {
)
);
});
console.log(values);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove console.log

@jma jma force-pushed the maj-ngx-bootstrap-3.6 branch 2 times, most recently from d0c16e0 to 0560ad4 Compare April 30, 2020 07:10
Old version of the third party library `ngx-bootstrap` had sometime wired
behaviors. A hack to avoid a form submission when a suggestion
selected with a return key has been removed. Moreover, the autocomplete
can use angular navigation to go to a record detailed view, the
corresponding detailed view component should observe the route to change
his content when the url change.

* Use `ngx-bootstrap` version 3.6.2.
* Remove an useless hack due to an old version of `ngx-bootstrap`.
* Enables route change detection for the record detailed view.
* Fixes `ngx-bootstrap` imports to be angular 9 and `ngx-bootstrap>6`
compliant.

Note: several versions of `ngx-bootstrap` has been tried, but some of
them failed:
- 3.3.x: does not display a `typeahead` suggestion list for slow query.
- 3.6.1: does not compile our project in production.

Co-Authored-by: Johnny Mariéthoz <Johnny.Mariethoz@rero.ch>
@jma jma force-pushed the maj-ngx-bootstrap-3.6 branch from 0560ad4 to b2a6704 Compare April 30, 2020 12:43
@jma jma changed the title dependencies: use ngx-bootstrap 3.6.2 autocomplete: fix suggestions list Apr 30, 2020
@jma jma requested a review from sebdeleze April 30, 2020 12:45
@sebdeleze sebdeleze merged commit 15623b4 into rero:dev Apr 30, 2020
@jma jma deleted the maj-ngx-bootstrap-3.6 branch December 13, 2021 10:49
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 this pull request may close these issues.

2 participants