Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimanoid committed Apr 10, 2020
1 parent dc9e7f4 commit 10e9eda
Showing 1 changed file with 43 additions and 2 deletions.
45 changes: 43 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,29 @@ export class AppModule { }
## API
<br>

### DmTableComponent `<dm-table></dm-table>`
### DmTableComponent
```html
<dm-table>
<!-- see DmColumnDirective below -->
<dm-column></dm-column>
<dm-column></dm-column>
<dm-column></dm-column>

<!-- optional header for groups -->
<ng-template #groupHeader
let-row="row"
let-rowIndex="ri"
let-group="group"> <!-- group: DmTableRowsGroup -->
</ng-template>

<!-- optional footer for groups -->
<ng-template #groupFooter
let-row="row"
let-rowIndex="ri"
let-group="group"> <!-- group: DmTableRowsGroup -->
</ng-template>
</dm-table>
```

Property | Description | Type | Default value
---------|-------------|------|--------------
Expand Down Expand Up @@ -65,7 +87,14 @@ Property | Description | Type | Default value

<br><br>

### DmColumnDirective `<dm-column></dm-column>`
### DmColumnDirective
```html
<dm-column>
<ng-template #header></ng-template> <!-- optional header template for column -->
<ng-template #cell></ng-template> <!-- optional cell template for column -->
<ng-template #footer></ng-template> <!-- optional footer template for column -->
</dm-column>
```

Property | Description | Type
---------|-------------|-----
Expand Down Expand Up @@ -148,6 +177,18 @@ export interface DmTableRowDragEvent {
```
<br>

### DmTableRowsGroup
```ts
export interface DmTableRowsGroup {
index: number;
first: number;
last: number;
rows: any[];
data: any;
}
```
<br>

### Example
```html
<dm-table class="ngx-dmt-stripes"
Expand Down

0 comments on commit 10e9eda

Please sign in to comment.