WindmillWWindmill
Powered by
Joldz ๐Ÿ”ฎJ
Windmillโ€ข16mo agoโ€ข
2 replies
Joldz ๐Ÿ”ฎ

Stepper Component Question

I'm having trouble understanding how to do error checking when trying to advance the next step in the stepper but still allowing the user to go backwards. My script attached to the stepper component looks like this.
def main(stepIndex: int,month:int, year:int,preview_df_exists:list):
    if stepIndex == 0:
        if not month or month == 0 or not year:
            raise Exception("Please Enter a Month and Year.")
    elif stepIndex == 1:
        if not preview_df_exists:
            raise Exception("Please Upload a file ")
def main(stepIndex: int,month:int, year:int,preview_df_exists:list):
    if stepIndex == 0:
        if not month or month == 0 or not year:
            raise Exception("Please Enter a Month and Year.")
    elif stepIndex == 1:
        if not preview_df_exists:
            raise Exception("Please Upload a file ")


I see no way for me to know whether or not the Next or the Previous button is clicked within the stepper component itself. The On Next and On Previous event handlers are for triggering other scripts and cannot be referenced by the stepper component itself. I have thought of many ways to hack this functionality together but nothing has worked so far. Do you have any suggestions for how I can allow users to move backwards freely but when proceeding, make the validations in the script above?
WindmillJoin
3,362Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?
Recent Announcements
henri-c

Weekly kenote to tell you about our latest updates https://discord.com/channels/930051556043276338/1278977038430240813 https://youtube.com/live/2dGd9TdT8xs?feature=share

henri-c ยท 4d ago

Pyra

### HTTP tracing (EE) Capture HTTP requests made by job scripts as observability spans Features: - View HTTP request traces (method, URL, status, timing) in the job details UI - Auto-instrumentation for Native TypeScript, MITM proxy for other languages - Integrates with external OpenTelemetry collectors changelog: https://www.windmill.dev/changelog/http-tracing docs: https://www.windmill.dev/docs/advanced/instance_settings#http-tracing Additionally jobs memory metrics are now fully OSS!

Pyra ยท 2w ago

henri-c

First keynote of the year here https://discord.com/channels/930051556043276338/1278977038430240813 ๐Ÿ™‚

henri-c ยท 4w ago

Similar Threads

Stepper Component Event Handlers
Joldz ๐Ÿ”ฎJJoldz ๐Ÿ”ฎ / help
17mo ago
Stepper: next or previous?
cali (brazil)Ccali (brazil) / help
3y ago
File input component & component re-rendering in app
DaanDDaan / help
15mo ago
Search by component
SindreSSindre / help
3y ago