Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: optimize editInput(issue #263) #267

Merged
merged 1 commit into from
Dec 6, 2022

Conversation

Cythia828
Copy link
Contributor

No description provided.

@@ -38,6 +38,9 @@ export default class EditInput extends React.PureComponent<EditInputProps, EditI
const { max } = this.props;
if (value && max && value.length > max) {
message.warning(`字符长度不可超过${max}`);
this.setState({
value: value.substring(0, max),
Copy link
Collaborator

@mumiao mumiao Dec 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

64 作为默认值,其次需要补充下 https://github.com/DTStack/dt-react-component/blob/master/src/components/editInput/__tests__/editInput.test.tsx 这个文件,增加一下这个maxunit cases

@liuxy0551
Copy link
Collaborator

#263

@liuxy0551 liuxy0551 merged commit bbecf42 into DTStack:master Dec 6, 2022
@mumiao mumiao mentioned this pull request Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants