gbif / hosted-portals

Support material for establishing the GBIF Hosted Portals
Apache License 2.0
9 stars 6 forks source link

Allow to hide/select columns in table view #267

Closed jholetschek closed 9 months ago

jholetschek commented 1 year ago

When doing a workshop on the LAND portal, we found out that user's views about which fields should be displayed in the table view are very different, depending on their role. So it would be great if users could select the columns themselves - the way it's possible on the GBIF portal.

MortenHofft commented 9 months ago

This is now implemented and in production. I've updated all configurations to keep current behaviour. The occurrence config object now takes 2 parameters

// the first column will always be scientificName, that cannot be changed
defaultTableColumns: ['features', 'basisOfRecord', 'preparations'] // the columns showed by default. Not ordered. the user can change this
availableTableColumns: ['features', 'basisOfRecord', 'preparations', 'coordinates', 'locality', 'year', 'dataset', 'institutionCode'] // all the columns that are available to the user. This array defines the order they appear in