Commits
cris authored 293692f1d27
145 145 | this.currentSort$ = this.paginationService.getCurrentSort(this.paginationConfig.id, sortConfig); |
146 146 | this.subs.push( |
147 147 | observableCombineLatest([this.route.params, this.route.queryParams, this.currentPagination$, this.currentSort$]).pipe( |
148 148 | map(([routeParams, queryParams, currentPage, currentSort]) => { |
149 149 | return [Object.assign({}, routeParams, queryParams),currentPage,currentSort]; |
150 150 | }) |
151 151 | ).subscribe(([params, currentPage, currentSort]: [Params, PaginationComponentOptions, SortOptions]) => { |
152 152 | this.browseId = params.id || this.defaultBrowseId; |
153 153 | this.authority = params.authority; |
154 154 | |
155 - | if(typeof params.value === "string"){ |
155 + | if (typeof params.value === 'string'){ |
156 156 | this.value = params.value.trim(); |
157 157 | } |
158 158 | |
159 159 | this.value = +params.value || params.value || ''; |
160 - | |
161 - | if(typeof params.startsWith === "string"){ |
160 + | |
161 + | if (typeof params.startsWith === 'string'){ |
162 162 | this.startsWith = params.startsWith.trim(); |
163 163 | } |
164 164 | |
165 165 | if (isNotEmpty(this.value)) { |
166 166 | this.updatePageWithItems( |
167 167 | browseParamsToOptions(params, currentPage, currentSort, this.browseId, this.fetchThumbnails), this.value, this.authority); |
168 168 | } else { |
169 169 | this.updatePage(browseParamsToOptions(params, currentPage, currentSort, this.browseId, false)); |
170 170 | } |
171 171 | this.updateParent(params.scope); |