Skip to content

Instantly share code, notes, and snippets.

@owrrpon
Last active March 2, 2022 08:30
Show Gist options
  • Save owrrpon/aef9e0c2db421dd817f5b353d0fb5c5b to your computer and use it in GitHub Desktop.
Save owrrpon/aef9e0c2db421dd817f5b353d0fb5c5b to your computer and use it in GitHub Desktop.
Sample table configuration object
table_config = {
// the "columns" property is mandatory
columns: [
{
key: 'a',
heading: 'Column A'
},
{
key: 'b',
heading: 'Column B'
},
{
key: 'c',
heading: 'Column C',
numeric: true // this is optional and to be used if separate styles are needed for numeric columns
}
],
primary_key_set: ['a'], // this is optional and to be used only if the table is editable
default_data: DUMMY_TABLE_DATA, // this is optional for setting the initial rows
table_data_changer: new Subject<any>(), // this is optional and to be used only if the table data needs to be refreshed
ediTable: { // this is optional
add: true, // this determines if the "Add New Row" button will be displayed
edit: true // this determines if the "Edit Row" button will be displayed after each row
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment