material-design-lite icon indicating copy to clipboard operation
material-design-lite copied to clipboard

MDL - Spinner and "Loading ..." Text

Open gisvpn opened this issue 6 years ago • 4 comments

Hi,

I am using the code below to show the MDL spinner when the button is clicked, using the onclick JS function. The problem is however when you click on the button all you ever see if the words "Loading..." the spinner doesnt actually load. I tested cross browser (Chrome/IE) and appears consistent across browser.

Is this my coding approach or something else?

`

`

gisvpn avatar Mar 02 '19 16:03 gisvpn

Sorry - my code doesnt appear to be showing correctly above - see below

gh_mdl_shot

gisvpn avatar Mar 02 '19 16:03 gisvpn

i think you must call the componentHandler to upgrade the element

aburai avatar Mar 04 '19 09:03 aburai

Hi @aburai - thanks for the follow up.

I read the mini-article here (https://github.com/google/material-design-lite/wiki/How-the-Component-Handler-works) but was not sure if this was the actual problem. Would I call upgradeAllRegistered() when I run my JS function?

Thanks,

GISVPN

gisvpn avatar Mar 04 '19 15:03 gisvpn

`componentHandler.upgradeElement()' for a single element or yes, just upgradeAllRegistered should work too

aburai avatar Mar 07 '19 00:03 aburai