1
0
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:
Sami Mazouz
2025-01-10 19:48:56 +01:00
parent 68faca4d5f
commit 1cd644d27f

View File

@@ -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>
);
}