From 65856b650cb48c7e474d6078166c217f5703056d Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Mon, 21 Apr 2025 22:29:14 -0600 Subject: [PATCH] Add a meh placeholder to the select --- module/Apps/StatsViewer.mjs | 7 +++++++ public/templates/Apps/StatsViewer/dataFilters.hbs | 1 + 2 files changed, 8 insertions(+) diff --git a/module/Apps/StatsViewer.mjs b/module/Apps/StatsViewer.mjs index 78f5be4..9c532a5 100644 --- a/module/Apps/StatsViewer.mjs +++ b/module/Apps/StatsViewer.mjs @@ -43,6 +43,13 @@ export class StatsViewer extends HandlebarsApplicationMixin(ApplicationV2) { async _onRender(context, options) { await super._onRender(context, options); + /* + Removes the Foundry empty placeholder and allows my custom placeholder. + See: https://github.com/foundryvtt/foundryvtt/issues/12572 + */ + this.element.querySelector(`multi-select option:first-child:empty`) + ?.remove(); + const elements = this.element .querySelectorAll(`[data-bind]`); for (const input of elements) { diff --git a/public/templates/Apps/StatsViewer/dataFilters.hbs b/public/templates/Apps/StatsViewer/dataFilters.hbs index cd9b5c0..40aeac6 100644 --- a/public/templates/Apps/StatsViewer/dataFilters.hbs +++ b/public/templates/Apps/StatsViewer/dataFilters.hbs @@ -6,6 +6,7 @@ + {{ st-options selectedUsers users }}