Skip to content

Commit

Permalink
[58467] Changed add hierarchical item behavior
Browse files Browse the repository at this point in the history
When adding a new item in the hierarchy the item form will stay open for
the next entry.
  • Loading branch information
apfohl committed Oct 24, 2024
1 parent cb3a629 commit 0f5114c
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 0f5114c

Please sign in to comment.