Skip to content

Commit

Permalink
fix/prefer below for popover and select
Browse files Browse the repository at this point in the history
  • Loading branch information
nank1ro committed Apr 16, 2024
1 parent c5e1b66 commit 18feb4f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/src/components/popover.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class ShadPopover extends StatefulWidget {
/// The position of the [popover] in the global coordinate system.
///
/// Defaults to
/// `ShadAnchorAutoPosition(verticalOffset: 24, preferBelow: false)`.
/// `ShadAnchorAutoPosition(verticalOffset: 24, preferBelow: true)`.
/// {@endtemplate}
final ShadAnchorBase? anchor;

Expand Down Expand Up @@ -164,7 +164,7 @@ class _ShadPopoverState extends State<ShadPopover> {
theme.popoverTheme.anchor ??
const ShadAnchorAuto(
verticalOffset: 24,
preferBelow: false,
preferBelow: true,
);

Widget popover = Container(
Expand Down
4 changes: 2 additions & 2 deletions lib/src/components/select.dart
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class ShadSelect<T> extends StatefulWidget {
final ScrollController? scrollController;

/// The anchor of the [ShadSelect], defaults to
/// `ShadAnchorAutoPosition(verticalOffset: 24, preferBelow: false)`.
/// `ShadAnchorAutoPosition(verticalOffset: 24, preferBelow: true)`.
final ShadAnchorBase? anchor;

static ShadSelectState<T> of<T>(BuildContext context) {
Expand Down Expand Up @@ -274,7 +274,7 @@ class ShadSelectState<T> extends State<ShadSelect<T>> {
theme.selectTheme.anchor ??
const ShadAnchorAuto(
verticalOffset: 24,
preferBelow: false,
preferBelow: true,
);

final Widget effectiveText;
Expand Down
4 changes: 2 additions & 2 deletions lib/src/theme/themes/component_default.dart
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ abstract class ShadComponentDefaultTheme {
color: colorScheme.popover,
boxShadow: ShadShadows.md,
),
anchor: const ShadAnchorAuto(preferBelow: false, verticalOffset: 24),
anchor: const ShadAnchorAuto(preferBelow: true, verticalOffset: 24),
);
}

Expand Down Expand Up @@ -330,7 +330,7 @@ abstract class ShadComponentDefaultTheme {
optionsPadding: const EdgeInsets.all(4),
showScrollToTopChevron: true,
showScrollToBottomChevron: true,
anchor: const ShadAnchorAuto(preferBelow: false, verticalOffset: 24),
anchor: const ShadAnchorAuto(preferBelow: true, verticalOffset: 24),
);
}

Expand Down

0 comments on commit 18feb4f

Please sign in to comment.