From a246f153bab8d5005b7cdf87c3cb729537bef239 Mon Sep 17 00:00:00 2001 From: Vasily Strelyaev Date: Fri, 3 Jan 2025 16:48:46 +0200 Subject: [PATCH] linter --- packages/devextreme-react/src/core/component-base.tsx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/devextreme-react/src/core/component-base.tsx b/packages/devextreme-react/src/core/component-base.tsx index 2edd84c8ccd..fe3776933d0 100644 --- a/packages/devextreme-react/src/core/component-base.tsx +++ b/packages/devextreme-react/src/core/component-base.tsx @@ -26,7 +26,6 @@ import { elementPropNames, getClassName } from './widget-config'; import { TemplateManager } from './template-manager'; import { ComponentProps } from './component'; import { ElementType, IOptionElement } from './configuration/react/element'; -import { IConfigNode } from './configuration/config-node'; import { NestedOptionContext, @@ -96,8 +95,6 @@ const ComponentBase = forwardRef( const prevPropsRef = useRef

(); - let widgetConfig: IConfigNode; - const templateContainer = useMemo(() => document.createElement('div'), []); const elementDescriptor: IOptionElement = { @@ -113,16 +110,13 @@ const ComponentBase = forwardRef( props, }; - const options = useOptionScanning( + const [widgetConfig, context] = useOptionScanning( elementDescriptor, props.children, templateContainer, Symbol('initial update token'), ); - [widgetConfig] = options; - const [, context] = options; - const restoreTree = useCallback(() => { if (childElementsDetached.current && childNodes.current?.length && element.current) { element.current.append(...childNodes.current);