mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-12-25 22:50:04 +05:30
#22: fix clientId was erased immediately from address bar
This commit is contained in:
parent
08cf6d38b8
commit
a933258ecf
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user