mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-06-29 03:43:09 -04:00
Only show find as you type if enough templates
The find as you type only becomes useful once you have too many templates to quickly scan visually on the page. I reckon that 7 is the number where this starts becoming tricky. About 5 fit on the page without scrolling (on my Macbook).
This commit is contained in:
@@ -47,14 +47,16 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div data-module="autofocus">
|
||||
<div class="live-search" data-module="live-search" data-targets="#template-list .column-whole">
|
||||
{{ textbox(
|
||||
search_form.search,
|
||||
width='1-1'
|
||||
) }}
|
||||
{% if templates|length > 7 %}
|
||||
<div data-module="autofocus">
|
||||
<div class="live-search" data-module="live-search" data-targets="#template-list .column-whole">
|
||||
{{ textbox(
|
||||
search_form.search,
|
||||
width='1-1'
|
||||
) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<nav class="grid-row" id=template-list>
|
||||
{% for template in templates %}
|
||||
|
||||
Reference in New Issue
Block a user