Skip to content

Commit

Permalink
Merge pull request #17027 from opf/bug/58467-item-add-form-disappears…
Browse files Browse the repository at this point in the history
…-after-added-a-new-item-to-a-custom-field-of-type-hierarchy

[58467] Changed add hierarchical item behavior
  • Loading branch information
apfohl authored Oct 24, 2024
2 parents d9aa14e + 0f5114c commit 0f48bb8
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ def create
.new
.insert_item(**item_input)
.either(
->(_) { update_via_turbo_stream(component: ItemsComponent.new(custom_field: @custom_field)) },
->(_) do
update_via_turbo_stream(component: ItemsComponent.new(custom_field: @custom_field,
new_item_form_data: { show: true }))
end,
->(validation_result) { add_errors_to_form(validation_result) }
)

Expand Down

0 comments on commit 0f48bb8

Please sign in to comment.