Closed juancarlosgzs closed 6 months ago
@juancarlosgzs this will be supported in the next alpha. You'll be able to do something like this:
protected readonly _brnColumnManager = useBrnColumnManager({
status: { visible: true, label: 'Status' },
...
});
All that is required will be that the object passed conforms to {visible: boolean}, which means you could add whatever metadata necessary!
This should work in the new alpha
Which scope/s are relevant/related to the feature request?
data-table
Information
Find a way to add extra parameters to the BrnColumnManager, making it possible to use other values when needed.
Use case: Being able to access a column title when iterating through _brnColumnManager.allColumns
Describe any alternatives/workarounds you're currently using
The current workaround is to use a mapping object <[key: ColumnName]: title>, that is accessed from the HTML with the corresponding columnName that is received from the iteration of _brnColumnManager.allColumns. This causes a [probably] unnecessary duplicated code:
I would be willing to submit a PR to fix this issue