materialize icon indicating copy to clipboard operation
materialize copied to clipboard

Select box doesn't render if added dynamically!

Open ajrehman opened this issue 11 years ago • 5 comments

The select box is not rendering if added dynamically using Javascript. If the select box exists on the html when initial page rendering takes place, it shows up and styles itself. Otherwise, it doesn't show up at all if appended to the page.

I even tried calling: $(".selec-dropdown").dropdown();

Still nothing. Any idea what could fix this. I am using the most current and updated version of Materialize.

ajrehman avatar Dec 16 '14 22:12 ajrehman

Duplicate of #166

Dogfalo avatar Dec 16 '14 22:12 Dogfalo

This issue is still happening even after fixing the issue 166. The code does not deal with SELECT input boxes at all, hence it never gets initialized again ever!

ajrehman avatar Dec 23 '14 00:12 ajrehman

If you have the latest code, it should work.

Dogfalo avatar Dec 23 '14 00:12 Dogfalo

And you need to call the plugin again once you've added the select dynamically

acburst avatar Dec 23 '14 00:12 acburst

Okay I will give it a try, so just call this again?

$('.dropdown-button').dropdown();

ajrehman avatar Dec 23 '14 02:12 ajrehman