Skip to content
Snippets Groups Projects
Commit a248be4f authored by Sorin Davidoi's avatar Sorin Davidoi Committed by Eugen Rochko
Browse files

fix(columns_area): Manually set tabs style when swiping (#4320)

parent 8b43d6bf
No related branches found
No related tags found
No related merge requests found
...@@ -56,6 +56,15 @@ export default class ColumnsArea extends ImmutablePureComponent { ...@@ -56,6 +56,15 @@ export default class ColumnsArea extends ImmutablePureComponent {
handleSwipe = (index) => { handleSwipe = (index) => {
this.pendingIndex = index; this.pendingIndex = index;
const nextLinkTranslationId = links[index].props['data-preview-title-id'];
const currentLinkSelector = '.tabs-bar__link.active';
const nextLinkSelector = `.tabs-bar__link[data-preview-title-id="${nextLinkTranslationId}"]`;
// HACK: Remove the active class from the current link and set it to the next one
// React-router does this for us, but too late, feeling laggy.
document.querySelector(currentLinkSelector).classList.remove('active');
document.querySelector(nextLinkSelector).classList.add('active');
} }
handleAnimationEnd = () => { handleAnimationEnd = () => {
......
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