{"id":37986956,"url":"https://github.com/nojsja/react-treeview","last_synced_at":"2026-01-16T18:39:52.646Z","repository":{"id":29235472,"uuid":"116078968","full_name":"nojsja/react-treeview","owner":"nojsja","description":"React Tree View Component, Configurable, Customizable.","archived":false,"fork":false,"pushed_at":"2022-12-07T04:28:22.000Z","size":200,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-27T10:10:41.874Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nojsja.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-03T02:03:24.000Z","updated_at":"2021-04-03T04:29:05.000Z","dependencies_parsed_at":"2023-01-14T14:25:44.133Z","dependency_job_id":null,"html_url":"https://github.com/nojsja/react-treeview","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nojsja/react-treeview","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nojsja%2Freact-treeview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nojsja%2Freact-treeview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nojsja%2Freact-treeview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nojsja%2Freact-treeview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nojsja","download_url":"https://codeload.github.com/nojsja/react-treeview/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nojsja%2Freact-treeview/sbom","scorecard":{"id":102116,"data":{"date":"2022-08-15","repo":{"name":"github.com/nojsja/react-treeview","commit":"f1644e6833428d0679376855558e384081c1104b"},"scorecard":{"version":"v4.5.0-26-g10b6052","commit":"10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93"},"score":4.6,"checks":[{"name":"Code-Review","score":1,"reason":"GitHub code reviews found for 2 commits out of the last 12 -- score normalized to 1","details":["Warn: no reviews found for commit: d29f94344f5221de336603c55e67295d81d8e66e","Warn: no reviews found for commit: 0e04f17677ea1e7fdf7b9a34553f0bb9ed6e82e0","Warn: no reviews found for commit: 40f8be765f670ab734a04e381c51f39d4eee8347","Warn: no reviews found for commit: 2af4dcc7f78c2905434715487de8a1520eb9eb3f","Warn: no reviews found for commit: 06ab08bd47bf307a75baa87e463b51912e86e566","Warn: no reviews found for commit: 40949c3e065a2b10fff1ac6b70d63255e41ee189","Warn: no reviews found for commit: 5f1c08e6cdcaadcd0268a7e7c03880f830a65c02","Warn: no reviews found for commit: 3147e6066d8389e0a5d2afb6bb8e536c5118068e","Warn: no reviews found for commit: 78555f748a095515efadc8fe0603045ee9786421","Warn: no reviews found for commit: 7955347cb9f2bcb2217d856e44bda6bdbe894ad8"],"documentation":{"short":"Determines if the project requires code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) out of 12 and 0 issue activity out of 1 found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no badge detected","details":null,"documentation":{"short":"Determines if the project has a CII Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#cii-best-practices"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":["Warn: no GitHub releases found"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":10,"reason":"no vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#vulnerabilities"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#branch-protection"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"no published package detected","details":["Warn: no GitHub publishing workflow detected"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":10,"reason":"tokens are read-only in GitHub workflows","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":10,"reason":"all dependencies are pinned","details":["Info: GitHub-owned GitHubActions are pinned","Info: Third-party GitHubActions are pinned","Info: Dockerfile dependencies are pinned","Info: no insecure (not pinned by hash) dependency downloads found in Dockerfiles","Info: no insecure (not pinned by hash) dependency downloads found in shell scripts"],"documentation":{"short":"Determines if the project has declared and pinned its dependencies.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#pinned-dependencies"}},{"name":"License","score":0,"reason":"license file not detected","details":null,"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#license"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":null,"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#security-policy"}},{"name":"Dependency-Update-Tool","score":0,"reason":"no update tool detected","details":["Warn: dependabot config file not detected in source location.\n\t\t\tWe recommend setting this configuration in code so it can be easily verified by others.","Warn: renovatebot config file not detected in source location.\n\t\t\tWe recommend setting this configuration in code so it can be easily verified by others."],"documentation":{"short":"Determines if the project uses a dependency update tool.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#dependency-update-tool"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":null,"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#fuzzing"}}]},"last_synced_at":"2025-08-15T10:21:30.168Z","repository_id":29235472,"created_at":"2025-08-15T10:21:30.168Z","updated_at":"2025-08-15T10:21:30.168Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28481056,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-01-16T18:39:51.969Z","updated_at":"2026-01-16T18:39:52.636Z","avatar_url":"https://github.com/nojsja.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## react-treeview\n\u003eA configurable tree view component based on semantic-ui-react and powered by react.\n\n#### Preview\n\n![SemanticTree](./screenshots/semantic-tree.png)\n\n#### Depends\nThe component depends on `semantic-ui-react` and `semantic-ui-css`, please confirm to install it and import the `semantic-ui-css` first.\n```js\n...\nimport 'semantic-ui-css/semantic.min.css';\nimport SourceTree from 'react-treeview-semantic';\n...\n```\n\n#### How To Use\n_________________\n\n```js\n// install\nnpm install --save react-treeview-semantic;\n\n// import\nimport SourceTree from 'react-treeview-semantic';\n\n// render\n\u003cSourceTree\n  setActiveItem={this.setActiveItem}\n  baseIcon={null}\n  baseColor={null}\n  checkable={true}\n  singleChecked={true}\n  treeData={treeData}\n  getChecked={this.getChecked}\n/\u003e\n\n```\n\n#### Attributes\n________________\n\n1. treeData - [Array] - isRequired\n\u003e Data to build the tree view, see details from the `treeData details` below.\n\n2. baseIcon - [String]\n\u003e The deafult flag of each tree-level is base, and you can customize icon of the base-item, all icons you can found in [semantic](https://react.semantic-ui.com/elements/icon).\n\n3. baseColor - [String]\n\u003e The color for baseIcon.\n\n4. checkable - [Bool]\n\u003e Set it to true if you wanna get a tree-level data when click the tree component.\n\n5. singleChecked - [Bool]\n\u003e Both set `checkable` and `singleChecked` to be true,then the tree is in single selection status, only tree nodes which `flag` is not 'base' can be chosen.\n\n6. getChecked - [Function callback]\n\u003e If tree is in single selectron or multi selection status, the `getChecked` fuction will be called with data - (`checkedItems`, `rootItem`) when select or deselect any tree nodes.\n\n7. setActiveItem - [Function callback]\n\u003e any time, you click the tree nodes, the `setActiveItem` func will be called. In setActiveItem func, use `console.log(arguments)` to figure out all response data, normally you will receive the data of item you clicked, flag and the root item info.\n\n#### TreeData Details\n_____________________\n\n1. flag - [base | file | table]\n\u003e The deafult value is `base`, means the current tree level is a folder and can not be selected. You can use `setActiveItem` hook func to get the flag of current tree node.\n\n2. name\n\u003e `name` is isRequired, it doesn't matter whether repeat name already exits.\n\n3. children\n\u003e the child nodes of curren node.\n\n4. example\n```js\n// demo data\n[\n  {\n    name: 'level1',\n    flag: 'base',\n    children: [\n      { name: 'level2-1' },\n      {\n        name: 'level2-2',\n        children: [\n          { name: 'level3-1', children: [{ name: 'level4-1', flag: 'table'}] },\n          { name: 'level3-2', flag: 'file' },\n          { name: 'level3-3', children: [{ name: 'level4-2', flag: 'table' }] },\n        ]\n      }\n    ]\n  },\n\n  {\n    name: 'long-name-long-name-long-name-long-name-long-name-',\n    flag: 'base',\n    children: [\n      { name: 'level2-1' },\n      {\n        name: 'level2-2',\n        children: [\n          { name: 'level3-1',flag: 'file' },\n          { name: 'level3-2', flag: 'file' }\n        ]\n      }\n    ]\n  }\n]\n```\n\n#### Demo\nA full demo from my project - [react-mobx-template](https://github.com/nojsja/react-mobx-template/blob/master/app/views/page1/index.jsx)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnojsja%2Freact-treeview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnojsja%2Freact-treeview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnojsja%2Freact-treeview/lists"}