fix(form): avoid splitting property names in schema path#2884
fix(form): avoid splitting property names in schema path#2884vicgeralds wants to merge 1 commit intomainfrom
Conversation
|
Documentation has been published to https://lundalogik.github.io/lime-elements/versions/PR-2884/ |
197298f to
a0e1088
Compare
The schema path passed to custom components in the `formInfo` prop didn't handle property names containing underscore as expected. Now the schema id is not split when a property name can be found in the form data matching all or some leading parts of the schema id.
4f7c262 to
0a7c6f4
Compare
WalkthroughThe pull request updates the Changes
Sequence Diagram(s)sequenceDiagram
participant Client as Caller
participant SF as SchemaField
Client->>SF: getSchemaPath(schemaId)
SF->>SF: Calculate start/end indices from schemaId
SF->>SF: Call splitSchemaId(schemaId, separator)
SF->>SF: Iteratively build property path by checking keys in formData
SF-->>Client: Return property path array
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (3)
🔇 Additional comments (3)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
The schema path passed to custom components in the
formInfoprop didn't handle property names containing underscore as expected.Now the schema id is not split when a property name can be found in the form data matching all or some leading parts of the schema id.
Review:
Browsers tested:
(Check any that applies, it's ok to leave boxes unchecked if testing something didn't seem relevant.)
Windows:
Linux:
macOS:
Mobile:
Summary by CodeRabbit