Oracle JET table comes with template slot option. This is helpful to build generic functionality to render custom cell within the table.
In this example, custom cells are used to render dates, amount and risk gauge:
While implementing Oracle JET table it is a best practice to read table column structure from a variable, not to define the entire structure in HTML itself. Property columns refer to the variable. Template called cellTemplate is a default template to render cell content:
Table column structure is defined in JS. To apply specific cell template, it is specified in column definition:
Table data is static in this example and coming through JSON array based on JET Array Data Provider:
Sample code is available on GitHub.
In this example, custom cells are used to render dates, amount and risk gauge:
While implementing Oracle JET table it is a best practice to read table column structure from a variable, not to define the entire structure in HTML itself. Property columns refer to the variable. Template called cellTemplate is a default template to render cell content:
Table column structure is defined in JS. To apply specific cell template, it is specified in column definition:
Table data is static in this example and coming through JSON array based on JET Array Data Provider:
Sample code is available on GitHub.
No comments:
Post a Comment