Commit ea0fcee894cd318ab3afc8421e1494fae5ed3de7
1 parent
ba7b7613
check repear first item active class
Showing
2 changed files
with
3 additions
and
3 deletions
| @@ -227,10 +227,10 @@ module Kanjai | @@ -227,10 +227,10 @@ module Kanjai | ||
| 227 | end | 227 | end |
| 228 | row_index = scope.pluck(:row_item).uniq.sort | 228 | row_index = scope.pluck(:row_item).uniq.sort |
| 229 | 229 | ||
| 230 | - row_index.each do |row_index| | 230 | + row_index.each_with_index do |row_index, position| |
| 231 | value = scope.where(row_item: row_index).collect{|item| [item.marker, item.text_value] }.to_h | 231 | value = scope.where(row_item: row_index).collect{|item| [item.marker, item.text_value] }.to_h |
| 232 | 232 | ||
| 233 | - if(row_index == 1) | 233 | + if(position == 0) |
| 234 | value['###FIRST_ITEM_ACTIVE###'] = 'active show' | 234 | value['###FIRST_ITEM_ACTIVE###'] = 'active show' |
| 235 | value['###FIRST_ITEM_TRUE###'] = 'true' | 235 | value['###FIRST_ITEM_TRUE###'] = 'true' |
| 236 | value['###FIRST_ITEM_FALSE###'] = 'false' | 236 | value['###FIRST_ITEM_FALSE###'] = 'false' |