I have setup a very simple complete.ly
text box but my options are not showing.
I suspect it's something obvious that I have missed.
It really is a very basic example :
var strategyChoice = ["a", "b", "c"];
$(function() {
var pv = completely(document.getElementById('container'));
pv.onChange = function(text) {
console.log(text);
if (text === 'i') {
pv.setText('I want to'); // special case i becomes 'I want to'.
return;
}
if (text === 'I want to ') {
pv.options = ["pay", "receive"];
pv.repaint();
console.log(pv.options);
return;
}
if (["I want to pay ", "I want to receive "].includes(text)) {
pv.options = strategyChoice;
pv.repaint();
console.log(pv.options);
return;
}
}
This fiddle shows the issue.