ERP-node/frontend/lib/registry/components/textarea-basic/TextareaBasicRenderer.tsx

57 lines
1.4 KiB
TypeScript
Raw Normal View History

2025-09-11 18:38:28 +09:00
"use client";
import React from "react";
import { AutoRegisteringComponentRenderer } from "../../AutoRegisteringComponentRenderer";
import { TextareaBasicDefinition } from "./index";
import { TextareaBasicComponent } from "./TextareaBasicComponent";
/**
* TextareaBasic
*
*/
export class TextareaBasicRenderer extends AutoRegisteringComponentRenderer {
static componentDefinition = TextareaBasicDefinition;
render(): React.ReactElement {
return <TextareaBasicComponent {...this.props} renderer={this} />;
}
/**
*
*/
// textarea 타입 특화 속성 처리
protected getTextareaBasicProps() {
const baseProps = this.getWebTypeProps();
// textarea 타입에 특화된 추가 속성들
return {
...baseProps,
// 여기에 textarea 타입 특화 속성들 추가
};
}
// 값 변경 처리
protected handleValueChange = (value: any) => {
this.updateComponent({ value });
};
// 포커스 처리
protected handleFocus = () => {
// 포커스 로직
};
// 블러 처리
protected handleBlur = () => {
// 블러 로직
};
}
// 자동 등록 실행
TextareaBasicRenderer.registerSelf();
// Hot Reload 지원 (개발 모드)
if (process.env.NODE_ENV === "development") {
TextareaBasicRenderer.enableHotReload();
}