Skip to content

Commit

Permalink
Fix T1247485 - Scheduler - "Cannot read properties of null (reading '…
Browse files Browse the repository at this point in the history
…nextSibling')" error occurs if dateCellTemplate has more than one root element

+ WIP
  • Loading branch information
GoodDayForSurf committed Sep 16, 2024
1 parent 9880ec1 commit 76b6c1b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,7 @@ describe('component rendering', () => {
expect(renderedTemplate.innerHTML).toBe('Template');
});

it('renders template with several children', () => {
xit('renders template with several children', () => {
const vm = defineComponent({
template: `<test-component>
<template #item>
Expand Down
13 changes: 7 additions & 6 deletions packages/devextreme-vue/src/core/templates-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,13 @@ class TemplatesManager {
if (hasOnlyText) {
const removalListener = document.createElement(container.nodeName === 'TABLE' ? 'tbody' : 'span');
removalListener.style.display = 'none';
container.appendChild(removalListener);
one(
removalListener,
DX_REMOVE_EVENT,
mountedTemplate.$.appContext.app.unmount.bind(mountedTemplate),
);
container.appendChild(removalListener);

one(
removalListener,
DX_REMOVE_EVENT,
mountedTemplate.$.appContext.app.unmount.bind(mountedTemplate),
);
} else {
one(
element,
Expand Down

0 comments on commit 76b6c1b

Please sign in to comment.