mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-04-05 10:16:57 +00:00
Tag completion min length (#3190)
* tested with tw5.com index.html * Controls the length of the input before the tag list is filtered
This commit is contained in:
parent
e4660a8cc1
commit
2e8eb15536
3
core/wiki/config/TagsMinLength.tid
Normal file
3
core/wiki/config/TagsMinLength.tid
Normal file
@ -0,0 +1,3 @@
|
||||
title: $:/config/Tags/MinLength
|
||||
|
||||
0
|
@ -6,6 +6,11 @@ tags: $:/tags/Macro
|
||||
<$action-deletetiddler $tiddler="$:/temp/NewTagName"/>
|
||||
\end
|
||||
|
||||
\define add-tag-actions()
|
||||
<$action-sendmessage $message="tm-add-tag" $param={{$:/temp/NewTagName}}/>
|
||||
<$action-deletetiddler $tiddler="$:/temp/NewTagName"/>
|
||||
\end
|
||||
|
||||
\define tag-button()
|
||||
<$button class="tc-btn-invisible" tag="a">
|
||||
$(actions)$
|
||||
@ -34,13 +39,15 @@ $actions$
|
||||
<div class="tc-block-dropdown-wrapper">
|
||||
<$reveal state=<<qualify "$:/state/popup/tags-auto-complete">> type="nomatch" text="" default="">
|
||||
<div class="tc-block-dropdown">
|
||||
<$list filter="[{$:/temp/NewTagName}minlength{$:/config/Tags/MinLength}limit[1]]" emptyMessage="""<div class="tc-search-results">{{$:/language/Search/Search/TooShort}}</div>""" variable="listItem">
|
||||
<$list filter="[tags[]!is[system]search:title{$:/temp/NewTagName}sort[]]" variable="tag">
|
||||
<<tag-button>>
|
||||
</$list>
|
||||
</$list></$list>
|
||||
<hr>
|
||||
<$list filter="[{$:/temp/NewTagName}minlength{$:/config/Tags/MinLength}limit[1]]" emptyMessage="""<div class="tc-search-results">{{$:/language/Search/Search/TooShort}}</div>""" variable="listItem">
|
||||
<$list filter="[tags[]is[system]search:title{$:/temp/NewTagName}sort[]]" variable="tag">
|
||||
<<tag-button>>
|
||||
</$list>
|
||||
</$list></$list>
|
||||
</div>
|
||||
</$reveal>
|
||||
</div>
|
||||
|
@ -0,0 +1,11 @@
|
||||
created: 201712032331
|
||||
modified: 201712032331
|
||||
tags: [[Hidden Settings]]
|
||||
title: Hidden Setting: Tags Minimum Length
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.from-version "5.1.16">> Tag Dropdown: Controls the minimum length of an input string before results are displayed.
|
||||
|
||||
Defaults to "0".
|
||||
|
||||
$:/config/Tags/MinLength
|
Loading…
x
Reference in New Issue
Block a user