mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2025-01-11 02:37:22 +03:00
Merge pull request #260 from acelaya-forks/feature/responsive-visits-table
Feature/responsive visits table
This commit is contained in:
commit
85dc1d0825
3 changed files with 11 additions and 5 deletions
|
@ -31,8 +31,12 @@ const MenuLayout = (TagsList, ShortUrls, AsideMenu, CreateShortUrl, ShortUrlVisi
|
||||||
const burgerClasses = classNames('menu-layout__burger-icon', {
|
const burgerClasses = classNames('menu-layout__burger-icon', {
|
||||||
'menu-layout__burger-icon--active': sidebarVisible,
|
'menu-layout__burger-icon--active': sidebarVisible,
|
||||||
});
|
});
|
||||||
const swipeMenuIfNoModalExists = (callback) => () => {
|
const swipeMenuIfNoModalExists = (callback) => (e) => {
|
||||||
if (document.querySelector('.modal')) {
|
const swippedOnVisitsTable = e.event.path.some(
|
||||||
|
({ classList }) => classList && classList.contains('visits-table')
|
||||||
|
);
|
||||||
|
|
||||||
|
if (swippedOnVisitsTable || document.querySelector('.modal')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ const VisitsTable = ({
|
||||||
}, [ searchTerm ]);
|
}, [ searchTerm ]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<table className="table table-striped table-bordered table-hover table-sm visits-table">
|
<table className="table table-striped table-bordered table-hover table-sm table-responsive-sm visits-table">
|
||||||
<thead className="visits-table__header">
|
<thead className="visits-table__header">
|
||||||
<tr>
|
<tr>
|
||||||
<th
|
<th
|
||||||
|
|
|
@ -12,8 +12,10 @@
|
||||||
|
|
||||||
@include sticky-cell();
|
@include sticky-cell();
|
||||||
|
|
||||||
&.visits-table__sticky {
|
@media (min-width: $mdMin) {
|
||||||
top: $headerHeight - 2px;
|
&.visits-table__sticky {
|
||||||
|
top: $headerHeight - 2px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue