Table explode and optimize 🚀

You can use expand simply maximizes the layout. You can check the full screen table here

Optimize can be used to limit the number of rows shown, either automatically or manually based on the information provided via the onresize callback

ts.ui.get('#mytable', table => {
	table
		.explode()
		.optimize()
		.cols([
			{label: 'Level', type: 'ts-number'},
			{label: 'Character', flex: 2},
			{label: 'Alignment', flex: 2},
		])
		.rows([
			[21, 'Paladin Knight', 'Lawful Good'],
			[13, 'Barbarian Queen', 'Neutral Evil'],
			[11, 'Global Senior Vice President of Sales', 'Chaotic Evil'],
			[21, 'Paladin Knight', 'Lawful Good'],
			[13, 'Barbarian Queen', 'Neutral Evil'],
			[11, 'Global Senior Vice President of Sales', 'Chaotic Evil'],
			[21, 'Paladin Knight', 'Lawful Good'],
			[13, 'Barbarian Queen', 'Neutral Evil'],
			[11, 'Global Senior Vice President of Sales', 'Chaotic Evil'],
			[21, 'Paladin Knight', 'Lawful Good'],
			[13, 'Barbarian Queen', 'Neutral Evil'],
			[11, 'Global Senior Vice President of Sales', 'Chaotic Evil'],
			[21, 'Paladin Knight', 'Lawful Good'],
			[13, 'Barbarian Queen', 'Neutral Evil'],
			[11, 'Global Senior Vice President of Sales', 'Chaotic Evil'],
			[21, 'Paladin Knight', 'Lawful Good'],
			[13, 'Barbarian Queen', 'Neutral Evil'],
			[11, 'Global Senior Vice President of Sales', 'Chaotic Evil'],
			[21, 'Paladin Knight', 'Lawful Good'],
			[13, 'Barbarian Queen', 'Neutral Evil'],
			[11, 'Global Senior Vice President of Sales', 'Chaotic Evil'],
			[21, 'Paladin Knight', 'Lawful Good'],
			[13, 'Barbarian Queen', 'Neutral Evil'],
			[11, 'Global Senior Vice President of Sales', 'Chaotic Evil']
		])
});

If you find a bug or need a feature…

  • Create GitHub Issue…