Skip to content

Named imports vs. deep default imports in a third-party library using antd #47927

Answered by momesana
momesana asked this question in Q&A
Discussion options

You must be logged in to vote

Ok, the reason why this doesn't work is that the used components must have a useContext(C) or a ContextConsumer that must be identical to the one used to create the context. The only way to make the inputs receive the correct theming data from the context is to also import the Context via a deep import i.e. import ConfigProvider from "antd/lib/config-provider";`. The issue needs to be addressed in react-json-schema-forms then.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by momesana
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant