Skip to content

NextStep and selectNext async typing updates #1278

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 28, 2022

Conversation

logancameo
Copy link
Contributor

@logancameo logancameo commented Jun 28, 2022

Description

  • Extends the NextStep type to allow specifying an async function that resolves with the string of the next page
  • Updates the selectNext type to indicate it returns the result of any NextStep function provided to it
  • Adjusts the NextStep function parameter type to match current implementation

I've listed as a fix because this is just a type change, but can list as a feat if anybody is concerned about breaking existing types.

I didn't update documentation as I'm not sure if you wanted to have this be mentioned in the standard Wizard docs since it's not supported by anything other than custom wizards.

Checklist: (please see documentation page for more information)

  • Yarn build passes
  • Yarn lint passes
  • Yarn test passes
  • Test coverage for new code (if applicable)
  • Documentation update (if applicable)
  • Correct commit message
    • format fix|feat({scope}): {description}
    • i.e. fix(pf3): wizard correctly handles next button
    • fix will release a new _._.X version
    • feat will release a new _.X._ version (use when you introduce new features)
      • we want to avoid any breaking changes, please contact us, if there is no way how to avoid them
    • scope: package
    • if you update the documentation or tests, do not use this format
      • i.e. Fix button on documenation example page

@DataDrivenFormsBot
Copy link

A new version (fix) will be released: v3.18.3 [DataDrivenFormsBot]

@codecov
Copy link

codecov bot commented Jun 28, 2022

Codecov Report

Merging #1278 (43a8773) into master (1c3f932) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1278   +/-   ##
=======================================
  Coverage   95.03%   95.03%           
=======================================
  Files         209      209           
  Lines        3623     3623           
  Branches     1264     1264           
=======================================
  Hits         3443     3443           
  Misses        180      180           

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@rvsia
Copy link
Contributor

rvsia commented Jun 28, 2022

Thank you for this PR! Tested in IDE, works great! 🏆

And I even learnt new stuff in typescript! 😏

@rvsia rvsia merged commit 1d18247 into data-driven-forms:master Jun 28, 2022
@rvsia rvsia added the released label Jun 28, 2022
@logancameo
Copy link
Contributor Author

logancameo commented Jun 28, 2022

Perfect, thanks @rvsia!!

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

Successfully merging this pull request may close these issues.

3 participants