Skip to content

Commit

Permalink
[master] fix: Fix the z-index of monitorController modal (#4378)
Browse files Browse the repository at this point in the history
fix: Fix Index of monitorController modal

Signed-off-by: lannyfu <[email protected]>
Co-authored-by: lannyfu <[email protected]>
  • Loading branch information
ks-ci-bot and fuchunlan authored Dec 23, 2024
1 parent 33a987c commit 138b52e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ function MonitorControllerModal({
step={initializeParams.step}
times={initializeParams.times}
onChange={handleChange}
zIndex={1000}
/>
{renderAutoRefresh}
<IconButton onClick={handleRefresh}>
Expand Down
6 changes: 4 additions & 2 deletions packages/shared/src/components/TimeSelector/CustomRange.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ interface Props {
timeOps?: string[];
onSubmit?: (value: ValueType) => void;
onCancel?: () => void;
zIndex?: number;
}

interface FormValue {
Expand Down Expand Up @@ -77,6 +78,7 @@ function CustomRange({
timeOps = DEFAULT_TIME_OPTIONS,
onSubmit,
onCancel,
zIndex = 100,
}: Props) {
const formRef = useRef<FormInstance<FormValue>>(null);

Expand Down Expand Up @@ -120,7 +122,7 @@ function CustomRange({
disabledDate={disabledDate}
disabledTime={disabledRangeTime}
showTime
popupStyle={{ zIndex: 100 }}
popupStyle={{ zIndex }}
showNow={false}
format="YYYY-MM-DD HH:mm:ss"
></DatePicker>
Expand All @@ -129,7 +131,7 @@ function CustomRange({
<DatePicker
disabledDate={disabledDate}
disabledTime={disabledRangeTime}
popupStyle={{ zIndex: 100 }}
popupStyle={{ zIndex }}
showTime
showNow={false}
format="YYYY-MM-DD HH:mm:ss"
Expand Down
3 changes: 3 additions & 0 deletions packages/shared/src/components/TimeSelector/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ interface Props {
onChange?: (val: Omit<ValueType, 'lastTime'>) => void;
onToggle?: (toggled: boolean) => void;
timeOps?: string[];
zIndex?: number;
}

function TimeSelector({
Expand All @@ -34,6 +35,7 @@ function TimeSelector({
timeOps,
onChange,
onToggle,
zIndex,
}: Props) {
const [visible, setVisible] = useState<boolean>(false);
const [selfValue, setSelfValue] = useState<ValueType>({
Expand Down Expand Up @@ -101,6 +103,7 @@ function TimeSelector({
showStep={showStep}
onSubmit={handleTimeChange}
onCancel={hideSelector}
zIndex={zIndex}
/>
)}
</Content>
Expand Down

0 comments on commit 138b52e

Please sign in to comment.