#22: fix clientId was erased immediately from address bar

This commit is contained in:
SleepWalker 2019-01-14 21:52:19 +02:00
parent 08cf6d38b8
commit a933258ecf

View File

@ -86,16 +86,16 @@ export default class ApplicationsList extends React.Component<Props, State> {
&& expandedApp !== clientId && expandedApp !== clientId
&& applications.some((app) => app.clientId === 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 { clientId: initialClientId, resetClientId } = this.props;
const expandedApp const expandedApp
= this.state.expandedApp === clientId ? null : clientId; = this.state.expandedApp === clientId ? null : clientId;
if (initialClientId) { if (initialClientId && noReset !== true) {
resetClientId(); resetClientId();
} }