1
0
mirror of https://github.com/flarum/core.git synced 2025-08-08 09:26:34 +02:00

fix: Button not appearing disabled when loading

This commit is contained in:
David Sevilla Martin
2020-08-09 19:25:00 -04:00
committed by Franz Liedke
parent 70697be8c0
commit b43452223f

View File

@@ -45,7 +45,7 @@ export default class Button extends Component {
delete attrs.onclick; delete attrs.onclick;
} }
attrs.className = classList([attrs.className, iconName && 'hasIcon', attrs.disabled && 'disabled', loading && 'loading']); attrs.className = classList([attrs.className, iconName && 'hasIcon', (attrs.disabled || loading) && 'disabled', loading && 'loading']);
return <button {...attrs}>{this.getButtonContent(vnode.children)}</button>; return <button {...attrs}>{this.getButtonContent(vnode.children)}</button>;
} }