Add lang attribute to compose textarea and CW field (#23240)
Fixes #19858
This commit is contained in:
parent
dcdf081c6f
commit
83a8efa9ca
4 changed files with 10 additions and 2 deletions
|
@ -50,6 +50,7 @@ export default class AutosuggestInput extends ImmutablePureComponent {
|
|||
id: PropTypes.string,
|
||||
searchTokens: PropTypes.arrayOf(PropTypes.string),
|
||||
maxLength: PropTypes.number,
|
||||
lang: PropTypes.string,
|
||||
};
|
||||
|
||||
static defaultProps = {
|
||||
|
@ -185,7 +186,7 @@ export default class AutosuggestInput extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
render () {
|
||||
const { value, suggestions, disabled, placeholder, onKeyUp, autoFocus, className, id, maxLength } = this.props;
|
||||
const { value, suggestions, disabled, placeholder, onKeyUp, autoFocus, className, id, maxLength, lang } = this.props;
|
||||
const { suggestionsHidden } = this.state;
|
||||
|
||||
return (
|
||||
|
@ -210,6 +211,7 @@ export default class AutosuggestInput extends ImmutablePureComponent {
|
|||
id={id}
|
||||
className={className}
|
||||
maxLength={maxLength}
|
||||
lang={lang}
|
||||
/>
|
||||
</label>
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@ export default class AutosuggestTextarea extends ImmutablePureComponent {
|
|||
onKeyDown: PropTypes.func,
|
||||
onPaste: PropTypes.func.isRequired,
|
||||
autoFocus: PropTypes.bool,
|
||||
lang: PropTypes.string,
|
||||
};
|
||||
|
||||
static defaultProps = {
|
||||
|
@ -192,7 +193,7 @@ export default class AutosuggestTextarea extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
render () {
|
||||
const { value, suggestions, disabled, placeholder, onKeyUp, autoFocus, children } = this.props;
|
||||
const { value, suggestions, disabled, placeholder, onKeyUp, autoFocus, lang, children } = this.props;
|
||||
const { suggestionsHidden } = this.state;
|
||||
|
||||
return [
|
||||
|
@ -216,6 +217,7 @@ export default class AutosuggestTextarea extends ImmutablePureComponent {
|
|||
onPaste={this.onPaste}
|
||||
dir='auto'
|
||||
aria-autocomplete='list'
|
||||
lang={lang}
|
||||
/>
|
||||
</label>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue