Skip to content

Commit

Permalink
fix: make radio button checked
Browse files Browse the repository at this point in the history
  • Loading branch information
remy727 committed Aug 26, 2024
1 parent 4a91e01 commit c4e56af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/components/polaris/base_radio_button.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def system_arguments
opts[:disabled] = true if @disabled
opts[:aria] ||= {}
opts[:aria][:checked] = @checked
opts[:checked] = @checked
opts[:class] = opts.delete(:classes)
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
<%= form.polaris_radio_button(:access,
value: :allow,
label: "Allow access",
checked: true,
) %>
<%= form.polaris_radio_button(:access,
value: :deny,
label: "Deny access",
checked: false,
) %>
<% end %>

0 comments on commit c4e56af

Please sign in to comment.