[ARVADOS-WORKBENCH2] updated: ab844b6fcc7f9f81c04f8aa6f88a1f1231f27e79
Git user
git at public.curoverse.com
Mon Jun 11 16:33:02 EDT 2018
Summary of changes:
src/components/main-app-bar/search-bar/search-bar.tsx | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
via ab844b6fcc7f9f81c04f8aa6f88a1f1231f27e79 (commit)
from 90b2eff699cfd45186e8d5b9b7947da316c0140d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit ab844b6fcc7f9f81c04f8aa6f88a1f1231f27e79
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date: Mon Jun 11 22:32:33 2018 +0200
Add search bar component unmount handler, clean up search bar code
Feature #13590
Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
diff --git a/src/components/main-app-bar/search-bar/search-bar.tsx b/src/components/main-app-bar/search-bar/search-bar.tsx
index b2c95a9..d8c7ede 100644
--- a/src/components/main-app-bar/search-bar/search-bar.tsx
+++ b/src/components/main-app-bar/search-bar/search-bar.tsx
@@ -3,12 +3,8 @@
// SPDX-License-Identifier: AGPL-3.0
import * as React from 'react';
-import { AppBar, Toolbar, Typography, Grid, IconButton, Badge, Paper, Input, StyleRulesCallback, withStyles, WithStyles } from '@material-ui/core';
-import NotificationsIcon from '@material-ui/icons/Notifications';
-import PersonIcon from '@material-ui/icons/Person';
-import HelpIcon from '@material-ui/icons/Help';
+import { IconButton, Paper, StyleRulesCallback, withStyles, WithStyles } from '@material-ui/core';
import SearchIcon from '@material-ui/icons/Search';
-import { AppBarProps } from '@material-ui/core/AppBar';
interface SearchBarDataProps {
value: string;
@@ -23,7 +19,6 @@ type SearchBarProps = SearchBarDataProps & SearchBarActionProps & WithStyles<Css
interface SearchBarState {
value: string;
- prevValue: string;
}
const DEFAULT_SEARCH_DEBOUNCE = 1000;
@@ -31,8 +26,7 @@ const DEFAULT_SEARCH_DEBOUNCE = 1000;
class SearchBar extends React.Component<SearchBarProps> {
state: SearchBarState = {
- value: "",
- prevValue: ""
+ value: ""
}
timeout: NodeJS.Timer;
@@ -60,6 +54,10 @@ class SearchBar extends React.Component<SearchBarProps> {
}
}
+ componentWillUnmount() {
+ clearTimeout(this.timeout);
+ }
+
handleSubmit = (event: React.FormEvent<HTMLFormElement>) => {
event.preventDefault();
clearTimeout(this.timeout);
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list