File tree Expand file tree Collapse file tree
ui/src/components/widgets Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5959 :loading =" loading"
6060 show-search
6161 placeholder =" Select"
62- @search =" onSearch "
62+ @search =" onSearchTimed "
6363 @popupScroll =" onScroll"
6464 @change =" onChange"
6565 >
@@ -144,6 +144,7 @@ export default {
144144 totalCount: null ,
145145 loading: false ,
146146 searchQuery: ' ' ,
147+ searchTimer: null ,
147148 scrollHandlerAttached: false ,
148149 preselectedOptionValue: null ,
149150 successiveFetches: 0
@@ -238,10 +239,13 @@ export default {
238239 this .preselectedOptionValue = null
239240 this .successiveFetches = 0
240241 },
242+ onSearchTimed (value ) {
243+ clearTimeout (this .searchTimer )
244+ this .searchTimer = setTimeout (() => {
245+ this .onSearch (value)
246+ }, 500 )
247+ },
241248 onSearch (value ) {
242- if (value && value .length > 0 && value .length < 3 ) {
243- return
244- }
245249 this .searchQuery = value
246250 this .page = 1
247251 this .totalCount = null
You can’t perform that action at this time.
0 commit comments