Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Add option to pass my own close modal function #7

Open
ssmith353 opened this issue Nov 15, 2016 · 0 comments
Open

Add option to pass my own close modal function #7

ssmith353 opened this issue Nov 15, 2016 · 0 comments

Comments

@ssmith353
Copy link

Right now I have no way of managing the modal's state, I would like the this.close method to check if there is a this.props.close method, and call that instead.

Right now we have duplicated the modal's code, so that we can mange the state otherwise.

	created() {
		this.eventHandler_ = new EventHandler();
		this.hide = this.hide.bind(this);
	}

		hide() {
		if (this.props.close) {
			this.props.close();
		}
		else {
			this.visible = false;
		}
	}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant