Skip to content

Commit

Permalink
Update EuiSuperDatePicker to pass down min interval prop to underly…
Browse files Browse the repository at this point in the history
…ing component
  • Loading branch information
cee-chen committed Feb 6, 2024
1 parent bfc4f19 commit 24b8713
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ exports[`EuiQuickSelectPanels customQuickSelectPanels should render custom panel
class="euiFieldNumber euiFieldNumber--fullWidth euiFieldNumber--compressed"
data-test-subj="superDatePickerRefreshIntervalInput"
disabled=""
min="0"
step="any"
type="number"
value="0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@ export type EuiSuperDatePickerProps = CommonProps & {
* @default 1000
*/
refreshInterval?: Milliseconds;
/**
* Minimum refresh interval in milliseconds
* @default 0
*/
refreshMinInterval?: Milliseconds;
/**
* By default, refresh interval units will be rounded up to next largest unit of time
* (for example, 90 seconds will become 2m).
Expand Down Expand Up @@ -497,6 +502,7 @@ export class EuiSuperDatePickerInternal extends Component<
timeOptions,
dateFormat,
refreshInterval,
refreshMinInterval,
refreshIntervalUnits,
isPaused,
isDisabled,
Expand All @@ -511,6 +517,7 @@ export class EuiSuperDatePickerInternal extends Component<
const autoRefreshAppend: EuiFormControlLayoutProps['append'] = !isPaused ? (
<EuiAutoRefreshButton
refreshInterval={refreshInterval}
minInterval={refreshMinInterval}
intervalUnits={refreshIntervalUnits}
isDisabled={!!isDisabled}
isPaused={isPaused}
Expand Down Expand Up @@ -671,6 +678,7 @@ export class EuiSuperDatePickerInternal extends Component<
isPaused,
onRefreshChange,
refreshInterval,
refreshMinInterval,
refreshIntervalUnits,
showUpdateButton,
'data-test-subj': dataTestSubj,
Expand Down Expand Up @@ -700,6 +708,7 @@ export class EuiSuperDatePickerInternal extends Component<
<EuiAutoRefresh
isPaused={isPaused}
refreshInterval={refreshInterval}
minInterval={refreshMinInterval}
intervalUnits={refreshIntervalUnits}
onRefreshChange={this.onRefreshChange}
fullWidth={width === 'full'}
Expand Down

0 comments on commit 24b8713

Please sign in to comment.