Skip to content

Commit

Permalink
linter
Browse files Browse the repository at this point in the history
  • Loading branch information
VasilyStrelyaev committed Jan 7, 2025
1 parent 50210e5 commit a246f15
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions packages/devextreme-react/src/core/component-base.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -96,8 +95,6 @@ const ComponentBase = forwardRef<ComponentBaseRef, any>(

const prevPropsRef = useRef<P & ComponentBaseProps>();

let widgetConfig: IConfigNode;

const templateContainer = useMemo(() => document.createElement('div'), []);

const elementDescriptor: IOptionElement = {
Expand All @@ -113,16 +110,13 @@ const ComponentBase = forwardRef<ComponentBaseRef, any>(
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);
Expand Down

0 comments on commit a246f15

Please sign in to comment.