Skip to content

Commit

Permalink
fix: conditional renders 0
Browse files Browse the repository at this point in the history
  • Loading branch information
SychO9 committed Jan 10, 2025
1 parent 68faca4 commit 1cd644d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions framework/core/js/src/common/components/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@ 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)}
aria-label={this.attrs.clearLabel || app.translator.trans('core.lib.input.clear_button')}
type="button"
icon="fas fa-times-circle"
/>
)}
) : null}
</div>
);
}
Expand Down

0 comments on commit 1cd644d

Please sign in to comment.