{"id":20180381,"url":"https://github.com/ppcamp/sveltekit-cursor-pagination","last_synced_at":"2025-05-07T03:30:29.295Z","repository":{"id":165029318,"uuid":"640427626","full_name":"ppcamp/sveltekit-cursor-pagination","owner":"ppcamp","description":"A simple example of how to control and handle with a cursor pagination. This repo uses Tailwind, Sveltekit + TS and Skeleton","archived":true,"fork":false,"pushed_at":"2023-05-22T01:27:37.000Z","size":142,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-03T05:43:42.195Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Svelte","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/ppcamp.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-14T03:45:37.000Z","updated_at":"2024-05-19T17:45:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"b784d9b7-da9c-4b22-83fa-549c2d920309","html_url":"https://github.com/ppcamp/sveltekit-cursor-pagination","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppcamp%2Fsveltekit-cursor-pagination","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppcamp%2Fsveltekit-cursor-pagination/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppcamp%2Fsveltekit-cursor-pagination/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppcamp%2Fsveltekit-cursor-pagination/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ppcamp","download_url":"https://codeload.github.com/ppcamp/sveltekit-cursor-pagination/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252806321,"owners_count":21807188,"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":[],"created_at":"2024-11-14T02:30:27.916Z","updated_at":"2025-05-07T03:30:29.285Z","avatar_url":"https://github.com/ppcamp.png","language":"Svelte","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sveltekit-cursor-pagination\n\nA simple example of how to control and handle with a cursor pagination. This repo uses Tailwind, Sveltekit + TS and Skeleton\n\nIn this repo, I'll create a simple pagination component table that can be used by multiple skip/take\napproaches, different from tanstack, wich doesn't support well custom features.\n\n## How to run?\n\n```bash\nnpm i\nnpm run dev\n```\n\n## ToDOs\n\n- Add pageSize select\n- FIXME: createPagination with SSR\n- TODO: use actions/forms to add\n- TODO: allow to pass parameters to createPagination\n  1.  the pageSize (to allow users to store the pageSize in local|session and retrieve it later)\n  2.  all (almost) stores, allowing to re-create an old pagination or using pagination from SSR.\n\n**Proposal:**\n\n\u003cpre\u003e\ntype PageSizes = Record\u003c string TableKeyName, number\u003e\ne.g: { actorsTable: 10, baseTable: 15}\n\nuser open →\n\ton change pageSize →\n\t\t[store pageSize into local] →\n\t\t\tclose window\n\nuser open →\n\t[load all stores and send them as cookie (cookies can be stringfied) ]→\n\u003c/pre\u003e\n\n**For #1:**\n\n\u003cpre\u003e\n[in page.ts, load cookies for this table] →\n\t[send loadedPageSize to page and use onMount functions]\n\n\u003c/pre\u003e\n\n**For #2:**\n\n\u003cpre\u003e\n[create pagination using pageSize got from cookies] →\n\t[render table with this paginated data] →\n\t\t[ create an action for every pagination event and use it to render elements on server ]\n\u003c/pre\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fppcamp%2Fsveltekit-cursor-pagination","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fppcamp%2Fsveltekit-cursor-pagination","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fppcamp%2Fsveltekit-cursor-pagination/lists"}