From e2be9fced97a571ccdc6681efb113357ddf8b106 Mon Sep 17 00:00:00 2001 From: Kenneth Date: Thu, 9 Oct 2025 11:04:21 +0700 Subject: [PATCH 1/2] fix: remove onChange prop in TypographyText --- src/atomics/Typography/TypographyText.tsx | 27 +++-------------------- 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/src/atomics/Typography/TypographyText.tsx b/src/atomics/Typography/TypographyText.tsx index 42da980..2374c5b 100644 --- a/src/atomics/Typography/TypographyText.tsx +++ b/src/atomics/Typography/TypographyText.tsx @@ -1,4 +1,4 @@ -import { forwardRef, useMemo } from 'react'; +import { forwardRef } from 'react'; import { Skeleton } from '../../molecules'; import { TypographyTextStyles } from './styles'; import { RdTypographyTextProps } from './types'; @@ -6,14 +6,7 @@ import { detectHeightBySize } from './TypographyText.helper'; export const TypographyText = forwardRef( (props: RdTypographyTextProps, ref: RdTypographyTextProps['ref']) => { - const { - size = 'normal', - editable, - autoFocus = false, - loading = false, - onChange, - ...antdProps - } = props; + const { size = 'normal', autoFocus = false, loading = false, ...antdProps } = props; if (loading) { return ( @@ -26,20 +19,6 @@ export const TypographyText = forwardRef( ); } - const editableCustom = useMemo(() => { - if (editable && typeof editable === 'object') { - if (onChange) { - editable.onChange = onChange; - } - - return editable; - } - - return editable; - }, [editable]); - - return ( - - ); + return ; } ); From 942e0d026a78073c0eaa8465215137a01d456da9 Mon Sep 17 00:00:00 2001 From: Kenneth Date: Thu, 9 Oct 2025 11:06:11 +0700 Subject: [PATCH 2/2] build: update version 1.11.3 --- CHANGELOG.md | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index edeb4da..209edd0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.11.3] + +### Remove + +- Remove `onChange` custom prop in `Typography.Text`. + ## [1.11.2] ### Fixed diff --git a/package.json b/package.json index a2c1808..c682c63 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "1byte-react-design", - "version": "1.11.2", + "version": "1.11.3", "description": "A simple React UI library", "main": "dist/index.js", "module": "dist/index.js",