Skip to content

Commit

Permalink
Setting default refresh value for task view as none. (#88)
Browse files Browse the repository at this point in the history
As part of this we added a default parameter that can be passed for refresh widget to avoid every refresh widget getting affected.
  • Loading branch information
lokesh-lingarajan authored and pagrawal10 committed Nov 27, 2023
1 parent 08400b6 commit 469f36e
Show file tree
Hide file tree
Showing 2 changed files with 1,267 additions and 1 deletion.
5 changes: 4 additions & 1 deletion web-console/src/components/refresh-button/refresh-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,16 @@ const DELAYS: DelayLabel[] = [
export interface RefreshButtonProps {
onRefresh(auto: boolean): void;
localStorageKey?: LocalStorageKeys;
defaultDelay?: number;
}

export const RefreshButton = React.memo(function RefreshButton(props: RefreshButtonProps) {
const { onRefresh, localStorageKey, defaultDelay = 30000 } = props;

return (
<TimedButton
className="refresh-button"
defaultDelay={30000}
defaultDelay={defaultDelay}
label="Auto refresh every"
delays={DELAYS}
icon={IconNames.REFRESH}
Expand Down
Loading

0 comments on commit 469f36e

Please sign in to comment.