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

Negative margin weird behavior on tables #2671

Closed
GabrielPerico opened this issue Jan 4, 2024 · 1 comment
Closed

Negative margin weird behavior on tables #2671

GabrielPerico opened this issue Jan 4, 2024 · 1 comment

Comments

@GabrielPerico
Copy link

Using 0.2.9

If you uncomment the last body register on the first table which have a negative left and right margin, the second table loses some of its width, it only occours when there is more then one page.

var dd = {
	content: [
		{
		    width: '*',
			style: 'tableExample',
			
		    marginLeft: -5,
		    marginRight: -5,
		    
			table: {
			    widths: ['*', '*', '*'],
				body: [
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
					['Column 1', 'Column 2', 'Column 3'],
				// 	['Column 1', 'Column 2', 'Column 3'],
				]
			}
		},
		{
			style: 'tableExample',
			table: {
				widths: ['*', '*', '*', '*'],
				body: [
					['Column 1', 'Column 2', 'Column 3', 'Column 4'],
				]
			}
		},
	],
	styles: {
		tableExample: {
			margin: [0, 5, 0, 15]
		},
	},
	
}
@fe-cj
Copy link
Contributor

fe-cj commented Sep 13, 2024

This issue is fixed with PR #2785

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants