You need to move the minlength so it nests the query:
<$list filter="minlength{$:/config/Search/minlength}]" emptyMessage="Search
is too short" >
<$list filter="[tag[Railroads]search:title{$:/temp/mysearch}]
-[[$:/temp/mysearch]]">
<$link><<currentTiddler>></$link><br>
</$list>
</$list>
Be sure $:/config/Search/minlength is set to whatever starting length value
you need.
On Saturday, December 14, 2019 at 3:16:44 PM UTC-8, Damon Pritchett wrote:
>
> Hey Tony,
>
> I'm trying to incorporate a custom search box using some of the code that
> Riz had above. It works for my needs except that if there is nothing typed
> in the search box, everything matching the filter shows up. I tried using
> minlength, but haven't been able to get it to work. The code I'm using is
> below:
>
> <div class="tc-sidebar-lists tc-sidebar-search">
>
>
> <$edit-text tiddler="$:/temp/mysearch" tag="input" default=""/>
> <$reveal state="$:/temp/mysearch" type="nomatch" text="">
> <$button class="tc-btn-invisible" tooltip="Clear searchbar">
> <$action-setfield $tiddler="$:/temp/mysearch" text=""/>
> {{$:/core/images/close-button}}
> </$button>
> </$reveal>
>
>
> <$list
> filter="[tag[Railroads]search:title{$:/temp/mysearch}minlength{$:/config/Search/minlength}]
>
> -[[$:/temp/mysearch]]">
> <$link><<currentTiddler>></$link><br>
> </$list>
>
>
> </div>
>
> Where am I going wrong? I'd like no results showing until I've typed at
> least three characters.
>
> Thanks,
>
> Damon
>
> On Tuesday, December 12, 2017 at 1:33:06 AM UTC-7, TonyM wrote:
>>
>> Lovely work Riz
>>
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/4a00e132-0e5f-4520-ba35-c9afa75565f5%40googlegroups.com.