{"id":20226136,"url":"https://github.com/steamerjs/react-list-scroll","last_synced_at":"2025-07-24T22:04:37.062Z","repository":{"id":57333989,"uuid":"83771442","full_name":"steamerjs/react-list-scroll","owner":"steamerjs","description":"react 滚动加载组件","archived":false,"fork":false,"pushed_at":"2018-12-24T12:00:43.000Z","size":427,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-06-14T10:49:53.092Z","etag":null,"topics":["component","react","scroll","scrolling"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/steamerjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-03T07:38:34.000Z","updated_at":"2019-08-18T06:25:10.000Z","dependencies_parsed_at":"2022-08-29T13:20:18.961Z","dependency_job_id":null,"html_url":"https://github.com/steamerjs/react-list-scroll","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/steamerjs/react-list-scroll","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steamerjs%2Freact-list-scroll","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steamerjs%2Freact-list-scroll/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steamerjs%2Freact-list-scroll/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steamerjs%2Freact-list-scroll/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/steamerjs","download_url":"https://codeload.github.com/steamerjs/react-list-scroll/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steamerjs%2Freact-list-scroll/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265425735,"owners_count":23762903,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["component","react","scroll","scrolling"],"created_at":"2024-11-14T07:16:26.699Z","updated_at":"2025-07-24T22:04:36.975Z","avatar_url":"https://github.com/steamerjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## react-list-scroll\n\n[中文文档](/README_ZH.md)\n\n###  Usage\n```javascript\nimport Scroll from \"react-list-scroll\";\nimport List from \"./list\";\n \n\u003cScroll\u003e\n    \u003cList\u003e\u003c/List\u003e\n\u003c/Scroll\u003e\n```\n\n### Options\n\n#### `props.xxx`\n\n```javascript\n\u003cScroll\n    disable={xxx}\n    isEnd={xxx}\n    loadDataForScroll={() =\u003e {}}\n\u003e\n \n\u003c/Scroll\u003e\n```\n* disable\n\t- disable scroll event\n* useWindow\n    - use `window` as the scroll container, default `false`\n* scrollContainer\n\t- user-defined scroll container, you can pass an HTML element\n* scrollStyle\n\t- style of scroll component\n* className\n\t- className of scroll component\n* scrollPoint\n\t- user customized point to trigger loadDataForScroll\n```javascript\n// this is the logic for comparison \nscrollTop \u003e this.props.scrollPoint\n```\n* isHalf\n\t- scroll to half and trigger loadDataForScroll\n* isEnd\n\t- the list reaches the end\n* loadDataForScroll\n\t- callback passed from parent component\n\n####  `this.scrollEle.xxx`\n\n```javascript\n// We use ref to store `Scroll` component in attribute.\n\u003cScroll\n\tref={(scrollEle) =\u003e {\n\t\tthis.scrollEle = scrollEle;\n\t}}\n\u003e\n\u003c/Scroll\u003e\n\nthis.scrollEle.xxx\n```\n\n* prvScrollTop\n\t- position of last scroll\n\n\n\n### Caveat\n* If there two list, please put them inside Scroll like this:\n\n```javascript\n\u003cScroll\u003e\n\t\u003cList\u003e\u003c/List\u003e\n\t\u003cList\u003e\u003c/List\u003e\n\u003c/Scroll\u003e\n```\n\nIf your two-list scrolling is using block and none to display, please put your restoring scrolling position logic inside your switching tab logic.\n\nIf your two-list scrolling requires destruction of another list, you can destroy `\u003cScroll\u003e` and recreate it. After componentWillMount is called, you can restore the position via prvScrollTop\n\n### Preact Version\n\n```javascript\nimport Scroll from 'react-list-scroll/pindex';\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteamerjs%2Freact-list-scroll","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsteamerjs%2Freact-list-scroll","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteamerjs%2Freact-list-scroll/lists"}