mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-27 07:50:57 +01:00
Fix an issue where "Browse > Select" did not work for dynamic tokenizers
Summary: Ref T4100. In Herald, using the browse dialog to select a result didn't work because we'd add the token with no name value. Other things would render it elsewhere, but it would eventaully be discarded. Instead, add it with a name value. Test Plan: Edited a Herald rule and used Browse > Select to add a token. Saved rule. Saw token persist. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T4100 Differential Revision: https://secure.phabricator.com/D12529
This commit is contained in:
parent
f69f53124c
commit
ccd6770a09
1 changed files with 6 additions and 2 deletions
|
@ -465,8 +465,12 @@ JX.install('Tokenizer', {
|
||||||
new JX.Workflow(uri, {exclude: JX.keys(this.getTokens()).join(',')})
|
new JX.Workflow(uri, {exclude: JX.keys(this.getTokens()).join(',')})
|
||||||
.setHandler(
|
.setHandler(
|
||||||
JX.bind(this, function(r) {
|
JX.bind(this, function(r) {
|
||||||
this._typeahead.getDatasource().addResult(r.token);
|
var source = this._typeahead.getDatasource();
|
||||||
this.addToken(r.key);
|
|
||||||
|
source.addResult(r.token);
|
||||||
|
var result = source.getResult(r.key);
|
||||||
|
|
||||||
|
this.addToken(r.key, result.name);
|
||||||
this.focus();
|
this.focus();
|
||||||
}))
|
}))
|
||||||
.start();
|
.start();
|
||||||
|
|
Loading…
Reference in a new issue