github carbon-design-system/carbon-components-svelte v0.114.1

46 minutes ago

This patch improves how components handle arrays that are updated in place. Svelte 5 encourages editing a $state array directly (rows.splice(...), ids.push(id)), and Svelte 3 and 4 code often does the same before reassigning (rows = rows). Several components now pick up those updates reliably.

  • DataTable renders and sorts rows replaced in place (#5657).
  • TreeView follows nodes, selectedIds, expandedIds, and checkedIds edited in place.
  • MultiSelect follows items and selectedIds.
  • DatePicker applies disabledDates, enabledDates, and selectedDates.
  • CheckboxGroup and SelectableTileGroup follow selected.

A new test contract checks every array prop this way on Svelte 3, 4, and 5, so these updates stay covered going forward.

This release also refines hover colors in Tabs, ListBox fields, Select, and NumberInput, draws inline CodeSnippet with layer tokens, and keeps an in-place Dropdown menu and side Tooltips inside the window.

Full Changelog: v0.114.0...v0.114.1


Changes without a breaking marker

  • Tabs: autoWidth is removed. Tabs already size to their label, so it did nothing, but passing it is now a type error. You can delete it, or use fullWidth to span the container (#5648).
  • TreeView keeps checkedIds in the order you passed when the checked set doesn't change, instead of reordering them to tree order. In checkMode="deep", a cascade that adds ids still writes the prop, so bind checkedIds if you keep editing it in place (#5673).

Bug Fixes

  • checkbox, tile: sync selected mutated in place to the group (7f56fd7)
  • code-snippet: draw the inline snippet with layer tokens (af0fe45)
  • data-table: keep a row's field edit for refreshRow after a splice (b4fbbe1)
  • data-table: render rows replaced in place (52fa6d4)
  • data-table: sort rows added without reassigning rows (af9652e)
  • date-picker: apply date arrays mutated in place (71e6eea)
  • dropdown: keep an in-place menu inside the window (2b7a877), closes #5660
  • list-box, select, number-input: hover fields with field-hover (67074e5)
  • multi-select: list items added to items in place (ff924e9)
  • multi-select: skip writing an unchanged selectedIds (aba3263)
  • tabs: hover a contained tab with layer-accent-hover (7e06769)
  • tabs: hover a vertical tab row with layer-accent-hover (81327e6)
  • tabs: remove autoWidth, which has no effect (e9eb11e), closes #5648
  • tooltip: keep side tooltips inside the window (fb02513), closes #5659
  • tree-view: find nodes added to nodes in place (525f204)
  • tree-view: keep reordered checkedIds as passed (c104269)
  • tree-view: sync id arrays mutated in place (c4b01a8)

Don't miss a new carbon-components-svelte release

NewReleases is sending notifications on new releases.