For the 2nd part, wrap the lookup macro with a list that uses a minlength
operator:
<$list filter="[{$:/temp/mysearch}minlength[2]limit[1]]"
emptyMessage="Input length too short">
<$macrocall $name="list-links" filter={{$:/temp/searchfilter}} />
@@.fourcolumns
<div class="tc-table-of-contents">
<<toc-selective-expandable 'INDEX' sort[title]>>
</div>
@@
</$list>
Notice that I added in </div> . It wasn't there in your example code. All
tags must match in TW5 code. I also changed the search to $:/temp/mysearch
, so be sure to change that to whatever you decided to use.
You can change the number in minlength[2] to minlength[3] or whatever works
for you.
-- Mark
On Tuesday, December 10, 2019 at 4:03:37 PM UTC-8, PWL wrote:
>
> That did stop the side bar from doing the same search. Thank you. Looks
> much cleaner now. Now I have to figure out how to make it search for
> single character inputs.
>
> On Tuesday, 10 December 2019 19:49:06 UTC-4, Eric Shulman wrote:
>>
>> On Tuesday, December 10, 2019 at 1:49:26 PM UTC-8, PWL wrote:
>>>
>>> I am finding that the more entries I make the less efficient the side
>>> bar search is, if there is another option I am open to suggestions.
>>>
>>> Search <$select tiddler="$:/temp/searchfilter" default="Choose" tag=
>>> "input">
>>>
>>> <option value="Choose">-Choose one-</option>
>>> <option value="[has[intelligence]search:intelligence{$:/temp/search}]">
>>> Intelligence</option>
>>> <option value="[has[climate_terrain]search:climate_terrain{$:/temp/
>>> search}]">Climate/Terrain</option>
>>> <option value="[has[hd]search:hd{$:/temp/search}]">HD</option>
>>> </$select>
>>> <$edit-text tiddler="$:/temp/search" tag="input" />
>>>
>>> <$macrocall $name="list-links" filter={{$:/temp/searchfilter}} />
>>> @@.fourcolumns
>>> <div class="tc-table-of-contents">
>>> <<toc-selective-expandable 'INDEX' sort[title]>>
>>> @@
>>>
>>
>> There is one thing you could try that *might* save some computing cycles:
>>
>> You are basically doing your own search processing via the list-links
>> macro filter.
>> However, since you are using "$:/temp/search" to hold your search input
>> text,
>> it is also triggering the sidebar search, which means that the same work
>> is being done twice!
>>
>> To avoid this, just change the search input from "$:/temp/search" to
>> something else, like "$:/temp/mysearch".
>> (make sure to also change all your references to it in the $select option
>> entries.)
>>
>> I can't say for sure that this will make a significant difference, but it
>> might help, even if only a little bit.
>>
>> let me know how it goes...
>>
>> -e
>>
>>
--
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/416caefd-6e22-409d-b208-cc8a2de6455c%40googlegroups.com.