Enable the product card button when editing it

refs https://github.com/TryGhost/Team/issues/1245

- When editing the button text or url, the button is enabled
This commit is contained in:
Thibaut Patel 2021-12-08 10:36:24 +01:00
parent 1ba546c4cd
commit 9a94dbe000

View File

@ -115,11 +115,17 @@ export default class KoenigCardProductComponent extends Component {
@action @action
setProductUrl(event) { setProductUrl(event) {
this._updatePayloadAttr('productUrl', event.target.value); this._updatePayloadAttr('productUrl', event.target.value);
if (!this.args.payload.productButtonEnabled) {
this._updatePayloadAttr('productButtonEnabled', true);
}
} }
@action @action
setProductButton(event) { setProductButton(event) {
this._updatePayloadAttr('productButton', event.target.value); this._updatePayloadAttr('productButton', event.target.value);
if (!this.args.payload.productButtonEnabled) {
this._updatePayloadAttr('productButtonEnabled', true);
}
} }
@action @action