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; z-index: 6;
pointer-events: none pointer-events: none
} }
.is-borderless {
padding: 0;
border: none;
background: none;
}
</style> </style>

View File

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