Skip to content

Height of resize line on DataTable #2621

Closed Answered by qwadrox
hennievw asked this question in PrimeReact
Discussion options

You must be logged in to vote

@hennievw
You can write some ugly javascript code maybe:

https://stackblitz.com/edit/brwhrx?file=src%2FApp.jsx

const resizeResizer = (event) => {
    const innerTableHeight = document.getElementsByClassName(
      'p-datatable-wrapper'
    )[0]?.offsetHeight;

    if (innerTableHeight) {
      // Create a new style element
      const style = document.createElement('style');
      style.type = 'text/css';

      // Define the new CSS rule with the additional height
      const newHeightRule = `
            .p-column-resizer-helper {
                height: ${innerTableHeight}px !important;
                bottom: 0 !important;
                top: unset !important;
            }
        `;

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@hennievw
Comment options

Answer selected by hennievw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants