Jermolene / TiddlyWiki5

A self-contained JavaScript wiki for the browser, Node.js, AWS Lambda etc.
https://tiddlywiki.com/
Other
7.78k stars 1.16k forks source link

Can update sidebar content when search editor change? #8251

Closed lilixiong2018 closed 2 weeks ago

lilixiong2018 commented 2 weeks ago

Is your feature request related to a problem? Please describe. No or not found.

Describe the solution you'd like I create a sidebar tab as that:

<$edit-text field="search" placeholder="enter prefix string to search" size="30"/>

<$set field=search name=term tiddler=<<currentTiddler>> >
<$list filter="[!is[system]prefix<term>!sort[modified]]" template="$:/core/ui/ListItemTemplate" emptyMessage="Not found."/>

</$set>

it works if the searchbox is empty. When I change the searchbox's content, the results don't update.

Describe alternatives you've considered Hope sidebar content can be updated when searchbox's content change.

Additional context

kookma commented 2 weeks ago

Use this one

<$edit-text field="search" tiddler="$:/temp/search" placeholder="enter prefix string to search" size="30"/>

<$set field=search name=term tiddler="$:/temp/search" >
<$list filter="[!is[system]prefix<term>!sort[modified]]" template="$:/core/ui/ListItemTemplate" emptyMessage="Not found."/>

</$set>

Note the tiddler I have set both in $edit-text and $set widgets.

To know the reason read the last paragraph of https://tiddlywiki.com/prerelease/#tabs%20Macro

lilixiong2018 commented 2 weeks ago

It works, thanks much.