Skip to content

Commit 077c70f

Browse files
vishesh92Locharla, Sandeep
authored andcommitted
UI: Prevent extra API calls in search filter on scrolling (apache#12553)
1 parent b5cba90 commit 077c70f

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

ui/src/components/view/SearchFilter.vue

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
// Licensed to the Apache Software Foundation (ASF) under one
2-
// or more contributor license agreements. See the NOTICE file
2+
// or more contributor license agreements. See the NOTICE file
33
// distributed with this work for additional information
4-
// regarding copyright ownership. The ASF licenses this file
4+
// regarding copyright ownership. The ASF licenses this file
55
// to you under the Apache License, Version 2.0 (the
66
// "License"); you may not use this file except in compliance
7-
// with the License. You may obtain a copy of the License at
7+
// with the License. You may obtain a copy of the License at
88
//
9-
// http://www.apache.org/licenses/LICENSE-2.0
9+
// http://www.apache.org/licenses/LICENSE-2.0
1010
//
1111
// Unless required by applicable law or agreed to in writing,
1212
// software distributed under the License is distributed on an
1313
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14-
// KIND, either express or implied. See the License for the
14+
// KIND, either express or implied. See the License for the
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

@@ -189,9 +189,10 @@ export default {
189189
resolve()
190190
} else {
191191
this.getSearchFilters(filter.key, filter.value).then((value) => {
192+
const displayValue = (value !== undefined && value !== null && value !== '') ? value : filter.value
192193
clonedFilters[idx] = {
193194
key: filter.key,
194-
value: value,
195+
value: displayValue,
195196
isTag: filter.isTag
196197
}
197198
resolve()

0 commit comments

Comments
 (0)