Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion app/components/katalyst/tables/orderable/form_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,15 @@ def initialize(collection:, url:, id: nil, scope: nil)
end

def call
form_with(id:, url:, method: :patch, data: {
form_with(id:,
url:,
method: :patch,
data: {
controller: FORM_CONTROLLER,
"#{FORM_CONTROLLER}-scope-value": @scope,
},
html: {
hidden: "",
}) do |form|
form.button(hidden: "")
end
Expand Down
2 changes: 1 addition & 1 deletion spec/components/katalyst/tables/orderable_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<form id="#{form_id}"
data-controller="tables--orderable--form"
data-tables--orderable--form-scope-value="order[faqs]"
action="/faqs/order" accept-charset="UTF-8" method="post">
action="/faqs/order" accept-charset="UTF-8" method="post" hidden="hidden">
<input type="hidden" name="_method" value="patch">
<button name="button" type="submit" hidden="hidden">Save </button>
</form>
Expand Down
Loading