Skip to content

Latest commit

 

History

History
15 lines (12 loc) · 1.4 KB

creating_new_tableview.md

File metadata and controls

15 lines (12 loc) · 1.4 KB

Setting up a new table view

Following things are needed to create a new page with a table (examples are all from Cross-Search):

  • Backend:

    • A service to get the data from the database. There might be a necessities to clean the result, filter the result by project ids (pid) and user's permissions, and create a temp type for typescript.
    • A route function calling the service.
    • The App should use the route.
  • Frontend:

    • Create necessary types in backendtypes
    • Create a component (note that cross search borrows the detail parts from localities). The tableview is defined via variables columns and visibleColumns. Columns in the most simple form only require an accesrKey and a header. If an accessorFn is used, a separate id is required as well. The accessorkey functions as a key to fetch data as well as an id to reference the column as well. The variable visibleColumns takes in accessorKeys or ids for columns, set to false, to be hidden by default.
    • Create a button for the component in navigation bar
    • Create a relevant page-object for Pages
    • Add a route for the component to App