diff --git a/plugins/tiddlywiki/menubar/items/search.tid b/plugins/tiddlywiki/menubar/items/search.tid index 8e0ba6482..e4e386be0 100644 --- a/plugins/tiddlywiki/menubar/items/search.tid +++ b/plugins/tiddlywiki/menubar/items/search.tid @@ -8,14 +8,20 @@ tags: $:/tags/MenuBar \define input-accept-actions() <$action-navigate $to={{{ [<__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=<> titleSearchFilter="[!is[system]search:titlesort[title]limit[250]]" allSearchFilter="[!is[system]searchsort[title]limit[250]]"> +<$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" - primaryListFilter=<> secondaryListFilter=<> inputAcceptActions=<> - inputCancelActions=<> filterMinLength={{$:/config/Search/MinLength}}/> + inputAcceptActions=<> 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=""> @@ -25,8 +31,12 @@ tags: $:/tags/MenuBar <$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}} + +