securingsincity/react-ace
View on GitHubAdding completers and Mutliple editors cause completers to fire multiple times
Open
#158 opened on Nov 16, 2016
Needs Examplebughelp wanted
Description
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.