title overlap the first row of the table with api2pdf. The title are repated as i want but there is an overlap - pdf

It's been two days that i have an issue with a table and api2pdf and the tag
I want to repeat the on each page of my table.
It works but there is an overlaping on the first line of my table
i added in the css
thead { display: table-header-group } tfoot { display: table-row-group } tr { page-break-inside: avoid }
But it doesn't work

Related

Ag-Grid dropdown popup is hidden

I'm trying to load a custom dropdown celleditor component into my Ag-Grid in Vue3. I have reproduced the issue here: https://codesandbox.io/s/ag-grid-vue-3-example-forked-h5z6r5?file=/src/App.vue
The problem is that the options are hidden under the rows.
I have found one cheaty way of fixing this by overriding:
.ag-row-focus {
z-index: 999;
}
.ag-grid-cell {
overflow-y:visible !important;
overflow-x:visible !important;
z-index: 999 !important;
}
The problem with this approach is that it's completely dependent on ag-row-focus. If a user has a specific row selected and then clicks on the dropdown of another row, say the one above, then the selected row is still another row and therefore, the options are still hidden. There were also other issues, for instance that the dropdown itself with these overflow settings do not respect the cell width and height anymore (especially the height). When the text is larger than intended, it is also when collapsed breaking the height rules for that cell.
Ag-Grid versions used:
"ag-grid-community": "26.1.0",
"ag-grid-vue3": "26.1.2",
Update:
I got most of the behavior now working by adding the css below. Remaining issue is that the text inside the dropdown also overflows and gets too big due to which it goes onto other cells & the height goes further than the row. Expected behavior is probably here that the text gets cut off.
.ag-grid-cell {
overflow: visible !important;
z-index: 10030 !important;
}
.ag-row {
z-index: 0;
}
.ag-row.ag-row-focus {
z-index: 1;
}
.ag-root-wrapper,
.ag-root,
.ag-body-viewport,
.ag-body-viewport-wrapper,
.ag-center-cols-clipper {
overflow: visible !important;
z-index: 5;
}
.ag-center-cols-viewport {
overflow: visible !important;
}
Updated sandbox:
https://codesandbox.io/s/ag-grid-vue-3-example-forked-nvnhue?file=/src/App.vue

How to hide column header in Ag-grid?

In my vue.js application, I have a requirement where I want to hide the column headers in the ag-grid but want to display the rows.
I used below property to hide the column headers.
headerHeight: 0
with this I can able to hide the column headers but still the line separator between header and first row is visible. How can I add hide the separator line as well ?
You can achieve it by tweaking the ag-header style along with the headerHeight.
In ag-grid template :
:headerHeight="0"
In CSS side :
.ag-header {
border-bottom: 0px !important
}
Working Plunker : Hide ag-grid column header
Another way of doing it without using headerHeight and css is to only use display: none; in the css. however, if you have multiple ag-grids in your application you should define a unique ID to the ag-grid so the other grids dont get overwritten by your css.
//customcss.css
#uniqueAGGridID .ag-root .ag-header {
display: none;
}
//file where grid is.
<ag-grid-vue
id="uniqueAGGridID"
class="ag-theme-balham h-100"
:grid-options="gridOptions"
:column-defs="columnDefs"
/>

Secondary Navigation Links (Absolute and Relative positioning) (CSS)

All my secondary header navigation links can only go (top left, bottom left, top right, etc.).
Currently enabled as "top left", however I want two out of those four links to be "top right".
Current code works perfect, other than after the 75% resizing mark, the links discombobulate.
#media screen and (min-width: 800px)
{
a[href="/terms-of-use"]
{
position:absolute;
right:120px;
}
a[href="/privacy"]
{
position:absolute;
right:200px;
}
}
It has been said that using absolute positioning within flex-box will not work reliably. I'm going to guess that, because I was viewing your site in Firefox and Chrome and did not see the issue, that you are viewing your site in Safari, where the issue can be seen.
In any case, due to the above, I would recommend using Javascript in order to move the navigation items to the desired location. Then, add some additional CSS in order to get those newly-moved items to look like the others.
First, remove the CSS you've added that addresses those navigation items.
Then add this via site-wide Footer code injection:
<script>
(function() {
var targetLinks = document.querySelectorAll(".Header a[href='/terms-of-use'], .Header a[href='/privacy']");
var targetParent = document.querySelector(".Header-inner [data-nc-container='top-right']");
var i;
for (i=0; i<targetLinks.length; i++) {
targetParent.appendChild(targetLinks[i]);
}
})();
</script>
And finally, add this via the CSS Editor:
body:not(.tweak-header-secondary-nav-hover-style-button):not(.tweak-header-secondary-nav-inherit-styles) [data-nc-container='top-right'] .Header-nav-item {
margin: 0 .618em;
padding: .618em 0;
font-family: myriad-pro;
-webkit-flex-shrink: 0;
flex-shrink: 0;
}
[data-nc-base="header"] [data-nc-container="top-right"] [data-nc-element="cart"] {
padding-left: 33px;
}
[data-nc-container='top-left'] [href='/privacy'] {
display: none;
}
[data-nc-container='top-left'] [href='/terms-of-use'] {
display: none;
}

Extending nested selectors in LESS

I have the follwing HTML (basically)
table
tr
td
.c1
.c2
.c3
td
tr
... more rows...
table
I would like to write LESS for the CSS that applys to the c1, c2, c3 on tr:hover. When you roll over the row the button inside the row have different properties. The output CSS would be:
.table tr:hover {
color: red;
}
.table tr:hover .c1, .table tr:hover .c2, .table tr:hover .c3 .... {
color green;
}
I looked at extend but, somehow, I can't figure out this particular use case. Or should I just use the & char. and nest inside table:tr:hover
& c1, & c2, & c3...
With the requirements you listed you will want to do something like this:
.table tr {
&:hover {
color: red;
.c1, .c2, .c3 {
color: green;
}
}
}
Think of & as anything you want to be at the same level as the parent level, whether it be a class or a pseudo class.
When you nest items usually it matches the HTML structure/hierarchy so deciding how and where to nest is fairly straightforward. You want to share as much as possible without going overboard in getting to "nested hell".
You're trying to select a class within a pseudo class. That's not possible.
As I follow, it should be like this:
.table {
tr:hover {
color:red;
}
.c1, .c2, .c3 {
tr:hover {
color green;
}
}
}
How your HTML is setup is important. We aren't getting the whole picture here.

With border-collapse separate adding border-spacing changes the height of the rows

I have:
table {
border-collapse: separate;
}
When I add:
table {
border-spacing: 5px 10px;
}
I get the effect of separated rows, which I want. But the height (computed height) of each row has increased from 62px to 102px which I don't want.
Why is this happening and how can I stop it?