Skip to content

Commit

Permalink
simplify diffs
Browse files Browse the repository at this point in the history
  • Loading branch information
VasilyStrelyaev committed Jan 7, 2025
1 parent 1d8dfe0 commit 6f9d2f3
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions packages/devextreme-react/src/core/component-base.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import {
useLayoutEffect,
useCallback,
useState,
ReactElement,
useMemo,
ReactElement,
} from 'react';

import { requestAnimationFrame } from 'devextreme/animation/frame';
Expand All @@ -25,7 +25,7 @@ import { DXRemoveCustomArgs, DXTemplateCreator, InitArgument } from './types';
import { elementPropNames, getClassName } from './widget-config';
import { TemplateManager } from './template-manager';
import { ComponentProps } from './component';
import { ElementType, IOptionElement } from './configuration/react/element';
import { ElementType } from './configuration/react/element';

import {
NestedOptionContext,
Expand Down Expand Up @@ -97,21 +97,19 @@ const ComponentBase = forwardRef<ComponentBaseRef, any>(

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

const elementDescriptor: IOptionElement = {
type: ElementType.Option,
descriptor: {
name: '',
isCollection: false,
templates: templateProps,
initialValuesProps: defaults,
predefinedValuesProps: {},
expectedChildren,
},
props,
};

const [widgetConfig, context] = useOptionScanning(
elementDescriptor,
{
type: ElementType.Option,
descriptor: {
name: '',
isCollection: false,
templates: templateProps,
initialValuesProps: defaults,
predefinedValuesProps: {},
expectedChildren,
},
props,
},
props.children,
templateContainer,
Symbol('initial update token'),
Expand Down

0 comments on commit 6f9d2f3

Please sign in to comment.