Skip to content

Commit

Permalink
- Add zIndex and appendTo to DateRangeDualTextInput.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattias800 committed Sep 18, 2024
1 parent fe955c9 commit aa79603
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ import {
TextInputProps,
ValueAndOnValueChangeProps,
} from "@stenajs-webui/forms";
import { ControlledPopover } from "@stenajs-webui/tooltip";
import {
ControlledPopover,
ControlledPopoverProps,
} from "@stenajs-webui/tooltip";
import { isAfter } from "date-fns";
import * as React from "react";
import { useMemo, useRef } from "react";
Expand All @@ -27,7 +30,8 @@ import { defaultMaxDate } from "../../../config/DefaultMaxDate";
export interface DateRangeDualTextInputProps<TData = unknown>
extends ValueAndOnValueChangeProps<DateRange>,
OptionalMinMaxDatesAsString,
Pick<DualTextInputProps, "widthLeft" | "widthRight" | "variant"> {
Pick<DualTextInputProps, "widthLeft" | "widthRight" | "variant">,
Pick<ControlledPopoverProps, "zIndex" | "appendTo"> {
onEsc?: () => void;
onEnter?: () => void;
onBlur?: () => void;
Expand All @@ -50,6 +54,8 @@ export function DateRangeDualTextInput<TData>({
widthRight = 128,
variant,
disabled,
zIndex,
appendTo,
}: DateRangeDualTextInputProps<TData>) {
const { startDate, endDate } = value || {};

Expand Down Expand Up @@ -121,6 +127,8 @@ export function DateRangeDualTextInput<TData>({
hideArrow
restoreFocus={false}
returnFocus={false}
zIndex={zIndex}
appendTo={appendTo}
renderTrigger={(props) => (
<Box {...props}>
<DualTextInput
Expand Down

0 comments on commit aa79603

Please sign in to comment.