scania / corporate-ui

This repo will be archived in Q3 2021, please visit https://github.com/scania-digital-design-system
https://digitaldesign.scania.com/
25 stars 15 forks source link

Feature - New Table Component (CTE-413) #565

Closed gustavookamoto closed 4 years ago

gustavookamoto commented 4 years ago

Describe pull-request
Contributing with a new table component. The component will be build with sort and filter included on the table header, also have options to emit events for edit and delete options.

How to test
Those are the following Props:

header (required): Prop that defines which data will be shown [{key: '', description: ''}];

content (required): Array with the data; []

tblClass: set the table class; string

hasEdit: Prop to set if want to use the edit option bool

optEdit: Prop that will be listening the edit event emitter; EventEmitter

hasDelete: Prop to set if want to use the delete option bool

optDelete: Prop that will be listening the delete event emitter; EventEmitter

Screenshots

js - c-table example js - c-table example result angular - c-table example angular - c-table example ts
helloimela commented 4 years ago

Related issue : #551

helloimela commented 4 years ago

Great work! I think it looks good overall, just small changes required before we can merge them :)

mmexvr commented 4 years ago

569 PR contains some improvements and fixes for this component, please have a look at specific changes

@gustavookamoto