Skip to content

Commit

Permalink
Merge pull request #211 from dannyhajj/select-filter
Browse files Browse the repository at this point in the history
Compare a dropdown's filter active value to the raw key value from the array
  • Loading branch information
ThaDafinser committed Sep 22, 2015
2 parents db4e0b3 + a5d8388 commit 61fd074
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion view/zfc-datagrid/renderer/bootstrapTable/layout.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ if($this->rowClickAction !== null){
if ($col->hasFilterSelectOptions() === true) {
$htmlFilter = '<select name="toolbarFilters[' . $col->getUniqueId() . ']" style="width: 80%" onchange="this.form.submit()" class="form-control" >';
foreach ($col->getFilterSelectOptions() as $value => $option) {
if ($col->getFilterActiveValue() == sprintf($col->getFilterDefaultOperation(), $value)) {
if ($col->getFilterActiveValue() === $value) {
$htmlFilter .= '<option value="' . $value . '" selected="selected">' . $option . '</option>';
} else if (($col->getFilterActiveValue() === '') && ($value === '')){
$htmlFilter .= '<option value="' . $value . '" selected="selected">' . $option . '</option>';
Expand Down

0 comments on commit 61fd074

Please sign in to comment.