Can i turn off Paging in a Forge Confluence Macro?

I just added a Line to a Forge Macro and noticed it seams to create a second Page when i add a sixteenth Line in the Table.

Is there a way around this? Can i show 20 lines or turn off Paging all together?

Thanks

Best Wishes
Michael

2 Likes

Hi Michael,

In UI kit, you can set the rowsPerPage prop to 0 to disable pagination. See https://developer.atlassian.com/platform/forge/ui-kit-components/table/ for the full reference.

Let me know if this helps!

1 Like

@danielwinterw

Thanks for the Tip. Sadly i am a noob in javascript and react.

So i tried this:

return (
		<Table rowsPerPage="0" >
			<Head>
				<Cell></Cell>
			</Head>
			{table_map.map(element => (
				<Row>
					<Cell><Text format="markup"><Strong>{element.label}</Strong></Text></Cell>
					<Cell>{element.user?<Avatar accountId={element.value} />:<Text content={element.value}/>}</Cell>
				</Row>
			))}
		</Table>
	);

but i get a Render Error.

I tried it without the ā€œā€ around the 0 but then i get a Syntax Error.

Thanks for your help.

Best Wishes
Michael

Hi Michael,

Can you please provide the render error for me to investigate?

Cheers,
Dan

I hope this Screenshot has the Information you need:

When i remove the rowsPerPage="0" The Macro is rendered without Error.

@danielwinterw Is the Screenshot enough, or do you need more Information?

Thanks again

@MichaelWeilbuchner try this:

<Table rowsPerPage={0}>

I hope it will solve your problem.

Cheers,
Alek.

4 Likes

It worked.

@AleksanderMierzwick1 Thanks for your help

Hi Michael,

Iā€™m glad you found a solution :slight_smile:

I have tracked this in the Forge feedback board as a bug. Ideally either option should work, although it seems to currently be checking strictly on the type (in this case a string vs a number).

https://ecosystem.atlassian.net/browse/FRGE-161

2 Likes