You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Almost certainly my bad tbh but my child component seems to be triggering events in the parent component, not in its own UnicornView. It could be because I have nested one component in another, so the parent is itself a component called from a Django template and that is sending it up its arse. If you can shed any light, or if this is a vulnerability to highlight, I am grateful to know either way.
Parent component: components/is_epilepsy.py
classIsEpilepsyView(UnicornView):
desscribe=DESSCRIBE.objects.none()
case_id=""registration=""def__init__(self, *args, **kwargs):
super().__init__(**kwargs) # calling super is requiredself.case_id=kwargs.get("case_id")
self.registration=kwargs.get("registration")
...
The parent component contains a select element which should render different children depending on the value selected.
Each child (epileptic_seizure_onset and non_epileptic_seizure_onset) has a corresponding UnicornView component which mounts. However, any change etc events within these children fire not in their own component logic (found in components/epileptic_seizure_onset and components/non_epileptic_seizure_onset.py), but in the parent (is_epilepsy.py). In the console, the url I see is:
I have the same issue.
The function in a child components are send to the parent component.
For now i just made it one big component but child components would make it a lot less cluttered
I think this should be fixed by 0.58.0 of Unicorn which drastically improves child components so I'm going to close it. If it is still a problem feel free to re-open this and create a failing test or small example in the example app of this repo to replicate, though. Thank you!
Almost certainly my bad tbh but my child component seems to be triggering events in the parent component, not in its own UnicornView. It could be because I have nested one component in another, so the parent is itself a component called from a Django template and that is sending it up its arse. If you can shed any light, or if this is a vulnerability to highlight, I am grateful to know either way.
Parent component:
components/is_epilepsy.py
Parent template:
templates/unicorn/is_epilepsy.html
The parent component contains a select element which should render different children depending on the value selected.
Each child (
epileptic_seizure_onset
andnon_epileptic_seizure_onset
) has a corresponding UnicornView component which mounts. However, any change etc events within these children fire not in their own component logic (found incomponents/epileptic_seizure_onset
andcomponents/non_epileptic_seizure_onset.py
), but in the parent (is_epilepsy.py
). In the console, the url I see is:I am guessing this is my implementation rather than an issue as such?
The text was updated successfully, but these errors were encountered: