Skip to content

Better performance getValue for select#139

Open
hasangursoy wants to merge 1 commit intocodedance:masterfrom
hasangursoy:patch-1
Open

Better performance getValue for select#139
hasangursoy wants to merge 1 commit intocodedance:masterfrom
hasangursoy:patch-1

Conversation

@hasangursoy
Copy link

No description provided.

@myahlGDCI
Copy link

It looks like that case is needed for compatibility with multi-selects. I agree it needs to be optimized though. Perhaps this instead? Note - untested, just off the top of my head.

$field.find('option:selected').each(function() {
    val += $(this).val();
});

@hasangursoy
Copy link
Author

val = $field.val(); will be enough for multiselects

@myahlGDCI
Copy link

Alright, thanks. :)

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.

2 participants

Comments