So.. I tried to do it as suggested in the issue's description, but I don't know how to move forward...
I added the loading attribute in app/ui/omni-box.js, and emit the events from app/window.js, which I then listen for in app/ui/script.js. This then changes the attribute's value to either true or false depending on the event.
I added a random spinning indicator in app/ui/style.css named .spinner.
It's a separate button with its own div id. You can see it in the image attached
The issue is;
I don't know if I'm handling the attributeChangedCallback correctly. I added this.loader = this.$('omni-box-button') and use this.loader.getElementById().classList.toggle() to either make the buttons hidden or visible, but they both stay constantly visible...
I change the value of loading directly in app/ui/script.js when listening for the event, but I'm not sure whether that's even correct, or I should handle it some other way?
So.. I tried to do it as suggested in the issue's description, but I don't know how to move forward...
loading
attribute inapp/ui/omni-box.js
, and emit the events fromapp/window.js
, which I then listen for inapp/ui/script.js
. This then changes the attribute's value to eithertrue
orfalse
depending on the event.app/ui/style.css
named.spinner
.The issue is;
attributeChangedCallback
correctly. I addedthis.loader = this.$('omni-box-button')
and usethis.loader.getElementById().classList.toggle()
to either make the buttons hidden or visible, but they both stay constantly visible...loading
directly inapp/ui/script.js
when listening for the event, but I'm not sure whether that's even correct, or I should handle it some other way?Any suggestions on how to move from here ?