Open
Description
I use custom renderer, and in some places has double classes('selected selected').
May be problem in SimpleNavigation::Item.html_options, if I call it twice I get double classes
(if I set any html options in navigation.rb for item).
def html_options
// Here, if my options[:html] is not blank, I get Link not copy to @options[:html]
html_opts = options.fetch(:html) { Hash.new }
html_opts[:id] ||= autogenerated_item_id
classes = [html_opts[:class], selected_class, active_leaf_class]
classes = classes.flatten.compact.join(' ')
// And at this place, it modifies @options[:html], If I call this method second time, it will be
// doubled(selected_class and active_leaf_class will be added second time)
html_opts[:class] = classes if classes && !classes.empty?
html_opts
end
Metadata
Metadata
Assignees
Labels
No labels