Fixed event handlers not properly called

This commit is contained in:
Alejandro Celaya 2018-08-26 19:30:56 +02:00
parent 2fdc7a0ff0
commit 933de6e2c5
3 changed files with 4 additions and 3 deletions

View file

@ -22,6 +22,7 @@
"rules": {
"comma-dangle": ["error", "always-multiline"],
"no-invalid-this": "off",
"no-console": "warn",
"template-curly-spacing": ["error", "never"],
"no-warning-comments": "off",
"no-undefined": "off",

View file

@ -62,7 +62,7 @@ export class EditTagsModalComponent extends React.Component {
const { isOpen, toggle, url, shortUrlTags } = this.props;
return (
<Modal isOpen={isOpen} toggle={toggle} centered onClosed={() => this.refreshShortUrls}>
<Modal isOpen={isOpen} toggle={toggle} centered onClosed={() => this.refreshShortUrls()}>
<ModalHeader toggle={toggle}>
Edit tags for <ExternalLink href={url}>{url}</ExternalLink>
</ModalHeader>
@ -80,7 +80,7 @@ export class EditTagsModalComponent extends React.Component {
className="btn btn-primary"
type="button"
disabled={shortUrlTags.saving}
onClick={() => this.saveTags}
onClick={() => this.saveTags()}
>
{shortUrlTags.saving ? 'Saving tags...' : 'Save tags'}
</button>

View file

@ -74,7 +74,7 @@ export class EditTagModalComponent extends React.Component {
return (
<Modal isOpen={isOpen} toggle={toggle} centered onClosed={this.handleOnClosed}>
<form onSubmit={() => this.saveTag()}>
<form onSubmit={(e) => this.saveTag(e)}>
<ModalHeader toggle={toggle}>Edit tag</ModalHeader>
<ModalBody>
<div className="input-group">