Auto refresh
This is a component that is used by the EuiSuperDatePicker component to create an automatic refresh configuration. It merely provides a common UI pattern but the actual refresh counter is maintained by you. It isPaused
by default and the refreshInterval
is set in milliseconds.
Auto refresh button
If you're looking for a more compact version, you can use EuiAutoRefreshButton, which is the same button that is appended to EuiSuperDatePicker. For even more compactness, add shortHand={true}
to reduce the active unit to a single letter.
Refresh interval
For even more customizablity, you can use the EuiRefreshInterval component which simply provides the form inputs.
Props
EuiAutoRefresh
Prop | Description and type | Default value |
---|---|---|
Prop onRefreshChange# | Description and type Passes back the updated state of ApplyRefreshInterval | Default value Required |
Prop isPaused# | Description and type Is refresh paused or running. boolean | Default value true |
Prop refreshInterval# | Description and type Refresh interval in milliseconds. number | Default value 1000 |
Prop minInterval# | Description and type Allows specifying a minimum interval in milliseconds number | Default value 0 |
Prop intervalUnits# | Description and type By default, refresh interval units will be rounded up to next largest unit of time If you do not want this behavior, you can manually control the rendered unit via this prop. "s" | "m" | "h" | Default value |
Prop isDisabled# | Description and type Type: boolean | Default value |
Prop readOnly# | Description and type The input is boolean | Default value true |
Prop append# | Description and type Creates an input group with element(s) coming after input. PrependAppendType | Default value |
Prop className# | Description and type Type: string | Default value |
Prop css# | Description and type Type: Interpolation<Theme> | Default value |
Prop fullWidth# | Description and type Expand to fill 100% of the parent. boolean | Default value false |
Prop isLoading# | Description and type Type: boolean | Default value |
Prop aria-label# | Description and type Defines a string value that labels the current element. string | Default value |
Prop data-test-subj# | Description and type Type: string | Default value |
Prop compressed# | Description and type when boolean | Default value |
Prop inputRef# | Description and type Type: Ref<HTMLInputElement> | Default value |
Prop isInvalid# | Description and type Type: boolean | Default value |
EuiAutoRefreshButton
Prop | Description and type | Default value |
---|---|---|
Prop onRefreshChange# | Description and type Passes back the updated state of ApplyRefreshInterval | Default value Required |
Prop isPaused# | Description and type Is refresh paused or running. boolean | Default value true |
Prop refreshInterval# | Description and type Refresh interval in milliseconds. number | Default value 1000 |
Prop minInterval# | Description and type Allows specifying a minimum interval in milliseconds number | Default value 0 |
Prop intervalUnits# | Description and type By default, refresh interval units will be rounded up to next largest unit of time If you do not want this behavior, you can manually control the rendered unit via this prop. "s" | "m" | "h" | Default value |
Prop isDisabled# | Description and type
boolean | Default value |
Prop shortHand# | Description and type Reduces the time unit to a single letter boolean | Default value false |
Prop size# | Description and type Type: "xs" | "s" | "m" | Default value s |
Prop color# | Description and type Any of the named color palette options. "text" | "accent" | "primary" | "success" | "warning" | "danger" | Default value text |
Prop target# | Description and type Type: string | Default value |
Prop rel# | Description and type Type: string | Default value |
Prop className# | Description and type Type: string | Default value |
Prop css# | Description and type Type: Interpolation<Theme> | Default value |
Prop isLoading# | Description and type Force disables the button and changes the icon to a loading spinner boolean | Default value |
Prop contentProps# | Description and type Object of props passed to the CommonProps & EuiButtonDisplayContentType | Default value |
Prop textProps# | Description and type Object of props passed to the This span wrapper can be removed by passing false | (HTMLAttributes<HTMLSpanElement> & CommonProps & { ref?: Ref<HTMLSpanElement>; 'data-text'?: string; }) | Default value |
Prop aria-label# | Description and type Type: string | Default value |
Prop data-test-subj# | Description and type Type: string | Default value |
Prop href# | Description and type Type: string | Default value |
Prop buttonRef# | Description and type Type: Ref<HTMLAnchorElement | HTMLButtonElement> | Default value |
Prop flush# | Description and type Ensure the text of the button sits flush to the left, right, or both sides of its container "left" | "right" | "both" | Default value |
EuiRefreshInterval
Prop | Description and type | Default value |
---|---|---|
Prop onRefreshChange# | Description and type Passes back the updated state of ApplyRefreshInterval | Default value Required |
Prop isPaused# | Description and type Is refresh paused or running. boolean | Default value true |
Prop refreshInterval# | Description and type Refresh interval in milliseconds. number | Default value 1000 |
Prop minInterval# | Description and type Allows specifying a minimum interval in milliseconds number | Default value 0 |
Prop intervalUnits# | Description and type By default, refresh interval units will be rounded up to next largest unit of time If you do not want this behavior, you can manually control the rendered unit via this prop. "s" | "m" | "h" | Default value |