{"id":20126652,"url":"https://github.com/webkixi/aotoo-react-treex","last_synced_at":"2026-06-09T15:02:41.671Z","repository":{"id":57181158,"uuid":"94534729","full_name":"webkixi/aotoo-react-treex","owner":"webkixi","description":"react tree component that based on the aotoo","archived":false,"fork":false,"pushed_at":"2019-03-07T10:17:27.000Z","size":65,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-05T12:09:03.724Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/webkixi.png","metadata":{"files":{"readme":"README.md","changelog":null,"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-06-16T10:44:25.000Z","updated_at":"2019-03-07T10:17:29.000Z","dependencies_parsed_at":"2022-09-26T17:00:50.826Z","dependency_job_id":null,"html_url":"https://github.com/webkixi/aotoo-react-treex","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/webkixi/aotoo-react-treex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webkixi%2Faotoo-react-treex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webkixi%2Faotoo-react-treex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webkixi%2Faotoo-react-treex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webkixi%2Faotoo-react-treex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webkixi","download_url":"https://codeload.github.com/webkixi/aotoo-react-treex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webkixi%2Faotoo-react-treex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34112225,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2024-11-13T20:17:09.434Z","updated_at":"2026-06-09T15:02:41.643Z","avatar_url":"https://github.com/webkixi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aotoo-react-treex\n\n## Install\n```bash\n// install\nyarn add aotoo-react-treex\n```\n\n## USAGE  \nDepends on aotoo this library, `Aotoo` is a global variable\n\n```jsx\nimport Aotoo from 'aotoo'\nimport treex from 'aotoo-react-treex'\n\nconst _data = [ \n  {title: '', idf: 'aaa'},\n  {title: 'abcfd', parent: 'aaa' },\n  {title: 'bcasd', parent: 'aaa' },\n  {title: 'aacwq', parent: 'aaa'},\n\n  {title: \u003cbutton\u003e123\u003c/button\u003e, idf: 'bbb'},\n  {title: 'yyufs', parent: 'bbb'},\n  {title: 'xfdsw', parent: 'bbb'},\n  {title: 'xxxdsehh', parent: 'bbb'}, \n]\n\nconst treeList = treex({ data: _data })\n\n// Render in the dom of the specified id  \ntreeList.render(id, function(dom){\n  // dom =\u003e ul.li\n  $(dom) ...\n})\n\n// ========  or \n\ntreeList.rendered = function(dom){\n  $(dom) ...\n}\nconst box = (\n  \u003cdiv\u003e\n    {treeList.render()}\n    \u003cbutton\u003ebutton\u003c/button\u003e\n  \u003c/div\u003e\n)\n\nAotoo.render(box, id)\n```\n\n\n## API  \n\n#### $update(opts)\n```jsx\n// after `treeList.render(id)`，You can dynamically update the structure after you update the data(_data)\n\ntreeList.$update({\n  index: 1,\n  data: {title: 'hello world', parent: 'aaa' }\n})\n\n// ======== or \n\ntreeList.$update({\n  data: [\n    {title: 'one'},\n    ...\n  ]\n})\n```\nThe above operation causes the structure to be re-rendered and the callback method `rendered` is executed again  \n\n#### $append(opts)\n```jsx\n// after `treeList.render(id)`\n\ntreeList.$append({\n  data: {title: 'hello world', parent: 'aaa' }\n})\n\n// ======== or \n\ntreeList.$append({\n  data: [\n    {title: 'one'},\n    ...\n  ]\n})\n``` \naccess the above operation, you can dynamically append the structure after you append the data(_data)  \n\n#### $prepend(opts)\n```jsx\n// after `treeList.render(id)`\n\ntreeList.$prepend({\n  data: {title: 'hello world', parent: 'aaa' }\n})\n\n// ======== or \n\ntreeList.$prepend({\n  data: [\n    {title: 'one'},\n    ...\n  ]\n})\n``` \naccess the above operation, you can dynamically prepend the structure after you prepend the data(_data)    \n\n#### $delete(opts)\n```jsx\n// after `treeList.render(id)`\n\ntreeList.$delete({\n  index: 1\n})\n\n// ======== or \n\ntreeList.$delete({\n  query: {title: 'abcfd'}\n})\n``` \naccess the above operation, you can dynamically delete the structure after you delete the data(_data)   \n\n\n## List status\n#### $loading(opts)\n```jsx\n// after `treeList.render(id)`\n\ntreeList.$loading({\n  loading: true || jsx dom\n})\n``` \naccess the above operation, will show loading bar\n\n#### $over(opts)\n```jsx\n// after `treeList.render(id)`\n\ntreeList.$over({\n  over: true || jsx dom\n})\n``` \naccess the above operation, will show over bar\n\n#### $pulldown(opts)\n```jsx\n// after `treeList.render(id)`\n\ntreeList.$pulldown({\n  pulldown: true || jsx dom\n})\n``` \naccess the above operation, will show pulldown bar\n\n#### $trigger(opts)\n```jsx\n// after `treeList.render(id)`\n\ntreeList.$trigger({\n  trigger: true || jsx dom\n})\n``` \naccess the above operation, will show trigger bar","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebkixi%2Faotoo-react-treex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebkixi%2Faotoo-react-treex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebkixi%2Faotoo-react-treex/lists"}