When creating a subview in a Perspective table, how do you pass data about the expanded row as a parameter to the subview? I can only see the data about the selected row, but not about the expanded one, unless I’m missing something.
The Table will pass the following paraneter structure to the subview:
{
column: string | number;
columnIndex: number;
row: number; // This is the true row index, as it derived from the data source
value: any;
}
where value is a dictionary whose keys are the column names of the Table.
A Table with values
| id | name | desc |
| 0 | Sam | tall |
would have a structure of
{
column: string | number;
columnIndex: number;
row: number; // This is the true row index, as it derived from the data source
value: {
'id': 0,
'name': 'Sam',
'desc': 'Tall'
};
}
So your “SubView” should have params
structured in the same manner - unless you have no need for any of the values, at which point you can omit the key.