<div class="gridView__filterBar">
<div class="gridView__filters" id="{$view->getID()}_filters">
{foreach from=$view->getActiveFilters() item='value' key='key'}
- <button type="button" class="button small" data-filter="{$key}" data-filter-value="{$value}">{$view->getFilterLabel($key)}</button>
+ <button type="button" class="button small" data-filter="{$key}" data-filter-value="{$value}">
+ {icon name='circle-xmark'}
+ {$view->getFilterLabel($key)}
+ </button>
{/foreach}
</div>
<div class="gridView__filterButton">
const button = document.createElement("button");
button.type = "button";
button.classList.add("button", "small");
- button.innerText = labels[key];
+ const icon = document.createElement("fa-icon");
+ icon.setIcon("circle-xmark");
+ button.append(icon, labels[key]);
button.addEventListener("click", () => {
this.#removeFilter(key);
});
const button = document.createElement("button");
button.type = "button";
button.classList.add("button", "small");
- button.innerText = labels[key];
+ const icon = document.createElement("fa-icon");
+ icon.setIcon("circle-xmark");
+ button.append(icon, labels[key]);
button.addEventListener("click", () => {
this.#removeFilter(key);
});
justify-content: space-between;
border-bottom: 1px solid var(--wcfContentBorder);
padding-bottom: 10px;
+ gap: 5px;
+}
+
+.gridView__filters {
+ display: flex;
+ gap: 5px;
+ flex-wrap: wrap;
+}
+
+.gridView__filterButton {
+ flex: 0 0 auto;
}
.gridView__pagination {