mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-14 09:02:52 +03:00
Convert input's value to string to use existing types
This commit is contained in:
parent
3fc4be0be9
commit
747273cc9c
3 changed files with 6 additions and 6 deletions
|
@ -116,7 +116,7 @@ const ExportDialog: React.FC<IProps> = ({ room, onFinished }) => {
|
||||||
return { valid: false, feedback: _t("Size must be a number") };
|
return { valid: false, feedback: _t("Size must be a number") };
|
||||||
}
|
}
|
||||||
|
|
||||||
if (min >= parsedSize || parsedSize >= max) {
|
if (min > parsedSize || parsedSize > max) {
|
||||||
return {
|
return {
|
||||||
valid: false,
|
valid: false,
|
||||||
feedback: _t(
|
feedback: _t(
|
||||||
|
@ -149,7 +149,7 @@ const ExportDialog: React.FC<IProps> = ({ room, onFinished }) => {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (min >= parsedSize || parsedSize >= max) {
|
if (min > parsedSize || parsedSize > max) {
|
||||||
return {
|
return {
|
||||||
valid: false,
|
valid: false,
|
||||||
feedback: _t(
|
feedback: _t(
|
||||||
|
@ -199,7 +199,7 @@ const ExportDialog: React.FC<IProps> = ({ room, onFinished }) => {
|
||||||
<Field
|
<Field
|
||||||
element="input"
|
element="input"
|
||||||
type="number"
|
type="number"
|
||||||
value={numberOfMessages}
|
value={numberOfMessages.toString()}
|
||||||
ref={messageCountRef}
|
ref={messageCountRef}
|
||||||
onValidate={onValidateNumberOfMessages}
|
onValidate={onValidateNumberOfMessages}
|
||||||
label={_t("Number of messages")}
|
label={_t("Number of messages")}
|
||||||
|
@ -295,7 +295,7 @@ const ExportDialog: React.FC<IProps> = ({ room, onFinished }) => {
|
||||||
onValidate={onValidateSize}
|
onValidate={onValidateSize}
|
||||||
element="input"
|
element="input"
|
||||||
ref={sizeLimitRef}
|
ref={sizeLimitRef}
|
||||||
value={sizeLimit}
|
value={sizeLimit.toString()}
|
||||||
postfixComponent={sizePostFix}
|
postfixComponent={sizePostFix}
|
||||||
onChange={(e) => setSizeLimit(parseInt(e.target.value))}
|
onChange={(e) => setSizeLimit(parseInt(e.target.value))}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -77,7 +77,7 @@ export interface IInputProps extends IProps, InputHTMLAttributes<HTMLInputElemen
|
||||||
// The element to create. Defaults to "input".
|
// The element to create. Defaults to "input".
|
||||||
element?: "input";
|
element?: "input";
|
||||||
// The input's value. This is a controlled component, so the value is required.
|
// The input's value. This is a controlled component, so the value is required.
|
||||||
value: string | number;
|
value: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ISelectProps extends IProps, SelectHTMLAttributes<HTMLSelectElement> {
|
interface ISelectProps extends IProps, SelectHTMLAttributes<HTMLSelectElement> {
|
||||||
|
|
|
@ -187,7 +187,7 @@ export default class MFileBody extends React.Component {
|
||||||
|
|
||||||
if (this.props.forExport) {
|
if (this.props.forExport) {
|
||||||
return <span className="mx_MFileBody">
|
return <span className="mx_MFileBody">
|
||||||
<a href="forExport">
|
<a href={this.props.mxEvent.getContent().url}>
|
||||||
{ placeholder }
|
{ placeholder }
|
||||||
</a>
|
</a>
|
||||||
</span>;
|
</span>;
|
||||||
|
|
Loading…
Reference in a new issue