Improve form handling in and around space creation

This commit is contained in:
Michael Telatynski 2021-09-03 13:34:09 +01:00
parent 25fb243d0b
commit cc40df298b
3 changed files with 16 additions and 2 deletions

View file

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import React, { createRef } from "react";
import React, { createRef, KeyboardEventHandler } from "react";
import { _t } from '../../../languageHandler';
import withValidation from './Validation';
@ -28,6 +28,7 @@ interface IProps {
label?: string;
placeholder?: string;
disabled?: boolean;
onKeyDown?: KeyboardEventHandler;
onChange?(value: string): void;
}
@ -70,6 +71,8 @@ export default class RoomAliasField extends React.PureComponent<IProps, IState>
value={this.props.value.substring(1, this.props.value.length - this.props.domain.length - 1)}
maxLength={maxlength}
disabled={this.props.disabled}
autoComplete="off"
onKeyDown={this.props.onKeyDown}
/>
);
}