mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-18 16:09:03 +01:00
Update compenidum browser subclass class filter
This commit is contained in:
parent
11607e2221
commit
fd890120f7
4 changed files with 17 additions and 14 deletions
|
|
@ -265,12 +265,9 @@ export const typeConfig = {
|
|||
subclasses: {
|
||||
columns: [
|
||||
{
|
||||
key: 'id',
|
||||
key: 'system.linkedClass',
|
||||
label: 'Class',
|
||||
format: id => {
|
||||
console.log(id);
|
||||
return '';
|
||||
}
|
||||
format: linkedClass => linkedClass.name
|
||||
},
|
||||
{
|
||||
key: 'system.spellcastingTrait',
|
||||
|
|
@ -279,9 +276,15 @@ export const typeConfig = {
|
|||
],
|
||||
filters: [
|
||||
{
|
||||
key: 'system.linkedClass',
|
||||
key: 'system.linkedClass.uuid',
|
||||
label: 'Class',
|
||||
field: 'system.api.models.items.DHSubclass.schema.fields.linkedClass'
|
||||
choices: (items) => {
|
||||
const list = items.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