diff --git a/src/main/resources/META-INF/frontend/src/image-crop.tsx b/src/main/resources/META-INF/frontend/src/image-crop.tsx index 560b99a..0a4e5be 100644 --- a/src/main/resources/META-INF/frontend/src/image-crop.tsx +++ b/src/main/resources/META-INF/frontend/src/image-crop.tsx @@ -86,6 +86,14 @@ function resolveOutputType(requested: string | null | undefined, src: string | n class ImageCropElement extends ReactAdapterElement { + /* + * State properties defined at runtime by hooks.useState() and read via this.xxx + * outside render(). Declared with "declare" so no class field shadows them. + */ + declare circularCrop: boolean; + declare outputMimeType?: string; + declare outputQuality?: number; + protected render(hooks: RenderHooks): ReactElement> | null { const [crop, setCrop] = hooks.useState("crop");