Skip to content

Releases: melt-ui/next-gen

[email protected]

09 Sep 17:41
12165b5
Compare
Choose a tag to compare

Patch Changes

  • Fix onNavigate callback behavior in Combobox and Select components (be3bf49)

    Previously, the onNavigate callback would only handle custom navigation and never fall back to default behavior when returning null. Now correctly implements the documented behavior:

    • When onNavigate returns a value: uses that value for navigation
    • When onNavigate returns null: falls back to default DOM-based navigation

    This allows for more flexible navigation handling, such as selective override of navigation behavior in specific scenarios while maintaining default behavior in others.

[email protected]

09 Sep 17:30
a3e9d1f
Compare
Choose a tag to compare

Patch Changes

  • fix(toaster): effect used in constructor (#173)

[email protected]

09 Sep 17:14
1525bd9
Compare
Choose a tag to compare

Minor Changes

  • Add onNavigate prop to Combobox and Select components for virtualization support (a11b306)

    • Combobox: Added optional onNavigate callback to enable custom navigation logic for virtualized lists
    • Select: Added optional onNavigate callback to enable custom navigation logic for virtualized lists

    The onNavigate prop allows virtualization libraries to handle arrow key navigation properly by providing the full dataset instead of relying on DOM-queried options. This fixes wrap-around behavior where navigation would only cycle through currently rendered items instead of the complete list.

    Usage:

    const combobox = new Combobox({
    	onNavigate: (current, direction) => {
    		// Handle navigation with full dataset
    		const currentIndex = fullDataset.findIndex((item) => item === current);
    		if (direction === "next") {
    			return fullDataset[(currentIndex + 1) % fullDataset.length];
    		} else {
    			return fullDataset[(currentIndex - 1 + fullDataset.length) % fullDataset.length];
    		}
    	},
    });

    This is a non-breaking change - when onNavigate is not provided, both components fall back to their existing DOM-based navigation behavior.

[email protected]

13 Aug 19:04
db7dc49
Compare
Choose a tag to compare

Minor Changes

  • toaster: add pauseAll() and resumeAll() functions (#145)

[email protected]

13 Aug 18:00
a93aeda
Compare
Choose a tag to compare

Patch Changes

[email protected]

06 Jul 15:40
ffba2da
Compare
Choose a tag to compare

Minor Changes

  • spatial menu: add more props and change behaviour (b547c05)

Patch Changes

  • popover: fix no el when programmatically opening (bdfbdcf)

  • pininput: fix callstack overflow on input (#158)

[email protected]

02 Jul 15:34
b9ede77
Compare
Choose a tag to compare

Minor Changes

  • popover: focus management (#160)

  • popover: allow multiple triggers (#160)

Patch Changes

  • replace nanoid and crypto randomUUID with local impl (#160)

[email protected]

25 Jun 22:44
04ce1ce
Compare
Choose a tag to compare

Minor Changes

  • feat: add spatial menu (#155)

[email protected]

24 Jun 13:47
afbfeae
Compare
Choose a tag to compare

Patch Changes

  • select & combobox: remove generic restriction (4549eb9)

[email protected]

22 Jun 10:41
d04248c
Compare
Choose a tag to compare

Patch Changes

  • tooltip: fix effects (#152)

  • select: align label storage with combobox (#152)