Skip to content

Commit

Permalink
Change display property of groups to list-item when results match. Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pfiller committed Nov 15, 2011
1 parent 16b6f50 commit 31cd33f
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion chosen/chosen.jquery.js
Expand Up @@ -725,7 +725,7 @@
result.html(text);
this.result_activate(result);
if (option.group_array_index != null) {
$("#" + this.results_data[option.group_array_index].dom_id).css('display', 'auto');
$("#" + this.results_data[option.group_array_index].dom_id).css('display', 'list-item');
}
} else {
if (this.result_highlight && result_id === this.result_highlight.attr('id')) {
Expand Down
2 changes: 1 addition & 1 deletion chosen/chosen.jquery.min.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion chosen/chosen.proto.js
Expand Up @@ -728,7 +728,9 @@
}
this.result_activate($(result_id));
if (option.group_array_index != null) {
$(this.results_data[option.group_array_index].dom_id).show();
$(this.results_data[option.group_array_index].dom_id).setStyle({
display: 'list-item'
});
}
} else {
if ($(result_id) === this.result_highlight) {
Expand Down
2 changes: 1 addition & 1 deletion chosen/chosen.proto.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion coffee/chosen.jquery.coffee
Expand Up @@ -416,7 +416,7 @@ class Chosen extends AbstractChosen
result.html(text)
this.result_activate result

$("#" + @results_data[option.group_array_index].dom_id).css('display', 'auto') if option.group_array_index?
$("#" + @results_data[option.group_array_index].dom_id).css('display', 'list-item') if option.group_array_index?
else
this.result_clear_highlight() if @result_highlight and result_id is @result_highlight.attr 'id'
this.result_deactivate result
Expand Down
2 changes: 1 addition & 1 deletion coffee/chosen.proto.coffee
Expand Up @@ -407,7 +407,7 @@ class Chosen extends AbstractChosen

this.result_activate $(result_id)

$(@results_data[option.group_array_index].dom_id).show() if option.group_array_index?
$(@results_data[option.group_array_index].dom_id).setStyle({display: 'list-item'}) if option.group_array_index?
else
this.result_clear_highlight() if $(result_id) is @result_highlight
this.result_deactivate $(result_id)
Expand Down

0 comments on commit 31cd33f

Please sign in to comment.