Skip to content

Commit

Permalink
doc: instanceof workarounds
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanmylee committed Aug 13, 2022
1 parent 2c7a229 commit d895afb
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/src/routes/docs/[...2]api/[...11]header-cell.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,26 @@ Returns the [render configuration](./--render.md#renderconfig) of the header cel
</tr>
```

### `isFlat: () => boolean`

Returns `true` if the header cell is an instance of [`FlatHeaderCell`](#flatheadercell).

### `isData: () => boolean`

Returns `true` if the header cell is an instance of [`DataHeaderCell`](#dataheadercell).

### `isFlatDisplay: () => boolean`

Returns `true` if the header cell is an instance of [`FlatDisplayHeaderCell`](#flatdisplayheadercell).

### `isGroup: () => boolean`

Returns `true` if the header cell is an instance of [`GroupHeaderCell`](#groupheadercell).

### `isGroupDisplay: () => boolean`

Returns `true` if the header cell is an instance of [`GroupDisplayHeaderCell`](#groupdisplayheadercell).

<br />

# Variants
Expand Down
10 changes: 10 additions & 0 deletions docs/src/routes/docs/[...2]api/[...12]body-row.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ By default, the following plugins can define sub-rows:
- [addSubRows](../plugins/add-sub-rows.md)
- [addGroupBy](../plugins/add-group-by.md)

### `isData: () => boolean`

Returns `true` if the body row is an instance of [`DataBodyRow`](#databodyrow).

### `isDisplay: () => boolean`

Returns `true` if the body row is an instance of [`DisplayBodyRow`](#displaybodyrow).

<br/>

# Variants
Expand All @@ -86,6 +94,8 @@ By default, the following plugins can define sub-rows:

The original `id` of the data item from the data source.

This can be configured during [`createViewModel`](./create-view-model.md#options-rowdataid-item-index-string).

### `original: Item`

The original data item from the data source which backs this data row.
Expand Down
9 changes: 9 additions & 0 deletions docs/src/routes/docs/[...2]api/[...13]body-cell.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,15 @@ A constant string that uniquely identifies the body cell in the table.

A constant string that uniquely identifies the data attribute of the body cell in the table.

### `isData: () => boolean`

Returns `true` if the body cell is an instance of [`DataBodyCell`](#databodycell).

### `isDisplay: () => boolean`

Returns `true` if the body cell is an instance of [`DisplayBodyCell`](#displaybodycell).


<br/>

# Variants
Expand Down

1 comment on commit d895afb

@vercel
Copy link

@vercel vercel bot commented on d895afb Aug 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.