securingsincity/react-ace
在 GitHub 查看Adding completers and Mutliple editors cause completers to fire multiple times
Open
#158 创建于 2016年11月16日
Needs Examplebughelp wanted
描述
I don't know if this is the correct way to add completers to the editor, I haven't seen any documentation on the right way to do it using react-ace via brace in a component.
I'm adding them in the onLoad of the editor; I have multiple editors on the page. When multiple editors are loaded, the completers fire for each one loaded. The editor results in duplicate completions.
Here is how they are loaded in the onLoad event.
var completers = [
{
name: 'name',
value: 'val',
score: 100,
meta: 'item'
},
...
];
editor.completers.push({
getCompletions: function(editor, session, pos, prefix, callback) {
callback(null, completers);
}
});
I'm not sure if this a bug or an issue with my implementation.
Thanks for the help in advanced.