fix dropdowns in table header

This commit is contained in:
Manuel Gugger 2023-03-22 10:12:11 +01:00
parent 12bdddd995
commit 06728a0985
2 changed files with 26 additions and 26 deletions

View File

@ -85,11 +85,5 @@
z-index: 6;
pointer-events: none
}
.is-borderless {
padding: 0;
border: none;
background: none;
}
</style>

View File

@ -80,21 +80,24 @@
<th>
<div class="dropdown is-hoverable">
<div class="dropdown-trigger">
<button class="button is-borderless" aria-haspopup="true" aria-controls="dropdown-menu4">
<span>{{ view_model.primary_key | split(pat="_") | join(sep=" ") | title }}</span>
<!-- <span class="icon is-small">
<i class="fas fa-angle-down" aria-hidden="true"></i>
</span> -->
</button>
<div class="navbar-item has-dropdown" aria-haspopup="true"
aria-controls="dropdown-menu4">
<a class="navbar-link">
<span>{{ view_model.primary_key | split(pat="_") | join(sep=" ") | title
}}</span>
</a>
</div>
</div>
<div class="dropdown-menu" id="dropdown-menu4" role="menu">
<div class="dropdown-content">
<div class="dropdown-item is-clickable" onclick="sort_by('{{ view_model.primary_key }}', 'Asc');">
Sort by Asc <i class="ml-1 fa-solid fa-caret-up"></i>
</div>
<div class="dropdown-item is-clickable" onclick="sort_by('{{ view_model.primary_key }}', 'Desc');">
<div class="dropdown-item is-clickable"
onclick="sort_by('{{ view_model.primary_key }}', 'Desc');">
Sort by Desc <i class="ml-1 fa-solid fa-caret-down"></i>
</div>
<div class="dropdown-item is-clickable"
onclick="sort_by('{{ view_model.primary_key }}', 'Asc');">
Sort by Asc <i class="ml-1 fa-solid fa-caret-up"></i>
</div>
</div>
</div>
</div>
@ -104,21 +107,24 @@
<th>
<div class="dropdown is-hoverable">
<div class="dropdown-trigger">
<button class="button is-borderless" aria-haspopup="true" aria-controls="dropdown-menu4">
<span>{{ model_field.field_name | split(pat="_") | join(sep=" ") | title }}</span>
<!-- <span class="icon is-small">
<i class="fas fa-angle-down" aria-hidden="true"></i>
</span> -->
</button>
<div class="navbar-item has-dropdown" aria-haspopup="true"
aria-controls="dropdown-menu4">
<a class="navbar-link">
<span>{{ model_field.field_name | split(pat="_") | join(sep=" ") | title
}}</span>
</a>
</div>
</div>
<div class="dropdown-menu" id="dropdown-menu4" role="menu">
<div class="dropdown-content">
<div class="dropdown-item is-clickable" onclick="sort_by('{{ model_field.field_name }}', 'Asc');">
Sort by Asc <i class="ml-1 fa-solid fa-caret-up"></i>
</div>
<div class="dropdown-item is-clickable" onclick="sort_by('{{ model_field.field_name }}', 'Desc');">
<div class="dropdown-item is-clickable"
onclick="sort_by('{{ model_field.field_name }}', 'Desc');">
Sort by Desc <i class="ml-1 fa-solid fa-caret-down"></i>
</div>
<div class="dropdown-item is-clickable"
onclick="sort_by('{{ model_field.field_name }}', 'Asc');">
Sort by Asc <i class="ml-1 fa-solid fa-caret-up"></i>
</div>
</div>
</div>
</div>