[pull] main from chakra-ui:main - #286
Merged
Merged
Conversation
`DateInput.Segment` looked up its segment with `find(s => s.type === segment.type)`, which returns the first match. Segment types are not unique, so every segment sharing a type rendered the first match's text. Literals were the visible case: all separators rendered as `/` (`2/3/2025//4/45//PM/UTC`). `SegmentContext` now stamps each segment with its position and `Segment` resolves by that, falling back to the passed segment when no position is present. Only Solid and Vue are affected. React and Svelte read `segment.text` directly; the lookup exists in Solid and Vue because both hand the render callback a static snapshot, so the segment must be re-resolved from the live segment list for text to stay current (#3874, #3912). Closes #3963
`Dynamic` merged the parent attrs with the child's props, then handed the result to `cloneVNode` without clearing the child's own props. `cloneVNode` merges again, so the child's `class` landed twice (`class="child parent child"`) and its event handlers were re-added alongside the composed ones. Cloning from a vnode with cleared props makes the second merge a no-op, which also removes the loop that existed to undo the handler half of the same problem. `Dynamic` also took `children[0]` blindly. A leading comment (a plain comment or the placeholder a false `v-if` leaves behind) meant the props were applied to the comment and silently dropped. It now targets the first non-comment child and replaces it in place, so the other children keep their order. Class merge order now matches React (`parent child`). Docs: the composition guide claimed the factory example rendered a `span` with props that appear in no example. It renders `<a href="#">Ark UI</a>` in React, Solid, and Vue alike. Also switched the Vue example to `as-child`, the dominant spelling in this package's examples.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )