Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

### Changed

- We improved the filter selector dropdown behavior so it now automatically selects the best placement based on the available space.

## [3.8.0] - 2026-01-16

### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

### Changed

- We improved the dropdown and filter selector behavior so that it now automatically selects the best placement based on the available space.

## [3.6.0] - 2025-10-01

### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

### Changed

- We improved the filter selector dropdown behavior so it now automatically selects the best placement based on the available space.

## [3.6.0] - 2025-10-01

### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

### Changed

- We improved the filter selector dropdown behavior so it now automatically selects the best placement based on the available space.

## [3.6.0] - 2025-10-01

### Changed
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useMemo } from "react";
import { autoUpdate, ReferenceType, size, useFloating } from "@floating-ui/react-dom";
import { autoUpdate, flip, ReferenceType, size, useFloating } from "@floating-ui/react-dom";

export function useFloatingMenu<T extends ReferenceType = HTMLDivElement>(
open: boolean
Expand All @@ -12,6 +12,10 @@ export function useFloatingMenu<T extends ReferenceType = HTMLDivElement>(
width: `${rects.reference.width}px`
});
}
}),
flip({
crossAxis: false,
fallbackStrategy: "initialPlacement"
})
],
[]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { autoUpdate, useFloating } from "@floating-ui/react-dom";
import { autoUpdate, flip, useFloating } from "@floating-ui/react-dom";
import { useSelect as useDownshiftSelect, UseSelectPropGetters } from "downshift";
import { CSSProperties, JSX, useCallback, useEffect, useMemo } from "react";

Expand Down Expand Up @@ -39,8 +39,18 @@ export function useSelect(props: useSelectProps): ViewProps {
onSelectedItemChange: ({ selectedItem }) => props.onSelect(selectedItem?.value ?? null)
});

const floatingMiddleware = useMemo(
() => [
flip({
fallbackStrategy: "initialPlacement"
})
],
[]
);

const { refs, floatingStyles, update } = useFloating({
open: isOpen,
middleware: floatingMiddleware,
placement: "bottom-start",
strategy: "fixed"
});
Expand Down
Loading