Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set row height/padding #28

Open
saibbyweb opened this issue Jun 18, 2022 · 3 comments
Open

Set row height/padding #28

saibbyweb opened this issue Jun 18, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@saibbyweb
Copy link

saibbyweb commented Jun 18, 2022

Screenshot 2022-06-18 at 3 04 01 PM

Is there a way to add space between the "variations" text of the Title column and the line below it? Any way to make the text not touch the row lines?

@edisonneza
Copy link
Owner

It should be; i have to make some tests

@saibbyweb
Copy link
Author

I was able to add space by modifying the getRowsHeight method. I just added + 2 to item.height

rowsHeight.push(item.height);

After refracting, this is how the method looks like:

    //get nax height for the current row
    var getRowsHeight = function () {
      let rowsHeight = [];
      row.forEach(function (rr, index) {
        const widthToUse = param.invoice.header[index]?.style?.width || tdWidth;

        let item = splitTextAndGetHeight(rr.toString(), widthToUse - 1); //minus 1, to fix the padding issue between borders
        /* added row height */
        rowsHeight.push(item.height + 2);
      });

      return rowsHeight;
    };

Having the ability to add height to each row separately would be awesome!
Anyways, thanks a ton. This saved me days/weeks!

@edisonneza
Copy link
Owner

Understand,
I'll try to add it as a property in the props object.

Reopening to keep track of features.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants