palantir/blueprint

[MultistepDialog] Allow side navigation to be disabled (e.g. when submitting)

Open

#4872 aperta il 20 ago 2021

Vedi su GitHub
 (3 commenti) (0 reazioni) (0 assegnatari)TypeScript (2167 fork)batch import
P2Package: coreType: feature requesthelp wanted

Metriche repository

Star
 (20.263 star)
Metriche merge PR
 (Merge medio 43g 10h) (27 PR mergiate in 30 g)

Descrizione

Environment

  • Package version(s): @blueprintjs/core@3.48.0

Feature Request

  1. Add a disabled prop to <MultistepDialog> that would allow the side navigation to be disabled (e.g when the dialog is being submitted)

  2. Perhaps if specified true (and ignored as false | undefined), it could also combine & override any individual disabled props for all the other steps' nextButtonProps and backButtonProps? (You can see in my Code Sandbox example, I am passing || submitting through to most of them)

Code Sandbox

https://codesandbox.io/s/blueprint-sandbox-multistepdialog-4di0d

Steps to reproduce

(Using the example in the Code Sandbox)

  1. Advance through each step of the <MultistepDialog> to the end.
  2. See how each step must be "valid" before you can progress.
  3. On the last step, click the "Submit" button to trigger a fake submit state.
  4. ❌ See that you can still navigate around between past steps via the side navigation whilst the form submit is ongoing.

Guida contributor