mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-14 18:41:30 +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") };
|
||||
}
|
||||
|
||||
if (min >= parsedSize || parsedSize >= max) {
|
||||
if (min > parsedSize || parsedSize > max) {
|
||||
return {
|
||||
valid: false,
|
||||
feedback: _t(
|
||||
|
@ -149,7 +149,7 @@ const ExportDialog: React.FC<IProps> = ({ room, onFinished }) => {
|
|||
};
|
||||
}
|
||||
|
||||
if (min >= parsedSize || parsedSize >= max) {
|
||||
if (min > parsedSize || parsedSize > max) {
|
||||
return {
|
||||
valid: false,
|
||||
feedback: _t(
|
||||
|
@ -199,7 +199,7 @@ const ExportDialog: React.FC<IProps> = ({ room, onFinished }) => {
|
|||
<Field
|
||||
element="input"
|
||||
type="number"
|
||||
value={numberOfMessages}
|
||||
value={numberOfMessages.toString()}
|
||||
ref={messageCountRef}
|
||||
onValidate={onValidateNumberOfMessages}
|
||||
label={_t("Number of messages")}
|
||||
|
@ -295,7 +295,7 @@ const ExportDialog: React.FC<IProps> = ({ room, onFinished }) => {
|
|||
onValidate={onValidateSize}
|
||||
element="input"
|
||||
ref={sizeLimitRef}
|
||||
value={sizeLimit}
|
||||
value={sizeLimit.toString()}
|
||||
postfixComponent={sizePostFix}
|
||||
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".
|
||||
element?: "input";
|
||||
// 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> {
|
||||
|
|
|
@ -187,7 +187,7 @@ export default class MFileBody extends React.Component {
|
|||
|
||||
if (this.props.forExport) {
|
||||
return <span className="mx_MFileBody">
|
||||
<a href="forExport">
|
||||
<a href={this.props.mxEvent.getContent().url}>
|
||||
{ placeholder }
|
||||
</a>
|
||||
</span>;
|
||||
|
|
Loading…
Reference in a new issue