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

optgroup_columns (forget the scrollbar) - i have fixed #360

Closed
PaykomanVll opened this issue Apr 2, 2014 · 4 comments
Closed

optgroup_columns (forget the scrollbar) - i have fixed #360

PaykomanVll opened this issue Apr 2, 2014 · 4 comments

Comments

@PaykomanVll
Copy link

Hello,

on our Plugin "optgroup_columns" is a bug, show on our Demo http://brianreavis.github.io/selectize.js/ under the Plugins and "car" menu the last colum is out of the row (on chrome).

so i have changed line #3269

"width = Math.round(width_parent / n );"

to

"width = Math.round(width_parent / n - (15 / n)); // remove the width of scrollbar and splitt it of the columns"

Better you put this in the repository =)

Best regards
Stefan

@PaykomanVll PaykomanVll changed the title optgroup_columns (forget the scrallbar) - i have fixed optgroup_columns (forget the scrollbar) - i have fixed Apr 2, 2014
@kosir
Copy link

kosir commented May 14, 2014

+1
same problem with chrome...

@PaykomanVll
Copy link
Author

Hehe, i not more =)

Show top is a fix!

@kosir
Copy link

kosir commented May 15, 2014

thnx, but it doesn't works for me...
I can (for example) stretch it to width = Math.round(width_parent / n - (150 / n));,
but the last column will be still in the next line.
But, if I take out only one Audi, it works fine, so I don't know, maybe problem is somewhere else...

@kosir
Copy link

kosir commented May 15, 2014

ok, this works for me now. If you change width, you should change also width_last, so all columns have the same width.
for me it is like this:
3306: width = Math.round(width_parent / n - (15 / n));
3310: width_last = (width_parent - width * (n - 1) - 17);
and it works fine with 8 columns. This should be elaborated a little to make it more dynamic.
Also I think that it would be fine if plugins could receive parameters (number of colums for this example).

scarfacedeb pushed a commit to scarfacedeb/selectize.js that referenced this issue Aug 27, 2014
* upstream/master: (69 commits)
  Released 0.11.0.
  Added "allowEmptyOption" option (selectize#163).
  Fixed broken bootstrap3 build.
  Fixing confusing description
  renamed the undefined plugins variable to selector_plugins
  Released 0.10.1.
  Bind createFilter callback to Selectize instance.
  Released 0.10.0.
  Calculate scrollbar width (fixes selectize#360).
  Fix for selectize#438 + tests.
  Added createFilter sample to contacts demo.
  Cherry picked commit 6e04d7b from selectize#370.
  Minor cleanup of selectize#405.
  Forgot self qualifier on
  Jquery cached data allocated by selectized is now cleaned up at destroy time
  Removing extra tabs
  selectized class should not have been added before the classes were checked and propegated to all of the controls created by selectize.  It was previously added after this initialization and is now also added at the same time.
  Used method call to isFull to avoid duplicate code
  Consolidated the refreshState call to capture just becoming full during bulk (or any) addItem call
  Delaying updating attributes and caret during bulk insertion
  ...

Conflicts:
	src/selectize.js
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

2 participants