I’d like to build a table where I can just specify an array of rows and the column headings. In each cell, it should display the data dependant on what was specified as part of the column settings.
Column Settings:
[ { key: 'name', label: 'The Name', type: 'string' }, { key: 'dob', label: 'Date of Birth', type: 'date' } ]
Rows:
[ { id: 1, name: 'Jack', dob: '1991-02-01' }, { id: 1, name: 'Jill, dob: '1993-02-01' } ]
Date Component Usage
<date-format date.bind=“date” format=“calendar”></date-format>
Now in this example, I already have a custom component where I basically just bind in a date and it formats it using Moment or whatever else. Because I’ve added this component as a global resouce, is there a way I can just reference that using compose or some other dynamic way? Be nicer instead of having to try and figure out the relative path to the component dependant on where the table is being used.
Downside of compose is that it needs the relative path to the view model and the view itself.