mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-21 18:09:54 +02:00
Fix item expand state not being retained across rerenders (#2056)
Some checks are pending
Project CI / build (24.x) (push) Waiting to run
Some checks are pending
Project CI / build (24.x) (push) Waiting to run
This commit is contained in:
parent
cdf6e7fdd0
commit
e718c6b7b8
1 changed files with 1 additions and 1 deletions
|
|
@ -305,7 +305,7 @@ export default function DHApplicationMixin(Base) {
|
||||||
_preSyncPartState(partId, newElement, priorElement, state) {
|
_preSyncPartState(partId, newElement, priorElement, state) {
|
||||||
super._preSyncPartState(partId, newElement, priorElement, state);
|
super._preSyncPartState(partId, newElement, priorElement, state);
|
||||||
for (const el of priorElement.querySelectorAll('.extensible.extended')) {
|
for (const el of priorElement.querySelectorAll('.extensible.extended')) {
|
||||||
const { actionId, itemUuid } = el.parentElement.dataset;
|
const { actionId, itemUuid } = el.closest('[data-item-uuid], [data-action-id]').dataset;
|
||||||
const selector = `${actionId ? `[data-action-id="${actionId}"]` : `[data-item-uuid="${itemUuid}"]`} .extensible`;
|
const selector = `${actionId ? `[data-action-id="${actionId}"]` : `[data-item-uuid="${itemUuid}"]`} .extensible`;
|
||||||
const newExtensible = newElement.querySelector(selector);
|
const newExtensible = newElement.querySelector(selector);
|
||||||
newExtensible?.classList.add('extended');
|
newExtensible?.classList.add('extended');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue