Open sergiopmdeveloper opened 6 days ago
IMPORTANT
Is related to the use of table tags (th, td and tr) in a child component. When I replace them with normal tags like div, h1, p or span it works perfectly. So this is a bug related to the table tags!!!!
Bug Description
I have a for loop inside a component that renders multiple times a child component (a table with rows). These rows contain a button that updates the state of the component to show a modal in a reactive way. This interaction works, what is not displayed reactively is the modal when the state has changed. I have tried everything but nothing works.
The property that does not work in a reactive way is displayed_modal, and I can assure you that the change from False to True does occur because I have debugged it. It is not a problem with the interface either, because when you load the page with this status set to True for testing purposes, the modals are displayed. What doesn't work is the reactivity.
Expected behaviour
The modal is displayed in a reactive manner based on the change of state.
Screenshots / Screenrecords
Parent component:
from django.db.models.query import QuerySet from django_unicorn.components import UnicornView
from apps.passwords.models import Password from authentication.models import AppUser
class PasswordTableView(UnicornView): """ Password table component """
Parent template:
{# Password table component #}
{% load unicorn %}
Passwords
Child component:
from django_unicorn.components import UnicornView
from apps.passwords.components.password_table import PasswordTableView from apps.passwords.models import Password
class PasswordRowView(UnicornView): """ Password table component """
Child template:
**********
Warning
You are about to delete the password {{ password.name }}. Are you sure you want to proceed?
Steps to reproduce
No response
What browsers are you seeing the problem on?
No response
👀 Have you checked for similar open issues?
Code of Conduct
Are you willing to work on this issue ?
None