From 4ef30ba2ec657596ad12ee62def2bcb2d7701075 Mon Sep 17 00:00:00 2001 From: Paul Maskelyne Date: Mon, 9 Oct 2023 12:20:11 +0100 Subject: [PATCH] closes #513 --- RELEASE_NOTES.md | 5 +++++ system/src/apps/CompendiumItemSelector.mjs | 3 +++ system/system.json | 4 ++-- system/templates/apps/compendium-item-selector.hbs | 4 ++-- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 15be806d..b9d0a3cb 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,8 @@ +## v.1.4.4 + +### Bugfixes +* [#513] Compendium item selectors need unique IDs to ensure they show the correct selection + ## v.1.4.3 **NOTE:** If you have compendiums in your worlds you will need to re-migrate a pre-1.4.0 backup of your world once this version is installed to ensure it is migrated correctly. diff --git a/system/src/apps/CompendiumItemSelector.mjs b/system/src/apps/CompendiumItemSelector.mjs index 898418d8..dc21d5aa 100644 --- a/system/src/apps/CompendiumItemSelector.mjs +++ b/system/src/apps/CompendiumItemSelector.mjs @@ -4,6 +4,8 @@ export default class CompendiumItemSelector extends FormApplication { maxChoices = 0; + uuid = randomID(); + static get defaultOptions() { const options = super.defaultOptions; @@ -69,6 +71,7 @@ export default class CompendiumItemSelector extends FormApplication { currentItems: this.currentItems, itemChoices: [], prompt: this.prompt, + uuid: this.uuid, }; // Don"t include already selected items diff --git a/system/system.json b/system/system.json index 1d4b2ada..a8b1fe47 100644 --- a/system/system.json +++ b/system/system.json @@ -2,7 +2,7 @@ "id": "shadowdark", "title": "Shadowdark RPG", "desciption": "A system for playing the Shadowdark RPG from Arcane Library", - "version": "1.4.3", + "version": "1.4.4", "compatibility": { "minimum": "11", "verified": "11" @@ -12,7 +12,7 @@ }, "url": "https://github.com/Muttley/foundryvtt-shadowdark", "manifest": "https://raw.githubusercontent.com/Muttley/foundryvtt-shadowdark/master/system/system.json", - "download": "https://github.com/Muttley/foundryvtt-shadowdark/releases/download/release-1.4.3/shadowdark-release-1.4.3.zip", + "download": "https://github.com/Muttley/foundryvtt-shadowdark/releases/download/release-1.4.4/shadowdark-release-1.4.4.zip", "authors": [ { "name": "Paul Maskelyne", diff --git a/system/templates/apps/compendium-item-selector.hbs b/system/templates/apps/compendium-item-selector.hbs index afa1a0f7..2613eb8c 100644 --- a/system/templates/apps/compendium-item-selector.hbs +++ b/system/templates/apps/compendium-item-selector.hbs @@ -24,14 +24,14 @@ {{!-- Render a text input with search ahead to add a new Talent --}} - + {{#each itemChoices}}