essetwide / material-walkthrough

A material tour (eg Inbox from Google).
https://essetwide.github.io/material-walkthrough/
Apache License 2.0
32 stars 10 forks source link

Add click handler for the "acceptText" button #43

Closed NathanGrimaud closed 6 years ago

NathanGrimaud commented 6 years ago

Hello there ! While working with this library, I really missed the ability to register functions that are called when the user is clicking on the "acceptText" button. I found a workaround adding an click event on the walk-action button, and removing this listener right after the click, but I think that this feature should be built in the library.

oliveirafilipe commented 6 years ago

@NathanGrimaud Hello. Thank you for the issue. What version are you using? V1 (master) or V2 (v2)? (I advise to use the V2 :smile: )

Talking quickly to @menosprezzi he said: "I think that we already have this custom callback in the button click ". @menosprezzi can you check this again?

NathanGrimaud commented 6 years ago

Great news ! I'm using v2 ;)

After a quick check on the code I found :

* @property {function} [onSet] A function that will be called when the walk content is setted;
* @property {function} [onClose] A function that will be called when the walk is accepted;

It's exactly what I wanted, I think that it would be great to add this to the readme .

oliveirafilipe commented 6 years ago

@NathanGrimaud Awesome!

later this month I will do some documentation on the project Wiki. I will close this issue to open one focused on the documentation.

Keep using the plugin and contributing!