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

Options menuWidth is not working #871

Open
hungdang6676 opened this issue May 5, 2021 · 1 comment
Open

Options menuWidth is not working #871

hungdang6676 opened this issue May 5, 2021 · 1 comment

Comments

@hungdang6676
Copy link

I want to customize the menu width base on the content of each row inside (strings with medium long length). but when i use menuWidth option and specify value to auto or 210, it's nothing change on the menu.

I'm using:

  • jQuery MultiSelect UI Widget 1.13
  • jQuery 1.6.2

Here is example code:
$(selector).multiselect({ selectedText: " Selected #/#", header: true, classes: 'mutiselect-css', noneSelectedText: '- Please select-', checkAllText: 'Select All', uncheckAllText: 'Ignore All', menuWidth: 'auto', minWidth: 120 });

@MrTilllus
Copy link

MrTilllus commented Oct 12, 2021

i found a solution but i don't think its bullet proof
you need to edit the js an in _setMenuWidth you change
this.$menu.width(contentWidth);
to
this.$menu.width('auto');
now if you write auto in the menuWidth option its defining the width with auto

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