Skip to content

Commit

Permalink
Merge pull request #439 from remy727/bugfix/form-radio-button
Browse files Browse the repository at this point in the history
Fix radio button checked status
  • Loading branch information
kirillplatonov authored Aug 26, 2024
2 parents 4a91e01 + c4e56af commit b9eb4ee
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 b9eb4ee

Please sign in to comment.