diff --git a/docs/API.md b/docs/API.md index 618802073..41cc30244 100644 --- a/docs/API.md +++ b/docs/API.md @@ -48,7 +48,7 @@ node_modules/@types/react/index.d.ts:361 #### Defined in -[src/react/List.tsx:203](https://github.com/inokawa/virtua/blob/6085b71/src/react/List.tsx#L203) +[src/react/List.tsx:199](https://github.com/inokawa/virtua/blob/e00e786/src/react/List.tsx#L199) ___ @@ -58,4 +58,4 @@ ___ #### Defined in -[src/react/List.tsx:140](https://github.com/inokawa/virtua/blob/6085b71/src/react/List.tsx#L140) +[src/react/List.tsx:138](https://github.com/inokawa/virtua/blob/e00e786/src/react/List.tsx#L138) diff --git a/docs/interfaces/CustomItemComponentProps.md b/docs/interfaces/CustomItemComponentProps.md index 8b98b4ff2..4170537b9 100644 --- a/docs/interfaces/CustomItemComponentProps.md +++ b/docs/interfaces/CustomItemComponentProps.md @@ -1,5 +1,7 @@ # Interface: CustomItemComponentProps +Props of customized item component. + ## Table of contents ### Properties @@ -15,7 +17,7 @@ #### Defined in -[src/react/List.tsx:199](https://github.com/inokawa/virtua/blob/6085b71/src/react/List.tsx#L199) +[src/react/List.tsx:195](https://github.com/inokawa/virtua/blob/e00e786/src/react/List.tsx#L195) ___ @@ -25,4 +27,4 @@ ___ #### Defined in -[src/react/List.tsx:200](https://github.com/inokawa/virtua/blob/6085b71/src/react/List.tsx#L200) +[src/react/List.tsx:196](https://github.com/inokawa/virtua/blob/e00e786/src/react/List.tsx#L196) diff --git a/docs/interfaces/CustomWindowComponentProps.md b/docs/interfaces/CustomWindowComponentProps.md index f0f54d38a..04c94cf2a 100644 --- a/docs/interfaces/CustomWindowComponentProps.md +++ b/docs/interfaces/CustomWindowComponentProps.md @@ -1,5 +1,7 @@ # Interface: CustomWindowComponentProps +Props of customized scrollable component. + ## Table of contents ### Properties @@ -19,7 +21,7 @@ #### Defined in -[src/react/List.tsx:102](https://github.com/inokawa/virtua/blob/6085b71/src/react/List.tsx#L102) +[src/react/List.tsx:100](https://github.com/inokawa/virtua/blob/e00e786/src/react/List.tsx#L100) ___ @@ -29,7 +31,7 @@ ___ #### Defined in -[src/react/List.tsx:103](https://github.com/inokawa/virtua/blob/6085b71/src/react/List.tsx#L103) +[src/react/List.tsx:101](https://github.com/inokawa/virtua/blob/e00e786/src/react/List.tsx#L101) ___ @@ -39,7 +41,7 @@ ___ #### Defined in -[src/react/List.tsx:104](https://github.com/inokawa/virtua/blob/6085b71/src/react/List.tsx#L104) +[src/react/List.tsx:102](https://github.com/inokawa/virtua/blob/e00e786/src/react/List.tsx#L102) ___ @@ -49,7 +51,7 @@ ___ #### Defined in -[src/react/List.tsx:105](https://github.com/inokawa/virtua/blob/6085b71/src/react/List.tsx#L105) +[src/react/List.tsx:103](https://github.com/inokawa/virtua/blob/e00e786/src/react/List.tsx#L103) ___ @@ -59,7 +61,7 @@ ___ #### Defined in -[src/react/List.tsx:106](https://github.com/inokawa/virtua/blob/6085b71/src/react/List.tsx#L106) +[src/react/List.tsx:104](https://github.com/inokawa/virtua/blob/e00e786/src/react/List.tsx#L104) ___ @@ -69,4 +71,4 @@ ___ #### Defined in -[src/react/List.tsx:107](https://github.com/inokawa/virtua/blob/6085b71/src/react/List.tsx#L107) +[src/react/List.tsx:105](https://github.com/inokawa/virtua/blob/e00e786/src/react/List.tsx#L105) diff --git a/docs/interfaces/ListHandle.md b/docs/interfaces/ListHandle.md index 871e1d026..06fa3437b 100644 --- a/docs/interfaces/ListHandle.md +++ b/docs/interfaces/ListHandle.md @@ -24,7 +24,7 @@ Get current scrollTop or scrollLeft. #### Defined in -[src/react/List.tsx:218](https://github.com/inokawa/virtua/blob/6085b71/src/react/List.tsx#L218) +[src/react/List.tsx:214](https://github.com/inokawa/virtua/blob/e00e786/src/react/List.tsx#L214) ___ @@ -36,7 +36,7 @@ Get current scrollHeight or scrollWidth. #### Defined in -[src/react/List.tsx:222](https://github.com/inokawa/virtua/blob/6085b71/src/react/List.tsx#L222) +[src/react/List.tsx:218](https://github.com/inokawa/virtua/blob/e00e786/src/react/List.tsx#L218) ## Methods @@ -58,7 +58,7 @@ Scroll to the item specified by index. #### Defined in -[src/react/List.tsx:227](https://github.com/inokawa/virtua/blob/6085b71/src/react/List.tsx#L227) +[src/react/List.tsx:223](https://github.com/inokawa/virtua/blob/e00e786/src/react/List.tsx#L223) ___ @@ -80,4 +80,4 @@ Scroll to the item specified by offset. #### Defined in -[src/react/List.tsx:232](https://github.com/inokawa/virtua/blob/6085b71/src/react/List.tsx#L232) +[src/react/List.tsx:228](https://github.com/inokawa/virtua/blob/e00e786/src/react/List.tsx#L228) diff --git a/docs/interfaces/ListProps.md b/docs/interfaces/ListProps.md index 33b687031..da2069049 100644 --- a/docs/interfaces/ListProps.md +++ b/docs/interfaces/ListProps.md @@ -29,7 +29,7 @@ Elements rendered by this component. #### Defined in -[src/react/List.tsx:242](https://github.com/inokawa/virtua/blob/6085b71/src/react/List.tsx#L242) +[src/react/List.tsx:238](https://github.com/inokawa/virtua/blob/e00e786/src/react/List.tsx#L238) ___ @@ -45,7 +45,7 @@ Item size hint for unmeasured items. It's recommended to specify this prop if it #### Defined in -[src/react/List.tsx:247](https://github.com/inokawa/virtua/blob/6085b71/src/react/List.tsx#L247) +[src/react/List.tsx:243](https://github.com/inokawa/virtua/blob/e00e786/src/react/List.tsx#L243) ___ @@ -61,7 +61,7 @@ Number of items to render above/below the visible bounds of the list. You can in #### Defined in -[src/react/List.tsx:252](https://github.com/inokawa/virtua/blob/6085b71/src/react/List.tsx#L252) +[src/react/List.tsx:248](https://github.com/inokawa/virtua/blob/e00e786/src/react/List.tsx#L248) ___ @@ -73,7 +73,7 @@ If true, rendered as a horizontally scrollable list. Otherwise rendered as a ver #### Defined in -[src/react/List.tsx:256](https://github.com/inokawa/virtua/blob/6085b71/src/react/List.tsx#L256) +[src/react/List.tsx:252](https://github.com/inokawa/virtua/blob/e00e786/src/react/List.tsx#L252) ___ @@ -85,7 +85,7 @@ You have to set true if you use this component under `direction: rtl` style. #### Defined in -[src/react/List.tsx:260](https://github.com/inokawa/virtua/blob/6085b71/src/react/List.tsx#L260) +[src/react/List.tsx:256](https://github.com/inokawa/virtua/blob/e00e786/src/react/List.tsx#L256) ___ @@ -101,7 +101,7 @@ Number of items to be the margin from the end of the scroll. See also [onEndReac #### Defined in -[src/react/List.tsx:265](https://github.com/inokawa/virtua/blob/6085b71/src/react/List.tsx#L265) +[src/react/List.tsx:261](https://github.com/inokawa/virtua/blob/e00e786/src/react/List.tsx#L261) ___ @@ -113,7 +113,7 @@ Inline style prop to override style of scrollable element. #### Defined in -[src/react/List.tsx:269](https://github.com/inokawa/virtua/blob/6085b71/src/react/List.tsx#L269) +[src/react/List.tsx:265](https://github.com/inokawa/virtua/blob/e00e786/src/react/List.tsx#L265) ___ @@ -121,7 +121,7 @@ ___ • `Optional` **element**: `ForwardRefExoticComponent`<[`CustomWindowComponentProps`](CustomWindowComponentProps.md) & `RefAttributes`<`any`\>\> -Customized element type for scrollable element. +Customized element type for scrollable element. This element will get [CustomWindowComponentProps](CustomWindowComponentProps.md) as props. **`Default Value`** @@ -129,7 +129,7 @@ DefaultWindow #### Defined in -[src/react/List.tsx:274](https://github.com/inokawa/virtua/blob/6085b71/src/react/List.tsx#L274) +[src/react/List.tsx:270](https://github.com/inokawa/virtua/blob/e00e786/src/react/List.tsx#L270) ___ @@ -137,7 +137,7 @@ ___ • `Optional` **itemElement**: `CustomItemComponentOrElement` -Customized element type for item element. +Customized element type for item element. This element will get [CustomItemComponentProps](CustomItemComponentProps.md) as props. **`Default Value`** @@ -145,7 +145,7 @@ Customized element type for item element. #### Defined in -[src/react/List.tsx:279](https://github.com/inokawa/virtua/blob/6085b71/src/react/List.tsx#L279) +[src/react/List.tsx:275](https://github.com/inokawa/virtua/blob/e00e786/src/react/List.tsx#L275) ___ @@ -165,7 +165,7 @@ Callback invoked when scrolling reached to the end. The margin from the end is s #### Defined in -[src/react/List.tsx:283](https://github.com/inokawa/virtua/blob/6085b71/src/react/List.tsx#L283) +[src/react/List.tsx:279](https://github.com/inokawa/virtua/blob/e00e786/src/react/List.tsx#L279) ___ @@ -181,9 +181,9 @@ Callback invoked whenever scroll offset changes. ##### Parameters -| Name | Type | -| :------ | :------ | -| `offset` | `number` | +| Name | Type | Description | +| :------ | :------ | :------ | +| `offset` | `number` | Current scrollTop or scrollLeft. | ##### Returns @@ -191,7 +191,7 @@ Callback invoked whenever scroll offset changes. #### Defined in -[src/react/List.tsx:287](https://github.com/inokawa/virtua/blob/6085b71/src/react/List.tsx#L287) +[src/react/List.tsx:284](https://github.com/inokawa/virtua/blob/e00e786/src/react/List.tsx#L284) ___ @@ -211,4 +211,4 @@ Callback invoked when scrolling stops. #### Defined in -[src/react/List.tsx:291](https://github.com/inokawa/virtua/blob/6085b71/src/react/List.tsx#L291) +[src/react/List.tsx:288](https://github.com/inokawa/virtua/blob/e00e786/src/react/List.tsx#L288) diff --git a/package-lock.json b/package-lock.json index c5a9483ac..4d9a0b3f2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "virtua", - "version": "0.1.11", + "version": "0.1.12", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "virtua", - "version": "0.1.11", + "version": "0.1.12", "license": "MIT", "dependencies": { "use-sync-external-store": "^1.2.0" diff --git a/package.json b/package.json index e449cc3dd..c776d03d9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "virtua", - "version": "0.1.11", + "version": "0.1.12", "description": "A zero-config, fast and small (3kB) virtual list component for React.", "main": "lib/index.js", "module": "lib/index.mjs",