1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 00:32:42 +01:00

Make "Locate File" trigger when data loads if the user typed/pasted real fast

Summary:
Fixes T12599. If you're faster than the network request, we don't actually resolve your query when the data arrives.

Instead, when the data shows up, run the query if the user has typed something.

Test Plan: Pasted a filename in real fast, got results. (Previously: no results until you press something else.)

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T12599

Differential Revision: https://secure.phabricator.com/D17739
This commit is contained in:
epriestley 2017-04-19 16:10:48 -07:00
parent 95dd9dbf43
commit d2560b2462
2 changed files with 13 additions and 8 deletions

View file

@ -401,7 +401,7 @@ return array(
'rsrc/js/application/differential/behavior-populate.js' => '8694b1df',
'rsrc/js/application/differential/behavior-toggle-files.js' => 'ca3f91eb',
'rsrc/js/application/differential/behavior-user-select.js' => 'a8d8459d',
'rsrc/js/application/diffusion/DiffusionLocateFileSource.js' => 'b42eddc7',
'rsrc/js/application/diffusion/DiffusionLocateFileSource.js' => 'c93358e3',
'rsrc/js/application/diffusion/behavior-audit-preview.js' => 'd835b03a',
'rsrc/js/application/diffusion/behavior-commit-branches.js' => 'bdaf4d04',
'rsrc/js/application/diffusion/behavior-commit-graph.js' => '49ae8328',
@ -719,7 +719,7 @@ return array(
'javelin-behavior-workflow' => '0a3f3021',
'javelin-color' => '7e41274a',
'javelin-cookie' => '62dfea03',
'javelin-diffusion-locate-file-source' => 'b42eddc7',
'javelin-diffusion-locate-file-source' => 'c93358e3',
'javelin-dom' => '805b806a',
'javelin-dynval' => 'f6555212',
'javelin-event' => '2ee659ce',
@ -1878,12 +1878,6 @@ return array(
'b3e7d692' => array(
'javelin-install',
),
'b42eddc7' => array(
'javelin-install',
'javelin-dom',
'javelin-typeahead-preloaded-source',
'javelin-util',
),
'b59e1e96' => array(
'javelin-behavior',
'javelin-stratcom',
@ -1998,6 +1992,12 @@ return array(
'javelin-install',
'javelin-util',
),
'c93358e3' => array(
'javelin-install',
'javelin-dom',
'javelin-typeahead-preloaded-source',
'javelin-util',
),
'c989ade3' => array(
'javelin-install',
'javelin-util',

View file

@ -23,6 +23,11 @@ JX.install('DiffusionLocateFileSource', {
ondata: function(results) {
this.tree = results.tree;
if (this.lastValue !== null) {
this.matchResults(this.lastValue);
}
this.setReady(true);
},