Define table column formatting with JSON

I was thinking just as how we can define options and colours from an array, wouldn't it be great if column formatting could be defined via a JSON array.
Rather than copy a table only for the formatting to reset when the dataset changes.

e.g.

[
	{
		columnId: dateCreated,
		format: date
		formatDate: dd-mm-yy,
		appearanceBackground: #FF0000
		appearanceAlign: right
	},
	{
		columnId: dealID,
		format: Number
		formatThousandsSeperator: FALSE
	},
	{
		columnId: dealAmount,
		format: Currency
		formatCurrencyCode: GBP,
		formatDecimalPlaces: 2
	}
]

Data sources, and certainly particular columns between them, are likely to be shared across tables and apps. For example, if you have a 'dateCreated' column in your contact data and in your deal data, then it's likely you will want them both formatted to "dd-MMM, yyyy" in whichever table component you display them. The intention is that you can format a table and export the column formatting or define it yourself, import that formatting on another table, and where the column ID matches it will apply that formatting.

Or is this just caffeine fuelled ramblings...

1 Like

Hey @ferret141!

Great suggestion. I love the idea of having a systematic way to apply styling via a design schema that can be used on multiple tables that can map to data types.

I will make a feature request for this right now :+1:

1 Like

Now how does one accelerate a feature request… :grinning_face:

Haha great question :sweat_smile:

We have a whole bunch of software engineer openings on our job board :eyes:

Will update this post with any news I hear on the feature request ticket! :+1: