introduction_screen icon indicating copy to clipboard operation
introduction_screen copied to clipboard

Add new 'canProgress' event for Introduction Screen

Open davoutuk opened this issue 3 years ago • 4 comments

Can I suggest adding a new event to this otherwise excellent widget?

Add a new 'canProgress' event that can be used to check whether it is valid to progress to the next page, like:

canProgress: (page) { // return true if movement to next page is permitted, or false if the progression is to be stopped. }

davoutuk avatar Jul 19 '22 13:07 davoutuk

Hi, you can already freeze the scroll and/or hide progress dots by using : freeze: true isProgress: false

But yes, a canProgress event could be nice. I will try to add it in next release, but not much time to maintain this project :/

Pyozer avatar Jul 20 '22 08:07 Pyozer

@davoutuk I can add the event but couldn't get exactly what you want. Could you please explain more why do you need such event. Why do you need to check whether it is valid to progress to the next page?

timurturbil avatar Aug 12 '22 10:08 timurturbil

Hello,

I was trying to use this widget as the basis for a UI wizard, with text and radio button inputs on each page. For this, I wanted to have a facility to validate the inputs at a page level, and the introduction of a page level 'canProgress' event would allow the validation to be performed inside that event handler.

From: timurturbil @.> Sent: 12 August 2022 11:13 To: Pyozer/introduction_screen @.> Cc: davoutuk @.>; Mention @.> Subject: Re: [Pyozer/introduction_screen] Add new 'canProgress' event for Introduction Screen (Issue #133)

@davoutuk https://github.com/davoutuk I can add the event but couldn't get exactly what you want. Could you please explain more why do you need such event. Why do you need to check whether it is valid to progress to the next page?

Reply to this email directly, view it on GitHub <https://github.com/Pyozer/introduction_screen/issues/133#issuecomment-12129 50867> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AGGIB2C52IIFMQWSTG24NSTVY YPS7ANCNFSM54AAQBAA> . You are receiving this because you were mentioned. <https://github.com/notifications/beacon/AGGIB2FKZMNHYWUKVV4LADTVYYPS7A5CNFS M54AAQBAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOJBGCSUY .gif> Message ID: @.*** @.***> >

davoutuk avatar Aug 12 '22 11:08 davoutuk

@davoutuk I have opened a pull request for this feature. Can you check if it would meet your need?

timurturbil avatar Aug 14 '22 12:08 timurturbil

Hi all,

PR merged. Thanks!

Thanks, Gavin.

ghenry avatar Nov 23 '22 20:11 ghenry