0

I have text-field on which i have attached the Auto-complete plugin (Y.Plugin.AutoComplete) what I do is to render it once other fields above it are checked.

My question is once the above fields are checked and the Auto-Complete is rendered but again if the user goes back and enters something incorrect then this time i have to stop the Auto-Complete from displaying suggestions again.

I have tried render:"false" but that did no help.

warcoder
  • 111
  • 1
  • 10

1 Answers1

0

You can remove the Autocomplete plugin by using node.unplug().

input.ac.render();

otherNode.on('click', function () {
  if (someCondition) {
    input.unplug(Y.Plugin.Autocomplete);
  }
});
juandopazo
  • 6,283
  • 2
  • 26
  • 29