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

Pre selected option not visible without scrolling #563

Open
andi-b opened this issue Jan 21, 2021 · 1 comment
Open

Pre selected option not visible without scrolling #563

andi-b opened this issue Jan 21, 2021 · 1 comment

Comments

@andi-b
Copy link

andi-b commented Jan 21, 2021

It would be good that if there's already an option selected that when you open the dropdown, the selected value is visible without scrolling. I've been able to do this when there are less than 200 options, but not if the selected option is in the hidden group over 200 options.

@prlama55
Copy link

The following piece of code works for me.
styler: function (row) {
if(row.selected) {
$([data-key=${row._key.trim()}]).prop("checked", true); // Mark checked for selected checkbox value
$([data-key=${row._key.trim()}]).closest("li").addClass("selected"); // NOT mandatory. Added class to make consistency while rendering dropdownlist
} else {
$([data-key=${row._key.trim()}]).prop("checked", false); // Unmark checked for selected checkbox value
$([data-key=${row._key.trim()}]).closest("li").removeClass("selected");
}
},

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