Reactive Accordion Avoid Expand And Collapse on specific area inside a list

Hii,

I am using accordion inside a list i want to avoid Expand And Collapse on specific area of the accordion i have used javascript to do so but javascript is not working because accordion is inside a list. I want to implement this on the checkbox as shown in the image 

mvp_badge
MVP
Solution

Hi Adeeb,

The solution for your use-case is a bit tricky because of various reasons..

  • stopPropagation() invocation on the nested elements is not respected by the outer element's hierarchy
  • stopPropagation() invocation will also stop the checkbox default event

Considering the above-mentioned points, I have drafted a workaround solution. I'm not sure about the quality of approach, but it's working as required.

  • Add a custom style class to the Checkbox widget as highlighted below.

Demo: AccordionInsideListTask

Refer to the attached oml

I hope this helps you!


Kind regards,

Benjith Sam

RWALabAccordionTask.oml

Can you check this post? I think it has the solution to your problem.

https://www.outsystems.com/forums/discussion/67941/accordion-how-to-avoid-expand-collapse-on-header-when-user-click-check-box/

This is a solution for reactive

https://www.outsystems.com/forums/discussion/66177/reactive-accordion-item-onclick-triggered/#

The first link has the solution for traditional.

Let us know if it worked :)

Regards,

Márcio

I have tried this but it is only working on a single accordion but same thing is not working for the accordion inside a list

mvp_badge
MVP
Solution

Hi Adeeb,

The solution for your use-case is a bit tricky because of various reasons..

  • stopPropagation() invocation on the nested elements is not respected by the outer element's hierarchy
  • stopPropagation() invocation will also stop the checkbox default event

Considering the above-mentioned points, I have drafted a workaround solution. I'm not sure about the quality of approach, but it's working as required.

  • Add a custom style class to the Checkbox widget as highlighted below.

Demo: AccordionInsideListTask

Refer to the attached oml

I hope this helps you!


Kind regards,

Benjith Sam

RWALabAccordionTask.oml

Hi benjith,

Your solution is working perfect thankyou for the answer but i am still facing an issue due to that javascript code the checkbox is not working properly because i am having a nested list inside a block and by clicking on the checkbox i want to select all the checkbox nested in that current list record which was working fine when I am selecting it before implementing the javascript i can share you the oml if you want.

mvp_badge
MVP

Hi Adeeb, 

Sure, share your sample oml with implementation, and I'll give it a try to help you.


Kind regards,

Benjith Sam

Hi Benjith,

It worked perfectly thankyou so much for the solution.


Regards,

Adeeb Alam

mvp_badge
MVP

You're welcome, Adeeb.

Glad to help you :)


Kind regards,

Benjith Sam

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.