Skip to content

Conversation

@glenpike
Copy link
Collaborator

@glenpike glenpike commented Oct 3, 2016

As per fix, push each rendered element into an array which we
then pass to $.fn.add in one go - more efficient.
Add test to ensure that add only gets called once.

As per fix, push each rendered element into an array which we
then pass to $.fn.add in one go - more efficient.
Add test to ensure that add only gets called once.
@midnightcodr
Copy link

This fix works great. Hope the pull request got approved soon.

.attr("label",option.group)
.html( this._getOptionsHtml(option.options) );
html = html.add(optgroup);
html[html.length] = optgroup[0];
Copy link
Collaborator

@philfreo philfreo Oct 17, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not say html.push(optgroup[0])?

For adding to array, use '[].push' instead of '[arr.length] ='
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

Successfully merging this pull request may close these issues.

3 participants