Skip to content

Commit bd6e83b

Browse files
authored
Merge pull request #64 from 1Byte-Software/develop
Update version 1.11.3
2 parents 4561de3 + 942e0d0 commit bd6e83b

File tree

3 files changed

+10
-25
lines changed

3 files changed

+10
-25
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.11.3]
9+
10+
### Remove
11+
12+
- Remove `onChange` custom prop in `Typography.Text`.
13+
814
## [1.11.2]
915

1016
### Fixed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "1byte-react-design",
3-
"version": "1.11.2",
3+
"version": "1.11.3",
44
"description": "A simple React UI library",
55
"main": "dist/index.js",
66
"module": "dist/index.js",
Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
1-
import { forwardRef, useMemo } from 'react';
1+
import { forwardRef } from 'react';
22
import { Skeleton } from '../../molecules';
33
import { TypographyTextStyles } from './styles';
44
import { RdTypographyTextProps } from './types';
55
import { detectHeightBySize } from './TypographyText.helper';
66

77
export const TypographyText = forwardRef(
88
(props: RdTypographyTextProps, ref: RdTypographyTextProps['ref']) => {
9-
const {
10-
size = 'normal',
11-
editable,
12-
autoFocus = false,
13-
loading = false,
14-
onChange,
15-
...antdProps
16-
} = props;
9+
const { size = 'normal', autoFocus = false, loading = false, ...antdProps } = props;
1710

1811
if (loading) {
1912
return (
@@ -26,20 +19,6 @@ export const TypographyText = forwardRef(
2619
);
2720
}
2821

29-
const editableCustom = useMemo(() => {
30-
if (editable && typeof editable === 'object') {
31-
if (onChange) {
32-
editable.onChange = onChange;
33-
}
34-
35-
return editable;
36-
}
37-
38-
return editable;
39-
}, [editable]);
40-
41-
return (
42-
<TypographyTextStyles ref={ref} editable={editableCustom} size={size} {...antdProps} />
43-
);
22+
return <TypographyTextStyles ref={ref} size={size} {...antdProps} />;
4423
}
4524
);

0 commit comments

Comments
 (0)