fix(tenancy): use x-if instead of x-show for edit modal
Some checks failed
CI / ruff (push) Successful in 13s
CI / dependency-scanning (push) Has been cancelled
CI / docs (push) Has been cancelled
CI / deploy (push) Has been cancelled
CI / validate (push) Has been cancelled
CI / pytest (push) Has been cancelled

x-model bindings crash when selectedMember is null because x-show
keeps DOM elements alive. x-if removes them entirely, preventing
the "can't access property of null" errors on page load.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-29 14:12:53 +02:00
parent 157b4c6ec3
commit dab5560de8

View File

@@ -270,7 +270,8 @@
<!-- ==================== EDIT MODAL ==================== --> <!-- ==================== EDIT MODAL ==================== -->
{% call modal('editModal', _('tenancy.team.edit_member'), 'showEditModal', size='md', show_footer=false) %} {% call modal('editModal', _('tenancy.team.edit_member'), 'showEditModal', size='md', show_footer=false) %}
<div x-show="selectedMember" class="space-y-4"> <template x-if="selectedMember">
<div class="space-y-4">
<!-- Profile fields --> <!-- Profile fields -->
<div class="space-y-3"> <div class="space-y-3">
<h4 class="text-sm font-medium text-gray-700 dark:text-gray-300">{{ _('tenancy.team.personal_info') }}</h4> <h4 class="text-sm font-medium text-gray-700 dark:text-gray-300">{{ _('tenancy.team.personal_info') }}</h4>
@@ -339,6 +340,7 @@
</button> </button>
</div> </div>
</div> </div>
</template>
{% endcall %} {% endcall %}
<!-- ==================== REMOVE MODAL ==================== --> <!-- ==================== REMOVE MODAL ==================== -->