Skip to content
Snippets Groups Projects
Commit 1d9f9352 authored by Nolan Lawson's avatar Nolan Lawson Committed by Eugen Rochko
Browse files

handle resize in a debounce() (#3834)

parent 53e42bf9
No related branches found
No related tags found
No related merge requests found
......@@ -13,8 +13,6 @@ import { refreshNotifications } from '../../actions/notifications';
import UploadArea from './components/upload_area';
import ColumnsAreaContainer from './containers/columns_area_container';
const noOp = () => false;
class UI extends React.PureComponent {
static propTypes = {
......@@ -27,9 +25,11 @@ class UI extends React.PureComponent {
draggingOver: false,
};
handleResize = () => {
handleResize = debounce(() => {
this.setState({ width: window.innerWidth });
}
}, 500, {
trailing: true,
});
handleDragEnter = (e) => {
e.preventDefault();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment