Steps to reproduce: 1. Create a Toaster project 2. Go to the "Import layer" page 3. Scroll down to the bottom of the page, where the "Layer dependencies" section is, and try to add a layer to the list of dependencies (e.g meta-oe) Outcome: when you select meta-oe from the typeahead suggestions, the "add layer" button remains disabled, so you can't add any layer dependencies
Comment from Michael Wood: "that bug with the layer dependencies in the import layer page is because the typeahead isn't populating layerDepsChoices which is what is checked to see if you've selected a valid choice"
Also from Michael: "the event for the new typehead is .on("typeahead:select", .. instead of "typeahead-choices-change'. if you changed that, and added the button toggle disabled/enabled that might be it"
*** Bug 10042 has been marked as a duplicate of this bug. ***
The current "typeahead-choices-change" method does not work, as Michael observed. If I replace with this function, then selecting a layer from the typeahead list will safely enable the "Add" button, and disable it when the user manually changes the edit box. // when a typeahead choice is selected, enabling the "Add layer" button // since we know for sure this is a valid layer layerDepInput.on("typeahead:select", function (event, data) { if (data.name) { layerDepBtn.removeAttr("disabled"); } }); What I cannot yet figure out is how to fetch the active list of lookahead layer names from the widget, so that I can test against that list when the layerDepInput.on("input change",...) is invoked - doing what "typeahead-choices-change" was supposed to provide.
Patch submitted for review to the toaster mailing list https://lists.yoctoproject.org/pipermail/toaster/2016-August/005131.html
http://git.yoctoproject.org/cgit/cgit.cgi/poky/atom/8df56061f63b63b77a0c7a7ddd75812e3b5a88c4 Fix regression introduced by switching typeahead library. Make sure we enable and disable the add button based on whether the selection event has fired or not. [YOCTO #9936] (Bitbake rev: cfef79e98b023252cd116d6cc4f90d261d47d13f)
Verified on commit : 4b94b498e21aeba945fe7e72a6b7c4bb0314fb83 works ok