mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
[Fix] Item Browser Corrections (#1290)
* Fixed so lists do not fail to show items when search is empty * Fixed so that the clear button loads in the items * . * .
This commit is contained in:
parent
fcb9c032ef
commit
7df43d71e0
3 changed files with 11 additions and 7 deletions
|
|
@ -363,7 +363,7 @@ export const typeConfig = {
|
|||
{
|
||||
key: 'system.linkedClass',
|
||||
label: 'Class',
|
||||
format: linkedClass => linkedClass.name
|
||||
format: linkedClass => linkedClass?.name ?? 'DAGGERHEART.UI.ItemBrowser.missing'
|
||||
},
|
||||
{
|
||||
key: 'system.spellcastingTrait',
|
||||
|
|
@ -375,10 +375,12 @@ export const typeConfig = {
|
|||
key: 'system.linkedClass.uuid',
|
||||
label: 'Class',
|
||||
choices: items => {
|
||||
const list = items.map(item => ({
|
||||
value: item.system.linkedClass.uuid,
|
||||
label: item.system.linkedClass.name
|
||||
}));
|
||||
const list = items
|
||||
.filter(item => item.system.linkedClass)
|
||||
.map(item => ({
|
||||
value: item.system.linkedClass.uuid,
|
||||
label: item.system.linkedClass.name
|
||||
}));
|
||||
return list.reduce((a, c) => {
|
||||
if (!a.find(i => i.value === c.value)) a.push(c);
|
||||
return a;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue