Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"$('select').material_select();" - Issue #1686

Closed
smokinggoats opened this issue Jul 7, 2015 · 3 comments
Closed

"$('select').material_select();" - Issue #1686

smokinggoats opened this issue Jul 7, 2015 · 3 comments

Comments

@smokinggoats
Copy link

Hi. When I use the select box dynamically in a form, in my case it is a simple gender select, whenever I create a new form and call '$('select').material_select();' another select box appears.
I thought it was related to the fact that I'm using each dynamic form inside a collapsible element, but when I changed the class to 'browser-default' everything worked fine.
I took a look around but didn't find anything like this, if it's an old issue or something like that I apologize xD

Here is what it looks like when I add a second form. The upper select box doesn't work, just the bottom one.
screenshot from 2015-07-07 01-34-13

Thanks (:

@carlosperate
Copy link

This was an issue resolved a long time ago (#819, #452), are you sure you are using the latest version?

Based on the extra caret added at the top, I would assume you are using 0.97.0 as that was an issue on that version (#1570), so it should be working. If you are changing the select forms, are you sure you are destroying the old one first?

$('select').material_select('destroy');

Otherwise please crate a codepen with an example of your issue.

@ghost
Copy link

ghost commented Jul 7, 2015

Encounter the same problem on 0.97.0..

            $('select').material_select('destroy');

            $.each(content, function(index, value)
            {
                $("#" + index).val(value);
            });

            $('select').material_select();

@ghost
Copy link

ghost commented Jul 7, 2015

owh.. sorry @carlosperate .. just saw the #1570

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants