mirror of
https://github.com/flarum/core.git
synced 2025-07-31 21:50:50 +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.input({ inputClassName, value, inputAttrs })}
|
||||
{this.attrs.loading && <LoadingIndicator size="small" display="inline" containerClassName="Button Button--icon Button--link" />}
|
||||
{this.attrs.clearable && value && !this.attrs.loading && (
|
||||
{this.attrs.loading ? <LoadingIndicator size="small" display="inline" containerClassName="Button Button--icon Button--link" /> : null}
|
||||
{this.attrs.clearable && value && !this.attrs.loading ? (
|
||||
<Button
|
||||
className="Input-clear Button Button--icon Button--link"
|
||||
onclick={this.clear.bind(this)}
|
||||
@@ -57,7 +57,7 @@ export default class Input<CustomAttrs extends IInputAttrs = IInputAttrs> extend
|
||||
type="button"
|
||||
icon="fas fa-times-circle"
|
||||
/>
|
||||
)}
|
||||
) : null}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user