Hi, I hope you guys are having a great day, I have 2 questions.
I have a button inside a card that is also a button, if I click at the button inside it triggers the card action also. How can I make it so that it doesn’t work that way using no-code/custom javascript,
What is the best approach to make interaction in WeWeb? i.e. if something goes from no display to display it fades in or the sidebar slides in and out when on click.
For your point 1), you can use custom JS and event.stopPropagation(), which will stop the event so the action on the parent button will not trigger.
For your point 2) you can use the transform/animation property to have animation activated.
Sorry for 1 actually I don’t understand javascript much, can you show me an example how to do it for my case? On the 2nd I also don’t understand how to properly setup the animation in weweb. I hope you can clarify
Thank you, 1 works perfectly, on the 2nd, I try to bind the opacity of a card to a variable called ‘opacitycard’, which is default at 0, and made a workflow for a button to change the variable to 1, the transition I put for the card doesn’t seems to be working.
doesn’t work I don’t know why. Nvm I used the modal kit for the previous use case. Btw can I make an animation like svelte where if a user searches a table, the results/table row kinda blinks/or changes opacity u would say
indeed the modal element has builtin animations for transitions between show and hide. If you are using another element and still need help add some screenshot about your setup (eg. forbula of the binded opacity, transition property, workflow actions changing the transition)
I’m facing this exact issue (#1), but my parent card is linking to something rather than a workflow being triggered.
When I click on the button in the card, the parent card link is being triggered but I don’t want that, just want the button workflow to be triggered. How do I do that? The eventpropogation JS code doesn’t work in this case.
How do I “disable” the parent card’s link if I’m clicking the button inside the card?