Skip to content

Commit

Permalink
closes #513
Browse files Browse the repository at this point in the history
  • Loading branch information
Muttley committed Oct 9, 2023
1 parent cc4d98f commit 4ef30ba
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
5 changes: 5 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
3 changes: 3 additions & 0 deletions system/src/apps/CompendiumItemSelector.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ export default class CompendiumItemSelector extends FormApplication {

maxChoices = 0;

uuid = randomID();

static get defaultOptions() {
const options = super.defaultOptions;

Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions system/system.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions system/templates/apps/compendium-item-selector.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@

{{!-- Render a text input with search ahead to add a new Talent --}}
<input
list="items-list"
list="items-list-{{uuid}}"
placeholder="{{prompt}}"
type="text"
name="item-selected"
value=""
autofocus
/>
<datalist id="items-list">
<datalist id="items-list-{{uuid}}">
{{#each itemChoices}}
<option
data-uuid="{{this.uuid}}"
Expand Down

0 comments on commit 4ef30ba

Please sign in to comment.