fix: use all_custom_fields in handle_info(:field_toggled)

Fixes bug where globally hidden custom fields could not be enabled via dropdown
This commit is contained in:
Moritz 2025-12-03 18:07:37 +01:00
parent f5b67de870
commit 75e1fc8a3a

View file

@ -292,12 +292,12 @@ defmodule MvWeb.MemberLive.Index do
# Save to session (cookie will be saved on next page load via handle_params)
socket = update_session_field_selection(socket, new_selection)
# Merge with global settings
# Merge with global settings (use all_custom_fields to allow enabling globally hidden fields)
final_selection =
FieldVisibility.merge_with_global_settings(
new_selection,
socket.assigns.settings,
socket.assigns.custom_fields_visible
socket.assigns.all_custom_fields
)
# Get visible fields