mirror of
https://github.com/flarum/core.git
synced 2025-08-01 14:10:37 +02:00
fix: conditional renders 0
This commit is contained in:
@@ -48,8 +48,8 @@ export default class Input<CustomAttrs extends IInputAttrs = IInputAttrs> extend
|
|||||||
>
|
>
|
||||||
{this.attrs.prefixIcon && <Icon name={classList(this.attrs.prefixIcon, 'Input-prefix-icon')} />}
|
{this.attrs.prefixIcon && <Icon name={classList(this.attrs.prefixIcon, 'Input-prefix-icon')} />}
|
||||||
{this.input({ inputClassName, value, inputAttrs })}
|
{this.input({ inputClassName, value, inputAttrs })}
|
||||||
{this.attrs.loading && <LoadingIndicator size="small" display="inline" containerClassName="Button Button--icon Button--link" />}
|
{this.attrs.loading ? <LoadingIndicator size="small" display="inline" containerClassName="Button Button--icon Button--link" /> : null}
|
||||||
{this.attrs.clearable && value && !this.attrs.loading && (
|
{this.attrs.clearable && value && !this.attrs.loading ? (
|
||||||
<Button
|
<Button
|
||||||
className="Input-clear Button Button--icon Button--link"
|
className="Input-clear Button Button--icon Button--link"
|
||||||
onclick={this.clear.bind(this)}
|
onclick={this.clear.bind(this)}
|
||||||
@@ -57,7 +57,7 @@ export default class Input<CustomAttrs extends IInputAttrs = IInputAttrs> extend
|
|||||||
type="button"
|
type="button"
|
||||||
icon="fas fa-times-circle"
|
icon="fas fa-times-circle"
|
||||||
/>
|
/>
|
||||||
)}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user