Skip to content

Commit

Permalink
Reset filter_value and chosen_vm values when filter type is changed.
Browse files Browse the repository at this point in the history
  • Loading branch information
h-kataria committed Jan 10, 2018
1 parent 77efd28 commit 4a37036
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/controllers/planning_controller.rb
Expand Up @@ -58,7 +58,8 @@ def option_changed
filter_typ = params[:filter_typ] == "<Choose>" ? nil : params[:filter_typ]

@sb[:options][:filter_typ] = filter_typ
@sb[:vms] = wizard_get_vms('all', nil) if filter_typ == 'all'
@sb[:vms] = filter_typ == 'all' ? wizard_get_vms('all', nil) : nil
@sb[:options][:filter_value] = @sb[:options][:chosen_vm] = nil
end

if params[:filter_value].present?
Expand Down

0 comments on commit 4a37036

Please sign in to comment.