Skip to content

Commit b13304f

Browse files
committed
Update forms field component to handle multiple select
- Updated the `component.rb` file to handle multiple select fields.
1 parent c79d7c4 commit b13304f

File tree

1 file changed

+1
-1
lines changed
  • admin/app/components/solidus_admin/ui/forms/field

1 file changed

+1
-1
lines changed

admin/app/components/solidus_admin/ui/forms/field/component.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def self.select(form, method, choices, object: nil, hint: nil, tip: nil, size: :
4141
hint:,
4242
tip:,
4343
size: size,
44-
name: "#{object_name}[#{method}]",
44+
name: "#{object_name}[#{method}]#{'[]' if attributes[:multiple].present?}",
4545
choices:,
4646
value: (object.public_send(method) if object.respond_to?(method)),
4747
error: (errors.to_sentence.capitalize if errors),

0 commit comments

Comments
 (0)