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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix cascader placeholder internationalization #19227

Merged
merged 2 commits into from Oct 15, 2019
Merged

fix: fix cascader placeholder internationalization #19227

merged 2 commits into from Oct 15, 2019

Conversation

kagawagao
Copy link
Contributor

@kagawagao kagawagao commented Oct 15, 2019

馃 This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

馃敆 Related issue link

latest website
https://codesandbox.io/s/infallible-mountain-pt2tj

馃挕 Background and solution

Cascader's prop placeholder works not correctly with LocaleProvider/ConfigProvider

placeholder: 'Please select',

placeholder = locale.placeholder,

because placeholder exists in defaultProps, locale.placeholder will not work

remove placeholder from defaultProps works well

馃摑 Changelog

Language Changelog
馃嚭馃嚫 English fix Cascader placeholder internationalization
馃嚚馃嚦 Chinese 淇 Cascader 鍗犱綅绗﹀浗闄呭寲閿欒

鈽戯笍 Self Check before Merge

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

Copy link

@tests-checker tests-checker bot left a comment

Choose a reason for hiding this comment

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

Could you please add tests to make sure this change works as expected?

@netlify
Copy link

netlify bot commented Oct 15, 2019

Deploy preview for ant-design ready!

Built with commit 792a701

https://deploy-preview-19227--ant-design.netlify.com

@kagawagao kagawagao changed the title fix: fix cascader placeholder fix: fix cascader placeholder Internationalization Oct 15, 2019
@kagawagao kagawagao changed the title fix: fix cascader placeholder Internationalization fix: fix cascader placeholder internationalization Oct 15, 2019
@afc163
Copy link
Member

afc163 commented Oct 15, 2019

/rebase

1 similar comment
@afc163
Copy link
Member

afc163 commented Oct 15, 2019

/rebase

@@ -429,7 +429,7 @@ class Cascader extends React.Component<CascaderProps, CascaderState> {
prefixCls: customizePrefixCls,
inputPrefixCls: customizeInputPrefixCls,
children,
placeholder = locale.placeholder,
placeholder = locale.placeholder || 'Please select',
Copy link
Member

Choose a reason for hiding this comment

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

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

2 participants