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

Added a warning for ShadowRoot usage #146

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions essentials/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,14 @@ type: 'tip'
The `@formkit/nuxt` module with `autoImport: true` enabled automatically wraps your components that use FormKit in a `<FormKitProvider>` component. This keeps formkit from being included in your entry bundle.
::

::Callout
---
label: "Shadow Root"
type: "warning"
---
FormKit inputs being used inside of a ShadowRoot will need their context's root to reference the shadowRoot instead of document. Vue applications can place `<FormKitRoot />` near the root of your shadowRoot to inform their child.
::

## What is node config?

Props are pretty powerful, but in addition to `node.props`, core nodes all have a config object `node.config`. This is where configuration hierarchy comes in. The `node.config` object acts like initial values for `node.props`. If a given prop is requested, like `node.props.validation`, and that property is not explicitly set using any of the [methods discussed above](#what-are-node-props), then FormKit will check the `node.config` object to see if it has a value. If it does not have a value, then it recursively checks the node parent's config object — then the grandparent's config object — and so on — until a value is found or it reaches a node with no parent.
Expand Down