This is an automated email from the ASF dual-hosted git repository. ababiichuk pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push: new 488a8c1 [AMBARI-23916] [Logsearch UI] Rows per page drop down not working as expected 488a8c1 is described below commit 488a8c165ad6c5cb8ad8d3a81ed21c0fea85d30f Author: Tobias Istvan <tobias.ist...@gmail.com> AuthorDate: Mon May 21 16:33:21 2018 +0200 [AMBARI-23916] [Logsearch UI] Rows per page drop down not working as expected --- .../shared/components/dropdown-button/dropdown-button.component.ts | 5 ++--- .../shared/components/dropdown-list/dropdown-list.component.ts | 4 ---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/modules/shared/components/dropdown-button/dropdown-button.component.ts b/ambari-logsearch/ambari-logsearch-web/src/app/modules/shared/components/dropdown-button/dropdown-button.component.ts index cd426a9..403e2d7 100644 --- a/ambari-logsearch/ambari-logsearch-web/src/app/modules/shared/components/dropdown-button/dropdown-button.component.ts +++ b/ambari-logsearch/ambari-logsearch-web/src/app/modules/shared/components/dropdown-button/dropdown-button.component.ts @@ -98,14 +98,13 @@ export class DropdownButtonComponent { } }); } else { - const selectedItem: ListItem = items.find((item: ListItem) => item.isChecked); + const selectedItem: ListItem = Array.isArray(updatedItem) ? updatedItem[0] : updatedItem; this.options.forEach((item: ListItem) => { - item.isChecked = !!selectedItem && this.utils.isEqual(item.value, selectedItem.value); + item.isChecked = this.utils.isEqual(item.value, selectedItem.value); }); } } else { this.options.forEach((item: ListItem) => item.isChecked = false); - this.selection = []; } const checkedItems = this.options.filter((option: ListItem): boolean => option.isChecked); this.selection = checkedItems; diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/modules/shared/components/dropdown-list/dropdown-list.component.ts b/ambari-logsearch/ambari-logsearch-web/src/app/modules/shared/components/dropdown-list/dropdown-list.component.ts index a3e03ac..e20b625 100644 --- a/ambari-logsearch/ambari-logsearch-web/src/app/modules/shared/components/dropdown-list/dropdown-list.component.ts +++ b/ambari-logsearch/ambari-logsearch-web/src/app/modules/shared/components/dropdown-list/dropdown-list.component.ts @@ -174,10 +174,6 @@ export class DropdownListComponent implements OnInit, OnChanges, AfterViewChecke } this.separateSelections(); this.selectedItemChange.emit(item); - if (event) { - event.preventDefault(); - event.stopPropagation(); - } } doItemsCheck() { -- To stop receiving notification emails like this one, please contact ababiic...@apache.org.