Skip to content

Conversation

@smartlime
Copy link
Owner

Не знаю, почему не получилось сразу и отложил задачку на самый конец. В начале никак не хотело работать. А, в итоге, все оказалось предельно просто.

Copy link

@palkan palkan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

await new Promise((resolve) => setTimeout(() => resolve(), 0));
morphdom(prevEl, newEl);
morphdom(prevEl, newEl, {
onBeforeElUpdated: (el, _) => !(el.hasAttribute('data-turbo-morph-permanent')),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Имеет смысл ещё добавить проверку на isSameNode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants