-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[@mantine/core] Tree: Add optional initialCheckedState property #6697
Merged
Conversation
This file contains 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
rtivital
reviewed
Aug 19, 2024
Thanks! |
davydkov
referenced
this pull request
in likec4/likec4
Sep 12, 2024
This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@mantine/core](https://mantine.dev/) ([source](https://redirect.github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/core)) | [`^7.12.0` -> `^7.12.2`](https://renovatebot.com/diffs/npm/@mantine%2fcore/7.12.0/7.12.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@mantine%2fcore/7.12.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@mantine%2fcore/7.12.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@mantine%2fcore/7.12.0/7.12.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@mantine%2fcore/7.12.0/7.12.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@mantine/hooks](https://mantine.dev) ([source](https://redirect.github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/hooks)) | [`^7.12.0` -> `^7.12.2`](https://renovatebot.com/diffs/npm/@mantine%2fhooks/7.12.0/7.12.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@mantine%2fhooks/7.12.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@mantine%2fhooks/7.12.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@mantine%2fhooks/7.12.0/7.12.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@mantine%2fhooks/7.12.0/7.12.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>mantinedev/mantine (@​mantine/core)</summary> ### [`v7.12.2`](https://redirect.github.com/mantinedev/mantine/releases/tag/7.12.2) [Compare Source](https://redirect.github.com/mantinedev/mantine/compare/7.12.1...7.12.2) ##### What's Changed - `[@mantine/hooks]` use-idle: Fix idle countdown not starting if the user did non interact with the page ([#​6683](https://redirect.github.com/mantinedev/mantine/issues/6683)) - `[@mantine/core]` ScrollArea: Fix `onBottomReached` prop not being available in `ScrollArea.Autosize` component - `[@mantine/core]` Remove `children` from Checkbox, Radio and Switch types to avoid accidental errors - `[@mantine/core]` TypographyStylesProvider: Fix incorrect table styles in dark color scheme - `[@mantine/form]` Fix error thrown for nullable values dirty status check ([#​6672](https://redirect.github.com/mantinedev/mantine/issues/6672)) - `[@mantine/core]` Badge: Fix unexpected change to block layout, fix incorrect alignment when fixed width is set ([#​6698](https://redirect.github.com/mantinedev/mantine/issues/6698), [#​6680](https://redirect.github.com/mantinedev/mantine/issues/6680)) - `[@mantine/core]` ScrollArea: Fix pointer-events being left as `none` after interaction with scrollbar ([#​6681](https://redirect.github.com/mantinedev/mantine/issues/6681)) - `[@mantine/core]` Tabs: Fix `keepMounted` prop being added as attribute to `Tabs.Panel` DOM element ([#​6711](https://redirect.github.com/mantinedev/mantine/issues/6711)) - `[@mantine/core]` Tree: Add `initialCheckedState` support ([#​6697](https://redirect.github.com/mantinedev/mantine/issues/6697)) - `[@mantine/spotlight]` Fix `SpotlightRoot` component not being exported ([#​6710](https://redirect.github.com/mantinedev/mantine/issues/6710)) - `[@mantine/dropzone]` Add `7z` and `rar` mime types exports ([#​6702](https://redirect.github.com/mantinedev/mantine/issues/6702)) - `[@mantine/dates]` DatePickerInput: Fix incorrect hovered date logic when the component receives value update with partial selected date range ([#​6718](https://redirect.github.com/mantinedev/mantine/issues/6718)) - `[@mantine/dates]` Fix `valueFormatter` prop being added to DateTimePicker types - `[@mantine/core]` Badge: Fix right/left sections height affecting the alignment of the label - `[@mantine/core]` Menu: Fix accessibility warning in devtools when the Menu is opened ([#​6644](https://redirect.github.com/mantinedev/mantine/issues/6644)) ##### New Contributors - [@​timesince](https://redirect.github.com/timesince) made their first contribution in [https://github.com/mantinedev/mantine/pull/6654](https://redirect.github.com/mantinedev/mantine/pull/6654) - [@​tokyojack](https://redirect.github.com/tokyojack) made their first contribution in [https://github.com/mantinedev/mantine/pull/6718](https://redirect.github.com/mantinedev/mantine/pull/6718) - [@​Streusel](https://redirect.github.com/Streusel) made their first contribution in [https://github.com/mantinedev/mantine/pull/6702](https://redirect.github.com/mantinedev/mantine/pull/6702) - [@​fredgig](https://redirect.github.com/fredgig) made their first contribution in [https://github.com/mantinedev/mantine/pull/6697](https://redirect.github.com/mantinedev/mantine/pull/6697) - [@​chimericdream](https://redirect.github.com/chimericdream) made their first contribution in [https://github.com/mantinedev/mantine/pull/6683](https://redirect.github.com/mantinedev/mantine/pull/6683) - [@​Aybrea](https://redirect.github.com/Aybrea) made their first contribution in [https://github.com/mantinedev/mantine/pull/6724](https://redirect.github.com/mantinedev/mantine/pull/6724) **Full Changelog**: mantinedev/mantine@7.12.1...7.12.2 ### [`v7.12.1`](https://redirect.github.com/mantinedev/mantine/releases/tag/7.12.1) [Compare Source](https://redirect.github.com/mantinedev/mantine/compare/7.12.0...7.12.1) ##### What's Changed - `[@mantine/dates]` DateInput: Fix default date being set to the current date when `minDate` is set to the future ([#​6646](https://redirect.github.com/mantinedev/mantine/issues/6646)) - `[@mantine/core]` ScrollArea: Fix incorrect thumb::before styles - `[@mantine/core]` Fix incorrect active styles of buttons used inside disabled fieldset - `[@mantine/form]` Fix `form.watch` callbacks not being fired when `form.initialize` is called ([#​6639](https://redirect.github.com/mantinedev/mantine/issues/6639)) - `[@mantine/core]` Switch: Fix Switch shrinking when large label or description is used ([#​6531](https://redirect.github.com/mantinedev/mantine/issues/6531)) - `[@mantine/core]` Combobox: Fix `Combobox.Search` overflow when `ScrollArea` is used in the dropdown ([#​6562](https://redirect.github.com/mantinedev/mantine/issues/6562)) - `[@mantine/core]` Accordion: Add missing `withProps` function ([#​6564](https://redirect.github.com/mantinedev/mantine/issues/6564)) - `[@mantine/core]` Pill: Fix remove icon overflowing pill container if its background color was changed with Styles API ([#​6565](https://redirect.github.com/mantinedev/mantine/issues/6565)) - `[@mantine/core]` PinInput: Allow passing props to individual input elements depending on index with `getInputProps` ([#​6588](https://redirect.github.com/mantinedev/mantine/issues/6588)) - `[@mantine/charts]`: Fix LineChart Legend and Tooltip to support nested names ([#​6536](https://redirect.github.com/mantinedev/mantine/issues/6536)) - `[@mantine/core]` Tooltip: Add missing `Tooltip.Group.extend` function ([#​6576](https://redirect.github.com/mantinedev/mantine/issues/6576)) - `[@mantine/spotlight]` Fix `limit` prop not working correctly with actions groups ([#​6632](https://redirect.github.com/mantinedev/mantine/issues/6632)) - `[@mantine/core]` Badge: Fix text overflow not being handled correctly ([#​6629](https://redirect.github.com/mantinedev/mantine/issues/6629)) - `[@mantine/core]` SegmentedControl: Add `data-disabled` attribute to the root element to simplify styling with Styles API ([#​6625](https://redirect.github.com/mantinedev/mantine/issues/6625)) - `[@mantine/core]` SegmentedControl: Fix initial position of indicator being broken when the component is used inside other element that has transitions on mount ([#​6622](https://redirect.github.com/mantinedev/mantine/issues/6622)) - `[@mantine/core]` TagsInput: Fix `onKeyDown` prop not working ([#​6569](https://redirect.github.com/mantinedev/mantine/issues/6569)) - `[@mantine/charts]` PieChart: Fix `valueFormatter` not working on outside labels ([#​6616](https://redirect.github.com/mantinedev/mantine/issues/6616)) - `[@mantine/core]` Popover: Fix `apply` function of `size` middleware not being handled correctly ([#​6598](https://redirect.github.com/mantinedev/mantine/issues/6598)) - `[@mantine/core]` Chip: Fix incorrect checked padding for `size="xl"` ([#​6586](https://redirect.github.com/mantinedev/mantine/issues/6586)) - `[@mantine/dates]` TimeInput: Fix incorrect focus styles of am/pm input ([#​6579](https://redirect.github.com/mantinedev/mantine/issues/6579)) - `[@mantine/hook]` use-os: Fix incorrect iPadOS detection ([#​6535](https://redirect.github.com/mantinedev/mantine/issues/6535)) - `[@mantine/core]` DatePickerInput: Fix incorrect `aria-label` being set on the input element ([#​6530](https://redirect.github.com/mantinedev/mantine/issues/6530)) - `[@mantine/core]` Menu: Fix incorrect Escape key handling inside Modal ([#​6580](https://redirect.github.com/mantinedev/mantine/issues/6580)) ##### New Contributors - [@​vorant94](https://redirect.github.com/vorant94) made their first contribution in [https://github.com/mantinedev/mantine/pull/6530](https://redirect.github.com/mantinedev/mantine/pull/6530) - [@​hajimism](https://redirect.github.com/hajimism) made their first contribution in [https://github.com/mantinedev/mantine/pull/6539](https://redirect.github.com/mantinedev/mantine/pull/6539) - [@​ziimakc](https://redirect.github.com/ziimakc) made their first contribution in [https://github.com/mantinedev/mantine/pull/6561](https://redirect.github.com/mantinedev/mantine/pull/6561) - [@​th3fallen](https://redirect.github.com/th3fallen) made their first contribution in [https://github.com/mantinedev/mantine/pull/6579](https://redirect.github.com/mantinedev/mantine/pull/6579) - [@​david-szabo97](https://redirect.github.com/david-szabo97) made their first contribution in [https://github.com/mantinedev/mantine/pull/6586](https://redirect.github.com/mantinedev/mantine/pull/6586) - [@​bastiankistner](https://redirect.github.com/bastiankistner) made their first contribution in [https://github.com/mantinedev/mantine/pull/6607](https://redirect.github.com/mantinedev/mantine/pull/6607) - [@​inx-fldu](https://redirect.github.com/inx-fldu) made their first contribution in [https://github.com/mantinedev/mantine/pull/6569](https://redirect.github.com/mantinedev/mantine/pull/6569) - [@​michaelperros](https://redirect.github.com/michaelperros) made their first contribution in [https://github.com/mantinedev/mantine/pull/6622](https://redirect.github.com/mantinedev/mantine/pull/6622) - [@​risen228](https://redirect.github.com/risen228) made their first contribution in [https://github.com/mantinedev/mantine/pull/6625](https://redirect.github.com/mantinedev/mantine/pull/6625) - [@​ddoemonn](https://redirect.github.com/ddoemonn) made their first contribution in [https://github.com/mantinedev/mantine/pull/6629](https://redirect.github.com/mantinedev/mantine/pull/6629) - [@​yorkeJohn](https://redirect.github.com/yorkeJohn) made their first contribution in [https://github.com/mantinedev/mantine/pull/6632](https://redirect.github.com/mantinedev/mantine/pull/6632) - [@​raulfpl](https://redirect.github.com/raulfpl) made their first contribution in [https://github.com/mantinedev/mantine/pull/6639](https://redirect.github.com/mantinedev/mantine/pull/6639) - [@​uriFrischman](https://redirect.github.com/uriFrischman) made their first contribution in [https://github.com/mantinedev/mantine/pull/6645](https://redirect.github.com/mantinedev/mantine/pull/6645) **Full Changelog**: mantinedev/mantine@7.12.0...7.12.1 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/likec4/likec4). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC43NC4xIiwidXBkYXRlZEluVmVyIjoiMzguNzQuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This was referenced Sep 23, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation: This PR aims to add an optional
initialCheckedState
prop touseTree,
akin toinitialExpandedState
andinitialSelectedState
, which addresses #6641.initialCheckedState
property touseTree
hook;checkedState
hook;getInitialState
function togetInitialExpandedState
;getInitialCheckedState
function: This takes the current tree checkedState and ensures only leaf nodes are present, which allows users to input parent nodes in theinitialCheckedState
property as it outputs their leaf nodes;setCheckedState
instruction and dependency toinitialize
callback to updatecheckedState
with behaviour indicated in previous point.