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

Selectize does not inherit classes from original input/select #18

Closed
jbrooksuk opened this issue Jun 5, 2013 · 3 comments
Closed

Selectize does not inherit classes from original input/select #18

jbrooksuk opened this issue Jun 5, 2013 · 3 comments

Comments

@jbrooksuk
Copy link
Contributor

In our grid layout we give elements span* classes, similar to that of Bootstrap. Our original select element includes one of these so that we can create a nice and neat form layout.

When you apply Selectize however to the elements, the new element doesn't include any classes or original markup. Similar to the problem in #13.

@jbrooksuk
Copy link
Contributor Author

I'm not on my MacBook at the moment, but I believe this can be achieved by the following:

var classes = [];
classes = this.$input.attr('class').split(/\s+/);
this.$input.attr('css', classes.join(' '));

I've chosen to split the classes into an array just incase, it'd be slightly faster to return them as a string, rather than joining them but it's a choice.

Since I'm not on my MacBook I can't make the source or test it as easily. Anybody else mind?

@wmartins
Copy link
Contributor

wmartins commented Jun 6, 2013

I can do that. But I think that the classes must go to the generated div right?

brianreavis added a commit that referenced this issue Jun 7, 2013
@waiting-for-dev
Copy link

Maybe this could be an option and not a must... Copying select class to the div can cause style crashes also...

sg00dwin pushed a commit to sg00dwin/selectize.js that referenced this issue Jan 11, 2016
Move multiple filter spacing from margin-left to margin-right so that…
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

4 participants