Skip to content
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

MultiSchemaField does not pass formContext into type selector field #2274

Closed
3 tasks done
skyboyer opened this issue Mar 15, 2021 · 1 comment
Closed
3 tasks done

Comments

@skyboyer
Copy link
Contributor

Prerequisites

  • I have read the documentation;
  • In the case of a bug report, I understand that providing a SSCCE example is tremendously useful to the maintainers.
  • Ideally, I'm providing a sample Codesandbox demonstrating the issue.

Description

Suppose we have custom SelectWidget registered and it relies on formContext passed in. MultiSchemaField renders current SelectWidget to allow switching between types. But it never passes formContext in.

Steps to Reproduce

  1. Have a SelectWidget implementation that expects formContext to be in props
  2. Register it as a SelectWidget through widgets props for Form.
  3. Add anyOf or oneOf to the schema.

Expected behavior

SelectWidget gets proper props.formContext

Actual behavior

props.formContext is undefined.

Version

@rjsf/core 2.5.0

@heath-freenome
Copy link
Member

heath-freenome commented Aug 28, 2022

Fixed in v5 beta via #3040, see the 5.x migration guide

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

No branches or pull requests

3 participants