Skip to content

Commit

Permalink
0.15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
inokawa committed Oct 24, 2023
1 parent de2ef09 commit c2c99db
Show file tree
Hide file tree
Showing 14 changed files with 281 additions and 247 deletions.
24 changes: 10 additions & 14 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
### Interfaces

- [CacheSnapshot](interfaces/CacheSnapshot.md)
- [ScrollToIndexOpts](interfaces/ScrollToIndexOpts.md)
- [VListProps](interfaces/VListProps.md)
- [VListHandle](interfaces/VListHandle.md)
- [VGridProps](interfaces/VGridProps.md)
Expand Down Expand Up @@ -49,7 +50,7 @@ Virtualized list component. See [VListProps](interfaces/VListProps.md) and [VLis

#### Defined in

node_modules/@types/react/index.d.ts:428
node_modules/@types/react/index.d.ts:395

___

Expand All @@ -71,7 +72,7 @@ Virtualized grid component. See [VGridProps](interfaces/VGridProps.md) and [VGri

#### Defined in

node_modules/@types/react/index.d.ts:428
node_modules/@types/react/index.d.ts:395

___

Expand All @@ -93,22 +94,17 @@ Virtualized list component controlled by the window scrolling. See [WVListProps]

#### Defined in

node_modules/@types/react/index.d.ts:428
node_modules/@types/react/index.d.ts:395

## Type Aliases

### ScrollToIndexAlign

Ƭ **ScrollToIndexAlign**: ``"start"`` \| ``"end"``

Alignment of item when calling scrollToIndex method.

- `start`(default): Align the item to the start of the list.
- `end`: Align the item to the end of the list.
Ƭ **ScrollToIndexAlign**: ``"start"`` \| ``"center"`` \| ``"end"``

#### Defined in

[src/core/types.ts:25](https://github.com/inokawa/virtua/blob/e5e58101/src/core/types.ts#L25)
[src/core/types.ts:19](https://github.com/inokawa/virtua/blob/de2ef090/src/core/types.ts#L19)

___

Expand All @@ -118,7 +114,7 @@ ___

#### Defined in

[src/react/VGrid.tsx:49](https://github.com/inokawa/virtua/blob/e5e58101/src/react/VGrid.tsx#L49)
[src/react/VGrid.tsx:49](https://github.com/inokawa/virtua/blob/de2ef090/src/react/VGrid.tsx#L49)

___

Expand All @@ -128,7 +124,7 @@ ___

#### Defined in

[src/react/Viewport.tsx:9](https://github.com/inokawa/virtua/blob/e5e58101/src/react/Viewport.tsx#L9)
[src/react/Viewport.tsx:9](https://github.com/inokawa/virtua/blob/de2ef090/src/react/Viewport.tsx#L9)

___

Expand All @@ -138,7 +134,7 @@ ___

#### Defined in

[src/react/Viewport.tsx:63](https://github.com/inokawa/virtua/blob/e5e58101/src/react/Viewport.tsx#L63)
[src/react/Viewport.tsx:63](https://github.com/inokawa/virtua/blob/de2ef090/src/react/Viewport.tsx#L63)

___

Expand All @@ -148,4 +144,4 @@ ___

#### Defined in

[src/react/ListItem.tsx:22](https://github.com/inokawa/virtua/blob/e5e58101/src/react/ListItem.tsx#L22)
[src/react/ListItem.tsx:22](https://github.com/inokawa/virtua/blob/de2ef090/src/react/ListItem.tsx#L22)
2 changes: 1 addition & 1 deletion docs/interfaces/CacheSnapshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ Serializable cache snapshot.

#### Defined in

[src/core/types.ts:16](https://github.com/inokawa/virtua/blob/e5e58101/src/core/types.ts#L16)
[src/core/types.ts:16](https://github.com/inokawa/virtua/blob/de2ef090/src/core/types.ts#L16)
4 changes: 2 additions & 2 deletions docs/interfaces/CustomCellComponentProps.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Props of customized cell component for [VGrid](../API.md#vgrid).

#### Defined in

[src/react/VGrid.tsx:45](https://github.com/inokawa/virtua/blob/e5e58101/src/react/VGrid.tsx#L45)
[src/react/VGrid.tsx:45](https://github.com/inokawa/virtua/blob/de2ef090/src/react/VGrid.tsx#L45)

___

Expand All @@ -27,4 +27,4 @@ ___

#### Defined in

[src/react/VGrid.tsx:46](https://github.com/inokawa/virtua/blob/e5e58101/src/react/VGrid.tsx#L46)
[src/react/VGrid.tsx:46](https://github.com/inokawa/virtua/blob/de2ef090/src/react/VGrid.tsx#L46)
4 changes: 2 additions & 2 deletions docs/interfaces/CustomItemComponentProps.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Props of customized item component for [VList](../API.md#vlist).

#### Defined in

[src/react/ListItem.tsx:18](https://github.com/inokawa/virtua/blob/e5e58101/src/react/ListItem.tsx#L18)
[src/react/ListItem.tsx:18](https://github.com/inokawa/virtua/blob/de2ef090/src/react/ListItem.tsx#L18)

___

Expand All @@ -27,4 +27,4 @@ ___

#### Defined in

[src/react/ListItem.tsx:19](https://github.com/inokawa/virtua/blob/e5e58101/src/react/ListItem.tsx#L19)
[src/react/ListItem.tsx:19](https://github.com/inokawa/virtua/blob/de2ef090/src/react/ListItem.tsx#L19)
10 changes: 5 additions & 5 deletions docs/interfaces/CustomViewportComponentProps.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Renderable item elements.

#### Defined in

[src/react/Viewport.tsx:22](https://github.com/inokawa/virtua/blob/e5e58101/src/react/Viewport.tsx#L22)
[src/react/Viewport.tsx:22](https://github.com/inokawa/virtua/blob/de2ef090/src/react/Viewport.tsx#L22)

___

Expand All @@ -34,7 +34,7 @@ Attributes that should be passed to the scrollable element.

#### Defined in

[src/react/Viewport.tsx:26](https://github.com/inokawa/virtua/blob/e5e58101/src/react/Viewport.tsx#L26)
[src/react/Viewport.tsx:26](https://github.com/inokawa/virtua/blob/de2ef090/src/react/Viewport.tsx#L26)

___

Expand All @@ -46,7 +46,7 @@ Total height of items. It's undefined if component is not vertically scrollable.

#### Defined in

[src/react/Viewport.tsx:30](https://github.com/inokawa/virtua/blob/e5e58101/src/react/Viewport.tsx#L30)
[src/react/Viewport.tsx:30](https://github.com/inokawa/virtua/blob/de2ef090/src/react/Viewport.tsx#L30)

___

Expand All @@ -58,7 +58,7 @@ Total width of items. It's undefined if component is not horizontally scrollable

#### Defined in

[src/react/Viewport.tsx:34](https://github.com/inokawa/virtua/blob/e5e58101/src/react/Viewport.tsx#L34)
[src/react/Viewport.tsx:34](https://github.com/inokawa/virtua/blob/de2ef090/src/react/Viewport.tsx#L34)

___

Expand All @@ -70,4 +70,4 @@ Currently component is scrolling or not.

#### Defined in

[src/react/Viewport.tsx:38](https://github.com/inokawa/virtua/blob/e5e58101/src/react/Viewport.tsx#L38)
[src/react/Viewport.tsx:38](https://github.com/inokawa/virtua/blob/de2ef090/src/react/Viewport.tsx#L38)
38 changes: 38 additions & 0 deletions docs/interfaces/ScrollToIndexOpts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Interface: ScrollToIndexOpts

## Table of contents

### Properties

- [align](ScrollToIndexOpts.md#align)
- [smooth](ScrollToIndexOpts.md#smooth)

## Properties

### align

`Optional` **align**: [`ScrollToIndexAlign`](../API.md#scrolltoindexalign)

Alignment of item.

- `start`(default): Align the item to the start of the list.
- `center`: Align the item to the center of the list.
- `end`: Align the item to the end of the list.

#### Defined in

[src/core/types.ts:29](https://github.com/inokawa/virtua/blob/de2ef090/src/core/types.ts#L29)

___

### smooth

`Optional` **smooth**: `boolean`

If true, scrolling animates smoothly with [`behavior: smooth` of scrollTo](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollTo#behavior).

**Using smooth scrolling over many items can kill performance benefit of virtual scroll. Do not overuse it.**

#### Defined in

[src/core/types.ts:35](https://github.com/inokawa/virtua/blob/de2ef090/src/core/types.ts#L35)
12 changes: 6 additions & 6 deletions docs/interfaces/VGridHandle.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Scroll to the item specified by index.

#### Defined in

[src/react/VGrid.tsx:136](https://github.com/inokawa/virtua/blob/e5e58101/src/react/VGrid.tsx#L136)
[src/react/VGrid.tsx:136](https://github.com/inokawa/virtua/blob/de2ef090/src/react/VGrid.tsx#L136)

___

Expand All @@ -60,7 +60,7 @@ Scroll to the given offset.

#### Defined in

[src/react/VGrid.tsx:142](https://github.com/inokawa/virtua/blob/e5e58101/src/react/VGrid.tsx#L142)
[src/react/VGrid.tsx:142](https://github.com/inokawa/virtua/blob/de2ef090/src/react/VGrid.tsx#L142)

___

Expand All @@ -83,7 +83,7 @@ Scroll by the given offset.

#### Defined in

[src/react/VGrid.tsx:148](https://github.com/inokawa/virtua/blob/e5e58101/src/react/VGrid.tsx#L148)
[src/react/VGrid.tsx:148](https://github.com/inokawa/virtua/blob/de2ef090/src/react/VGrid.tsx#L148)

## Properties

Expand All @@ -95,7 +95,7 @@ Get current scrollTop or scrollLeft.

#### Defined in

[src/react/VGrid.tsx:122](https://github.com/inokawa/virtua/blob/e5e58101/src/react/VGrid.tsx#L122)
[src/react/VGrid.tsx:122](https://github.com/inokawa/virtua/blob/de2ef090/src/react/VGrid.tsx#L122)

___

Expand All @@ -107,7 +107,7 @@ Get current scrollHeight or scrollWidth.

#### Defined in

[src/react/VGrid.tsx:126](https://github.com/inokawa/virtua/blob/e5e58101/src/react/VGrid.tsx#L126)
[src/react/VGrid.tsx:126](https://github.com/inokawa/virtua/blob/de2ef090/src/react/VGrid.tsx#L126)

___

Expand All @@ -119,4 +119,4 @@ Get current offsetHeight or offsetWidth.

#### Defined in

[src/react/VGrid.tsx:130](https://github.com/inokawa/virtua/blob/e5e58101/src/react/VGrid.tsx#L130)
[src/react/VGrid.tsx:130](https://github.com/inokawa/virtua/blob/de2ef090/src/react/VGrid.tsx#L130)
Loading

0 comments on commit c2c99db

Please sign in to comment.