Okay I was able to circumvent the issue by using two separate buttons that replace one another when clicked. Actually the exact same thing is used in https://tiddlywiki.com/#ButtonWidget. No clue why I did not do it this way in the beginning.
<$reveal state="$:/state/petri/sidebar1" type="match" text="hide"> <$button class="sidebar-collapsible" set="$:/state/petri/sidebar1" setTo="show"> Title matches: </$button> </$reveal> <$reveal state="$:/state/petri/sidebar1" type="match" text="show"> <$button class="sidebar-collapsible-onclick" set="$:/state/petri/sidebar1" setTo="hide"> Title matches: </$button> -Petri On Monday, November 1, 2021 at 2:53:11 PM UTC+2 Petri M. wrote: > Thanks for the comment! But should it not be triggered on the click as > well? "If the popup is triggered OR..." I would assume that it should still > trigger when the button is clicked, even if the second part is never true? > But yes I actually made a post here > <https://groups.google.com/g/tiddlywiki/c/pjT4iV_wHE4/m/AP2LDgUdAwAJ> and > you helped me in making this button. It worked just fine, I remember having > it all set up and I was pleased. > > -Petri > On Monday, November 1, 2021 at 2:10:31 PM UTC+2 Eric Shulman wrote: > >> According to the documentation in https://tiddlywiki.com/#ButtonWidget, >> the `selectedClass` parameter is assigned "if the popup is triggered or *the >> tiddler specified in set already has the value specified in setTo*" >> >> However, in your `$button` code, the `setTo` parameter is calculated >> using a filtered transclusion whose value will always be the *opposite* >> of the current value stored in the `$:/state/petri/sidebar3` tiddler. >> Thus, the `selectedClass` is never applied. >> >> Are you certain that this used to work "a few weeks back"? >> >> -e >> > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/0b807590-9662-4112-b6e4-3ab7c18ae153n%40googlegroups.com.