Skip to content

Commit

Permalink
rename config builder functions
Browse files Browse the repository at this point in the history
  • Loading branch information
VasilyStrelyaev committed Oct 17, 2024
1 parent 50a4cff commit d2f8c81
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ interface ITemplate {
interface NodeConfigBuilder {
node: IConfigNode;
configCollectionMaps: Record<string, Record<string, number>>;
attachChildNode: (name: string, childNode: IConfigNode) => void;
attachTemplate: (template: ITemplate) => void;
addChildNode: (name: string, childNode: IConfigNode) => void;
addTemplate: (template: ITemplate) => void;
getConfigCollectionData: (name: string) => [IConfigNode[], Record<string, number>];
updateAnonymousTemplates: (hasTemplateRendered: boolean) => void;
addCollectionNode: (name: string, collectionNode: IConfigNode, collectionNodeKey: number) => void;
Expand Down Expand Up @@ -83,7 +83,7 @@ const createConfigBuilder: (
return [this.node.configCollections[name], this.configCollectionMaps[name]];
},

attachChildNode(name, childNode) {
addChildNode(name, childNode) {
childNode.parentNode = this.node;
this.node.configs[name] = childNode;
},
Expand All @@ -102,7 +102,7 @@ const createConfigBuilder: (
}
},

attachTemplate(template) {
addTemplate(template) {
this.node.templates.push(template);
},

Expand Down
4 changes: 2 additions & 2 deletions packages/devextreme-react/src/core/use-option-scanning.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function useOptionScanning(
const template = getNamedTemplate(templateElement.props);

if (template) {
configBuilder.attachTemplate(template);
configBuilder.addTemplate(template);
}
}
},
Expand Down Expand Up @@ -70,7 +70,7 @@ export function useOptionScanning(
return;
}

configBuilder.attachChildNode(name, childConfigNode);
configBuilder.addChildNode(name, childConfigNode);
},
};

Expand Down

0 comments on commit d2f8c81

Please sign in to comment.