From f920f7969f509235bb8f0cf2deb2087d2865bfeb Mon Sep 17 00:00:00 2001 From: Stanislav Romanov Date: Sat, 10 Sep 2022 18:14:42 +0300 Subject: [PATCH] Add clear button to sort popup --- app/components/divider.hbs | 2 +- .../admin/indexes/item/documents/index.hbs | 19 +++++++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/app/components/divider.hbs b/app/components/divider.hbs index ca66f1c..75aa08e 100644 --- a/app/components/divider.hbs +++ b/app/components/divider.hbs @@ -1 +1 @@ -
+
diff --git a/app/templates/admin/indexes/item/documents/index.hbs b/app/templates/admin/indexes/item/documents/index.hbs index 8acd955..e9376af 100644 --- a/app/templates/admin/indexes/item/documents/index.hbs +++ b/app/templates/admin/indexes/item/documents/index.hbs @@ -36,6 +36,16 @@
{{/each}} + + + + +
+ Clear +
+
@@ -59,7 +69,7 @@ @checked={{not (includes item this.hiddenFields)}} @label={{namelize item}} @onChange={{fn this.toggleHiddenField item}} - class="w-full whitespace-nowrap" + class='w-full whitespace-nowrap' /> {{/each}} @@ -103,7 +113,12 @@ {{/if}} {{#each this.attributes as |field|}} - {{#if (and (not-eq field @model.index.primaryKey) (not (includes field this.hiddenFields)))}} + {{#if + (and + (not-eq field @model.index.primaryKey) + (not (includes field this.hiddenFields)) + ) + }}