Hi Mark,
I checked the value of minlength and it is 3. I copied your code over, but
it didn't make any difference. If there is nothing typed in the text box,
all tiddlers tagged Railroads show up in the list. As I'm typing each
character changes the list even the first character.
Damon
On Saturday, December 14, 2019 at 4:33:18 PM UTC-7, Mark S. wrote:
>
>
> 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/8e0c4ceb-4825-4316-ae32-e38bc5efa3b3%40googlegroups.com.