From a933258ecfbddc8e4c0fae44a35a5e54d97ff804 Mon Sep 17 00:00:00 2001 From: SleepWalker Date: Mon, 14 Jan 2019 21:52:19 +0200 Subject: [PATCH] #22: fix clientId was erased immediately from address bar --- src/components/dev/apps/list/ApplicationsList.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/dev/apps/list/ApplicationsList.js b/src/components/dev/apps/list/ApplicationsList.js index c81106d..afce765 100644 --- a/src/components/dev/apps/list/ApplicationsList.js +++ b/src/components/dev/apps/list/ApplicationsList.js @@ -86,16 +86,16 @@ export default class ApplicationsList extends React.Component { && expandedApp !== clientId && applications.some((app) => app.clientId === clientId) ) { - requestAnimationFrame(() => this.onTileClick(clientId)); + requestAnimationFrame(() => this.onTileClick(clientId, {noReset: true})); } } - onTileClick = (clientId: string) => { + onTileClick = (clientId: string, { noReset = false }: { noReset?: bool } = {}) => { const { clientId: initialClientId, resetClientId } = this.props; const expandedApp = this.state.expandedApp === clientId ? null : clientId; - if (initialClientId) { + if (initialClientId && noReset !== true) { resetClientId(); }