8
Views
2
Comments
Solved
Events and Blocks - Switch
Application Type
Reactive

Hi Buddies,


I have one question:


I'm developing blocks.

I have two blocks: a block "Search" and I have another block "Category_Block". 

The "Category_Block" is the parent of the block "Search". They are inside "Category" page.


Block "Search"


Block "Category_Block"


In the Parent Block when I press the Switch Widget the data in the Parent Block doesn't refresh or switch.

I don't know where is the issue.


Can you help me please?


I send you the oml file attached.


Thank you in advance.


Best regards, 

FC

Cash.oml

Rank: #94
Solution

Hello Fábio,

Hope you're doing well.


"In the Parent Block when I press the Switch Widget the data in the Parent Block doesn't refresh or switch."

I believe your description is not entirely correct since your Switch widget is inside the child block (Search) and not inside the parent block :)


As far as I understood, you are clicking on this Switch widget of Search Block (child), but you're not getting the expected result from your Category_Block Block (parent).


I believe this is happening because you are not passing the variable bound to that Switch widget (IsAscending) to the parent when you're triggering the event Event_OnChangeSortAscending:

It seems that you're missing this value:

Hope that this helps you!


Kind regards,

Rui Barradas