mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Only populate list from timeout when still on DOM
This commit is contained in:
@@ -45,7 +45,9 @@ class SelectList extends View
|
||||
|
||||
schedulePopulateList: ->
|
||||
clearTimeout(@scheduleTimeout)
|
||||
@scheduleTimeout = setTimeout((=> @populateList()), @inputThrottle)
|
||||
populateCallback = =>
|
||||
@populateList() if @isOnDom()
|
||||
@scheduleTimeout = setTimeout(populateCallback, @inputThrottle)
|
||||
|
||||
setArray: (@array) ->
|
||||
@populateList()
|
||||
|
||||
Reference in New Issue
Block a user