Add support for disabling spell checking (#8604)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
8379f5624e
commit
bd30b75f79
9 changed files with 52 additions and 17 deletions
|
@ -82,6 +82,8 @@ interface IProps {
|
|||
// width.
|
||||
menuWidth?: number;
|
||||
searchEnabled?: boolean;
|
||||
// Placeholder to show when no value is selected
|
||||
placeholder?: string;
|
||||
// Called when the selected option changes
|
||||
onOptionChange(dropdownKey: string): void;
|
||||
// Called when the value of the search field changes
|
||||
|
@ -362,7 +364,7 @@ export default class Dropdown extends React.Component<IProps, IState> {
|
|||
this.props.getShortOption(this.props.value) :
|
||||
this.childrenByKey[this.props.value];
|
||||
currentValue = <div className="mx_Dropdown_option" id={`${this.props.id}_value`}>
|
||||
{ selectedChild }
|
||||
{ selectedChild || this.props.placeholder }
|
||||
</div>;
|
||||
}
|
||||
|
||||
|
|
|
@ -116,7 +116,9 @@ export default class SpellCheckLanguagesDropdown extends React.Component<SpellCh
|
|||
onSearchChange={this.onSearchChange}
|
||||
searchEnabled={true}
|
||||
value={value}
|
||||
label={_t("Language Dropdown")}>
|
||||
label={_t("Language Dropdown")}
|
||||
placeholder={_t("Choose a locale")}
|
||||
>
|
||||
{ options }
|
||||
</Dropdown>;
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ interface IProps {
|
|||
checked: boolean;
|
||||
|
||||
// Whether or not the user can interact with the switch
|
||||
disabled: boolean;
|
||||
disabled?: boolean;
|
||||
|
||||
// Called when the checked state changes. First argument will be the new state.
|
||||
onChange(checked: boolean): void;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue