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

support options with labels only #3112

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions coffee/lib/select-parser.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,16 @@ class SelectParser

add_option: (option, group_position, group_disabled) ->
if option.nodeName.toUpperCase() is "OPTION"
if option.text != ""
option_text = if option.text != "" then option.text else option.label
if option_text != ""
if group_position?
@parsed[group_position].children += 1
@parsed.push
array_index: @parsed.length
options_index: @options_index
value: option.value
text: option.text
html: option.innerHTML
text: option_text
html: if option.innerHTML != "" then option.innerHTML else option_text
title: option.title if option.title
selected: option.selected
disabled: if group_disabled is true then group_disabled else option.disabled
Expand Down