[react-mentions] MentionInput should extend textarea props (#35352)

This commit is contained in:
Zhang Yi Jiang
2019-05-15 13:17:20 -07:00
committed by Nathan Shively-Sanders
parent fa6704c2ba
commit d15131099b
+4 -1
View File
@@ -6,6 +6,9 @@
// TypeScript Version: 2.8
import * as React from "react";
type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
export {};
/**
* MentionsInput is the main component rendering the textarea control. It takes one or multiple Mention components as its children.
*/
@@ -19,7 +22,7 @@ export const Mention: React.SFC<MentionProps>;
/**
* The properties for the @see MentionsInput component.
*/
export interface MentionsInputProps {
export interface MentionsInputProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'onChange' | 'onBlur' | 'onKeyDown' | 'onSelect'> {
/**
* If set to `true` a regular text input element will be rendered
* instead of a textarea