title: $:/plugins/tiddlywiki/menubar/items/search custom-menu-content: {{$:/plugins/tiddlywiki/menubar/items/search}} description: Search caption: Search tags: $:/tags/MenuBar \define cancel-search-actions() <$set name="userInput" value={{{ [<__storeTitle__>get[text]] }}}> <$list filter="[<__tiddler__>get[text]!match]" emptyMessage="""<$action-deletetiddler $filter="[<__storeTitle__>] [<__tiddler__>] [<__selectionStateTitle__>]"/>"""> <$action-setfield $tiddler=<<__tiddler__>> text=<>/><$action-setfield $tiddler=<<__refreshTitle__>> text="yes"/> \end \define input-accept-actions() <$list filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]" emptyMessage="""<$list filter="[<__tiddler__>get[text]!is[missing]] ~[<__tiddler__>get[text]is[shadow]]"><$action-navigate $to={{{ [<__tiddler__>get[text]] }}}/>"""><$action-navigate $to={{{ [<__tiddler__>get[text]] }}}/> \define input-accept-variant-actions() <$list filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]" emptyMessage="""<$list filter="[<__tiddler__>get[text]!is[missing]] ~[<__tiddler__>get[text]is[shadow]]"><$list filter="[<__tiddler__>get[text]minlength[1]]"><$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<__tiddler__>get[text]] }}}/>"""><$list filter="[<__tiddler__>get[text]minlength[1]]"><$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<__tiddler__>get[text]] }}}/> \define set-next-input-tab(beforeafter:"after") <$macrocall $name="change-input-tab" stateTitle="$:/state/tab/search-results/sidebar" tag="$:/tags/SearchResults" beforeafter="$beforeafter$" defaultState={{$:/config/SearchResults/Default}} actions="""<$action-setfield $tiddler="$:/state/search/currentTab" text=<>/>"""/> \whitespace trim <$vars searchTiddler="$:/temp/menubarsearch/input" searchListState=<>> <$keyboard key="((input-tab-right))" actions=<>> <$keyboard key="((input-tab-left))" actions=<>> <$macrocall $name="keyboard-driven-input" tiddler="$:/temp/menubarsearch" storeTitle=<> selectionStateTitle=<> refreshTitle="$:/temp/menubarsearch/refresh" tag="input" type="search" focusPopup="$:/state/popup/menubar-search-dropdown" class="tc-popup-handle tc-menu-show-when-wide" placeholder="Search..." default="" cancelPopups="yes" inputAcceptActions=<> inputAcceptVariantActions=<> inputCancelActions=<> filterMinLength={{$:/config/Search/MinLength}} configTiddlerFilter="[[$:/state/search/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}]" /> <$reveal tag="div" class="tc-block-dropdown-wrapper" state="$:/state/popup/menubar-search-dropdown" type="nomatch" text="" default="">
<$list filter="[get[text]minlength[1]]" emptyMessage="""
Type your search terms
""" variable="ignore"> <$list filter="[get[text]minlength{$:/config/Search/MinLength}limit[1]]" emptyMessage="""
{{$:/language/Search/Search/TooShort}}
""" variable="listItem"> <$vars configTiddler={{{ [[$:/state/search/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}] }}} userInput={{{ [get[text]] }}}> {{$:/core/ui/SearchResults}}