diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000..9d08a1a828 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..5a0d5e480b --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto eol=lf diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000000..e2ea8ad3b9 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,3 @@ +# These are supported funding model platforms + +github: tannerlinsley diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000000..67bf29eb62 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,100 @@ +name: '🐛 Bug report' +description: Report a reproducible bug or regression +body: + - type: markdown + attributes: + value: | + Thank you for reporting an issue :pray:. + + This issue tracker is for reporting reproducible bugs or regression's found in [react-table](https://github.com/tanstack/table) + If you have a question about how to achieve or implement something and are struggling, please post a question + inside of react-table's [Discussions tab](https://github.com/tanstack/table/discussions) instead of filing an issue. + + Before submitting a new bug/issue, please check the links below to see if there is a solution or question posted there already: + - TanStack Table's [Discussions tab](https://github.com/tanstack/table/discussions) + - TanStack Table's [Open Issues](https://github.com/tanstack/table/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) + - TanStack Table's [Closed Issues](https://github.com/tanstack/table/issues?q=is%3Aissue+sort%3Aupdated-desc+is%3Aclosed) + + The more information you fill in, the better the community can help you. + + - type: input + id: tanstack-table-version + attributes: + label: TanStack Table version + description: | + - Please let us know the exact version of the TanStack Table framework adapter that you were using when the issue occurred. If you are using an older version, check to see if your bug has already been solved in the latest version. Please don't just put in "latest", as this is subject to change. + - The latest "table-core" version is + placeholder: | + e.g. v8.11.6 + validations: + required: true + + - type: input + id: framework-library-version + attributes: + label: Framework/Library version + description: Which framework and what version of that framework are you using? + placeholder: | + e.g. React v17.0.2 + validations: + required: true + + - type: textarea + id: description + attributes: + label: Describe the bug and the steps to reproduce it + description: Provide a clear and concise description of the challenge you are running into, and the steps we should take to try to reproduce your bug. + validations: + required: true + + - type: input + id: link + attributes: + label: Your Minimal, Reproducible Example - (Sandbox Highly Recommended) + description: | + Please add a link to a minimal reproduction. + Note: + - Your bug may get fixed much faster if we can run your code and it doesn't have dependencies other than React. + - To create a shareable code example for web, you can use CodeSandbox (https://codesandbox.io/s/new) or Stackblitz (https://stackblitz.com/). + - Please make sure the example is complete and runnable without prior dependencies and free of unnecessary abstractions + - Feel free to fork any of the official CodeSandbox examples to reproduce your issue: https://github.com/tanstack/table/tree/main/examples/ + - For React Native, you can use: https://snack.expo.dev/ + - For TypeScript related issues only, a TypeScript Playground link might be sufficient: https://www.typescriptlang.org/play + - Please read these tips for providing a minimal example: https://stackoverflow.com/help/mcve. + placeholder: | + e.g. Code Sandbox, Stackblitz, TypeScript Playground, etc. + validations: + required: true + + - type: textarea + id: screenshots_or_videos + attributes: + label: Screenshots or Videos (Optional) + description: | + If applicable, add screenshots or a video to help explain your problem. + For more information on the supported file image/file types and the file size limits, please refer + to the following link: https://docs.github.com/en/github/writing-on-github/working-with-advanced-formatting/attaching-files + placeholder: | + You can drag your video or image files inside of this editor ↓ + + - type: dropdown + attributes: + options: + - No, because I do not know how + - No, because I do not have time to dig into it + - Maybe, I'll investigate and start debugging + - Yes, I think I know how to fix it and will discuss it in the comments of this issue + - Yes, I am also opening a PR that solves the problem along side this issue + label: Do you intend to try to help solve this bug with your own PR? + description: | + If you think you know the cause of the problem, the fastest way to get it fixed is to suggest a fix, or fix it yourself! However, it is ok if you cannot solve this yourself and are just wanting help. + - type: checkboxes + id: agrees-to-terms + attributes: + label: Terms & Code of Conduct + description: By submitting this issue, you agree to follow our Code of Conduct and can verify that you have followed the requirements outlined above to the best of your ability. + options: + - label: I agree to follow this project's Code of Conduct + required: true + - label: I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed. + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000000..963fe444ec --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,11 @@ +blank_issues_enabled: false +contact_links: + - name: 🤔 Feature Requests & Questions + url: https://github.com/TanStack/table/discussions + about: Please ask and answer questions here. + - name: 💬 Community Chat + url: https://discord.gg/mQd7egN + about: A dedicated discord server hosted by TanStack + - name: 🦋 TanStack Bluesky + url: https://bsky.app/profile/tanstack.com + about: Stay up to date with new releases of our libraries diff --git a/.github/pull_request_template b/.github/pull_request_template new file mode 100644 index 0000000000..2c10bc7d7d --- /dev/null +++ b/.github/pull_request_template @@ -0,0 +1,8 @@ +## 🎯 Changes + + + +## ✅ Checklist + +- [ ] I have followed the steps in the [Contributing guide](https://github.com/TanStack/table/blob/main/CONTRIBUTING.md). +- [ ] I have tested this code locally with `pnpm test:pr`. diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml new file mode 100644 index 0000000000..e3bc82ecfd --- /dev/null +++ b/.github/workflows/autofix.yml @@ -0,0 +1,31 @@ +name: autofix.ci # needed to securely identify the workflow + +on: + pull_request: + push: + branches: [main, alpha, beta, rc] + +concurrency: + group: ${{ github.workflow }}-${{ github.event.number || github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + autofix: + name: autofix + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6.0.1 + with: + fetch-depth: 0 + - name: Setup Tools + uses: tanstack/config/.github/setup@main + - name: Fix formatting + run: pnpm format + - name: Apply fixes + uses: autofix-ci/action@dd55f44df8f7cdb7a6bf74c78677eb8acd40cd0a + with: + commit-message: 'ci: apply automated fixes' diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000000..698c3b0a35 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,55 @@ +name: PR + +on: + pull_request: + paths-ignore: + - 'docs/**' + - 'media/**' + - '**/*.md' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.number || github.ref }} + cancel-in-progress: true + +env: + NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} + +permissions: + contents: read + +jobs: + test: + name: Test + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6.0.1 + with: + fetch-depth: 0 + - name: Start Nx Agents + run: npx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml" + - name: Setup Tools + uses: tanstack/config/.github/setup@main + - name: Get base and head commits for `nx affected` + uses: nrwl/nx-set-shas@v4.4.0 + with: + main-branch-name: main + - name: Run Checks + run: pnpm run test:pr --parallel=3 + - name: Stop Nx Agents + if: ${{ always() }} + run: npx nx-cloud stop-all-agents + preview: + name: Preview + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6.0.1 + with: + fetch-depth: 0 + - name: Setup Tools + uses: tanstack/config/.github/setup@main + - name: Build Packages + run: pnpm run build:all + - name: Publish Previews + run: pnpx pkg-pr-new publish --pnpm --compact './packages/*' --template './examples/*/*' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000000..c44687d853 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,49 @@ +name: Release + +on: + workflow_dispatch: + inputs: + tag: + description: override release tag + required: false + push: + branches: [main, alpha, beta, rc] + +concurrency: + group: ${{ github.workflow }}-${{ github.event.number || github.ref }} + cancel-in-progress: true + +env: + NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} + +permissions: + contents: write + id-token: write + +jobs: + release: + name: Release + if: github.repository_owner == 'TanStack' + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6.0.1 + with: + fetch-depth: 0 + - name: Start Nx Agents + run: npx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml" + - name: Setup Tools + uses: tanstack/config/.github/setup@main + - name: Run Tests + run: pnpm run test:ci --parallel=3 + - name: Stop Nx Agents + if: ${{ always() }} + run: npx nx-cloud stop-all-agents + - name: Publish + run: | + git config --global user.name 'Tanner Linsley' + git config --global user.email 'tannerlinsley@users.noreply.github.com' + pnpm run cipublish + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TAG: ${{ inputs.tag }} diff --git a/.gitignore b/.gitignore index 59d4885155..003c036732 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,57 @@ -node_modules/ -lib/ -react-table.js -react-table.css + +# See https://help.github.com/ignore-files/ for more about ignoring files. + +# dependencies +node_modules +package-lock.json +yarn.lock + +# builds +build +dist +lib +es +artifacts +.rpt2_cache +coverage +*.tgz + +# misc +.DS_Store +.env +.env.local +.env.development.local +.env.test.local +.env.production.local +.next +.svelte-kit + +npm-debug.log* +yarn-debug.log* +yarn-error.log* +.history +size-plugin.json +stats-hydration.json +stats-react.json +stats.html +.vscode/settings.json +.idea + *.log -example/dist/ +.DS_Store +.cache +.idea +.pnpm-store + +package-lock.json +yarn.lock +*.tsbuildinfo +*.tsbuildinfo + +.svelte-kit +.nx/cache +.nx/workspace-data +vite.config.js.timestamp-* +vite.config.ts.timestamp-* -storybook-static +.angular diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000000..268c392d3c --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +provenance=true diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000000..b404027604 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +24.8.0 diff --git a/.nx/workflows/dynamic-changesets.yaml b/.nx/workflows/dynamic-changesets.yaml new file mode 100644 index 0000000000..d3536f3ba7 --- /dev/null +++ b/.nx/workflows/dynamic-changesets.yaml @@ -0,0 +1,4 @@ +distribute-on: + small-changeset: 3 linux-medium-js + medium-changeset: 6 linux-medium-js + large-changeset: 10 linux-medium-js diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000000..63dd7224e6 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,12 @@ +**/.nx/ +**/.nx/cache +**/.svelte-kit +**/build +**/coverage +**/dist +**/docs +**/old-examples +**/examples/**/*.svelte +pnpm-lock.yaml + +.angular diff --git a/.storybook/config.js b/.storybook/config.js deleted file mode 100644 index 27d9d663d7..0000000000 --- a/.storybook/config.js +++ /dev/null @@ -1,40 +0,0 @@ -import React from 'react' -import { configure, storiesOf } from '@kadira/storybook' - -import './reset.css' -import './fonts.css' -import './layout.css' -import '../stories/utils/prism.css' -import 'github-markdown-css/github-markdown.css' -import '../react-table.css' -// -import Readme from '../README.md' -// -import Simple from '../stories/Simple.js' -import ServerSide from '../stories/ServerSide.js' -import SubComponents from '../stories/SubComponents.js' -import Pivoting from '../stories/Pivoting.js' -import PivotingSubComponents from '../stories/PivotingSubComponents.js' -import OneHundredKRows from '../stories/OneHundredKRows.js' -// -configure(() => { - storiesOf('1. Docs') - .add('Readme', () => { - const ReadmeCmp = React.createClass({ - render () { - return - }, - componentDidMount () { - global.Prism.highlightAll() - } - }) - return - }) - storiesOf('2. Demos') - .add('Client-side Data', Simple) - .add('Server-side Data', ServerSide) - .add('Sub Components', SubComponents) - .add('Pivoting & Aggregation', Pivoting) - .add('Pivoting & Aggregation w/ Sub Components', PivotingSubComponents) - .add('100k Rows w/ Pivoting & Sub Components', OneHundredKRows) -}, module) diff --git a/.storybook/fonts.css b/.storybook/fonts.css deleted file mode 100644 index 7ff471979a..0000000000 --- a/.storybook/fonts.css +++ /dev/null @@ -1,6 +0,0 @@ -@import url("https://fonts.googleapis.com/css?family=Open+Sans:300,600"); -body { - background: #fff; - font-family: 'Open Sans', sans-serif; - font-weight: 300; -} diff --git a/.storybook/layout.css b/.storybook/layout.css deleted file mode 100644 index 4f5a133e9f..0000000000 --- a/.storybook/layout.css +++ /dev/null @@ -1,3 +0,0 @@ -body{ - padding: 20px; -} diff --git a/.storybook/reset.css b/.storybook/reset.css deleted file mode 100644 index fe73564367..0000000000 --- a/.storybook/reset.css +++ /dev/null @@ -1,48 +0,0 @@ -/* http://meyerweb.com/eric/tools/css/reset/ - v2.0 | 20110126 - License: none (public domain) -*/ - -html, body, div, span, applet, object, iframe, -h1, h2, h3, h4, h5, h6, p, blockquote, pre, -a, abbr, acronym, address, big, cite, code, -del, dfn, em, img, ins, kbd, q, s, samp, -small, strike, strong, sub, sup, tt, var, -b, u, i, center, -dl, dt, dd, ol, ul, li, -fieldset, form, label, legend, -table, caption, tbody, tfoot, thead, tr, th, td, -article, aside, canvas, details, embed, -figure, figcaption, footer, header, hgroup, -menu, nav, output, ruby, section, summary, -time, mark, audio, video { - margin: 0; - padding: 0; - border: 0; - font-size: 100%; - font: inherit; - vertical-align: baseline; -} -/* HTML5 display-role reset for older browsers */ -article, aside, details, figcaption, figure, -footer, header, hgroup, menu, nav, section { - display: block; -} -body { - line-height: 1; -} -/*ol, ul { - list-style: none; -}*/ -blockquote, q { - quotes: none; -} -blockquote:before, blockquote:after, -q:before, q:after { - content: ''; - content: none; -} -table { - border-collapse: collapse; - border-spacing: 0; -} diff --git a/.storybook/webpack.config.js b/.storybook/webpack.config.js deleted file mode 100644 index d09f4beca3..0000000000 --- a/.storybook/webpack.config.js +++ /dev/null @@ -1,27 +0,0 @@ -const path = require('path') - -// load the default config generator. -const genDefaultConfig = require('@kadira/storybook/dist/server/config/defaults/webpack.config.js') - -module.exports = (config, env) => { - config = genDefaultConfig(config, env) - - Object.assign(config, { - module: Object.assign(config.module, { - loaders: config.module.loaders.concat([{ - test: /\.md$/, - loader: 'html!markdown', - include: path.resolve(__dirname, '../') - }, { - test: /\.html$/, - loader: 'html', - query: { - minimize: true - }, - include: path.resolve(__dirname, '../') - }]) - }) - }) - - return config -} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 04f1d52d7e..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "6" -script: npm test diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000000..1d7ac851ea --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"] +} diff --git a/CNAME b/CNAME deleted file mode 100644 index 9a30abb277..0000000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -react-table.js.org diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000000..fa111aa2db --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,81 @@ +--- +title: Code of Conduct +id: code-of-conduct +--- + +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +- Using welcoming and inclusive language +- Being respectful of differing viewpoints and experiences +- Gracefully accepting constructive criticism +- Focusing on what is best for the community +- Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +- The use of sexualized language or imagery and unwelcome sexual attention or + advances +- Trolling, insulting/derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or electronic + address, without explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at TANNERLINSLEY@GMAIL.COM. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000..287de60920 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,53 @@ +--- +title: Contributing +id: contributing +--- + +# Contributing + +## Questions + +If you have questions about implementation details, help or support, then please use our dedicated community forum at [Github Discussions](https://github.com/tanstack/table/discussions) **PLEASE NOTE:** If you choose to instead open an issue for your question, your issue will be immediately closed and redirected to the forum. + +## Reporting Issues + +If you have found what you think is a bug, please [file an issue](https://github.com/tanstack/table/issues/new). **PLEASE NOTE:** Issues that are identified as implementation questions or non-issues will be immediately closed and redirected to [Github Discussions](https://github.com/tanstack/table/discussions) + +## Suggesting new features + +If you are here to suggest a feature, first create an issue if it does not already exist. From there, we will discuss use-cases for the feature and then finally discuss how it could be implemented. + +## Development + +Before proceeding with development, ensure you match one of the following criteria: + +- Fixing a small bug +- Fixing a larger issue that has been previously discussed and agreed-upon by maintainers +- Adding a new feature that has been previously discussed and agreed-upon by maintainers + +## Development Workflow + +- Fork this repository, we prefer the `feat-*` branch name style +- Ensure you have `pnpm` installed +- Install projects dependencies and linkages by running `pnpm install` +- Auto-build and auto-test files as you edit by running `pnpm dev` +- Implement your changes and tests +- To run examples, follow their individual directions. Usually this includes: + - cd into the example directory + - Do NOT install dependencies again or do any linking. Nx already handles this for you. Only run install from the project root. + - Starting the dev server with `pnpm dev` or `pnpm start` (from the example directory) +- To test in your own projects: + - Build/watch for changes with `pnpm build`/`pnpm dev` +- Document your changes in the appropriate documentation website markdown pages +- Commit your work and open a pull request +- Submit PR for review + +## Adding a new example + +- Clone an existing example into the appropriate `examples` directory +- Name it the example name in kebab-case +- Update the new example's package.json to match the new example name and any other details +- Check dependencies for unused packages +- Install any additional packages to the example that you may need +- Update the docs/config.json file to include the new example in the navigation sidebar +- Commit the example eg. `docs: Add example-name` diff --git a/README.md b/README.md index e64ec14836..4490fe2758 100644 --- a/README.md +++ b/README.md @@ -1,410 +1,117 @@
- React Table Logo -
-
- + TanStack Table
-# React Table -`react-table` is a **lightweight, fast and extendable datagrid** built for React - +
- - - - - - - - +
+ + npm downloads - - + + github stars - - + + bundle size +
-## Features - -- Lightweight at 7kb (and just 2kb more for styles) -- Fully customizable JSX templating -- Supports both Client-side & Server-side pagination and multi-sorting -- Column Pivoting & Aggregation -- Minimal design & easily themeable -- Fully controllable via optional props and callbacks -- "Why I wrote React Table and the problems it has solved for Nozzle.io by Tanner Linsley - -## Demo - -## Table of Contents -- [Installation](#installation) -- [Example](#example) -- [Data](#data) -- [Props](#props) -- [Columns](#columns) -- [Styles](#styles) -- [Header Groups](#header-groups) -- [Pivoting & Aggregation](#pivoting--aggregation) -- [Sub Tables & Sub Components](#sub-tables--sub-components) -- [Server-side Data](#server-side-data) -- [Fully Controlled Component](#fully-controlled-component) -- [Multi-sort](#multi-sort) -- [Component Overrides](#component-overrides) - -## Installation -```bash -$ npm install react-table -``` - -## Example -```javascript -import ReactTable from 'react-table' - -const data = [{ - name: 'Tanner Linsley', - age: 26, - friend: { - name: 'Jason Maurer', - age: 23, - } -},{ - ... -}] - -const columns = [{ - header: 'Name', - accessor: 'name' // String-based value accessors ! -}, { - header: 'Age', - accessor: 'age', - render: props => props.value // Custom cell components! -}, { - header: 'Friend Name', - accessor: d => d.friend.name // Custom value accessors! -}, { - header: props => Friend Age, // Custom header components! - accessor: 'friend.age' -}] - - -``` - -## Data -Simply pass the `data` prop anything that resembles an array or object. Client-side sorting and pagination are built in, and your table will update gracefully as you change any props. [Server-side data](#server-side-data) is also supported! - - -## Props -These are all of the available props (and their default values) for the main `` component. -```javascript -{ - // General - loading: false, // Whether to show the loading overlay or not - defaultPageSize: 20, // The default page size (this can be changed by the user if `showPageSizeOptions` is enabled) - minRows: 0, // Ensure this many rows are always rendered, regardless of rows on page - showPagination: true, // Shows or hides the pagination component - showPageJump: true, // Shows or hides the pagination number input - showPageSizeOptions: true, // Enables the user to change the page size - pageSizeOptions: [5, 10, 20, 25, 50, 100], // The available page size options - expanderColumnWidth: 30, // default columnWidth for the expander column - - // Callbacks - onChange: (state, instance) => null, // Anytime the internal state of the table changes, this will fire - onTrClick: (row, event) => null, // Handler for row click events - - // Text - previousText: 'Previous', - nextText: 'Next', - pageText: 'Page', - ofText: 'of', - rowsText: 'rows', - - // Classes - className: '-striped -highlight', // The most top level className for the component - tableClassName: '', // ClassName for the `table` element - theadClassName: '', // ClassName for the `thead` element - tbodyClassName: '', // ClassName for the `tbody` element - trClassName: '', // ClassName for all `tr` elements - trClassCallback: row => null, // A call back to dynamically add classes (via the classnames module) to a row element - paginationClassName: '' // ClassName for `pagination` element - - // Styles - style: {}, // Main style object for the component - tableStyle: {}, // style object for the `table` component - theadStyle: {}, // style object for the `thead` component - tbodyStyle: {}, // style object for the `tbody` component - trStyle: {}, // style object for the `tr` component - trStyleCallback: row => {}, // A call back to dynamically add styles to a row element - thStyle: {}, // style object for the `th` component - tdStyle: {}, // style object for the `td` component - paginationStyle: {}, // style object for the `paginination` component - - // Controlled Props (see Using as a Fully Controlled Component below) - page: undefined, - pageSize: undefined, - sorting: undefined, - expandedRows: undefined, - // Controlled Callbacks - onExpandRow: undefined, - onPageChange: undefined, - onPageSizeChange: undefined, -} -``` - -You can easily override the core defaults like so: - -```javascript -import { ReactTableDefaults } from 'react-table' - -Object.assign(ReactTableDefaults, { - defaultPageSize: 10, - minRows: 3, - // etc... -}) -``` - -Or just define them on the component per-instance - -```javascript - -``` - -## Columns -`` requires a `columns` prop, which is an array of objects containing the following properties - -```javascript -[{ - // General - accessor: 'propertyName' or Accessor eg. (row) => row.propertyName, - id: 'myProperty', // Conditional - A unique ID is required if the accessor is not a string or if you would like to override the column name used in server-side calls - sortable: true, - sort: 'asc' or 'desc', // used to determine the column sorting on init - show: true, // can be used to hide a column - minWidth: 100 // A minimum width for this column. If there is room, columns will flex to fill available space - - // Cell Options - className: '', // Set the classname of the `td` element of the column - style: {}, // Set the style of the `td` element of the column - render: JSX eg. ({value, rowValues, row, index, viewIndex}) => {value}, // Provide a JSX element or stateless function to render whatever you want as the column's cell with access to the entire row - // value == the accessed value of the column - // rowValues == an object of all of the accessed values for the row - // row == the original row of data supplied to the table - // index == the original index of the data supplied to the table - // viewIndex == the index of the row in the current page - - // Header & HeaderGroup Options - header: 'Header Name' or JSX eg. ({data, column}) =>
Header Name
, - headerClassName: '', // Set the classname of the `th` element of the column - headerStyle: {}, // Set the style of the `th` element of the column - - // Header Groups only - columns: [...] // See Header Groups section below - -}] -``` - -## Styles -React-table is built to be dropped into existing applications or styled from the ground up, but if you'd like a decent starting point, you can optionally include our default theme `react-table.css`. We think it looks great, honestly :) - -## Header Groups -To group columns with another header column, just nest your columns in a header column like so: -```javascript -const columns = [{ - header: 'Favorites', - columns: [{ - header: 'Color', - accessor: 'favorites.color' - }, { - header: 'Food', - accessor: 'favorites.food' - } { - header: 'Actor', - accessor: 'favorites.actor' - }] -}] -``` - -## Pivoting & Aggregation -Pivoting the table will group records together based on their accessed values and allow the rows in that group to be expanded underneath it. -To pivot, pass an array of `columnID`'s to `pivotBy`. Remember, a column's `id` is either the one that you assign it (when using a custom accessors) or its `accessor` string. -```javascript - -``` - -Naturally when grouping rows together, you may want to aggregate the rows inside it into the grouped column. No aggregation is done by default, however, it is very simple to aggregate any pivoted columns: -```javascript -// In this example, we use lodash to sum and average the values, but you can use whatever you want to aggregate. -const columns = [{ - header: 'Age', - accessor: 'age', - aggregate: (values, rows) => _.round(_.mean(values)), - render: row => { - // You can even render the cell differently if it's an aggregated cell - return {row.aggregated ? `${row.value} (avg)` : row.value} - } -}, { - header: 'Visits', - accessor: 'visits', - aggregate: (values, rows) => _.sum(values) -}] -``` - -Pivoted columns can be sorted just like regular columns, but not independently of each other. For instance, if you click to sort the pivot column in ascending order, it will sort by each pivot recursively in ascending order together. - -## Sub Tables & Sub Components -By adding a `SubComponent` props, you can easily add an expansion level to all root-level rows: -```javascript - { - return ( -
- You can put any component you want here, even another React Table! You even have access to the row-level data if you need! Spark-charts, drill-throughs, infographics... the possibilities are endless! -
- ) - }} -/> -``` - - -## Server-side Data -If you want to handle pagination, and sorting on the server, `react-table` makes it easy on you. - -1. Feed React Table `data` from somewhere dynamic. eg. `state`, a redux store, etc... -1. Add `manual` as a prop. This informs React Table that you'll be handling sorting and pagination server-side -1. Subscribe to the `onChange` prop. This function is called at `compomentDidMount` and any time sorting or pagination is changed by the user -1. In the `onChange` callback, request your data using the provided information in the params of the function (state and instance) -1. Update your data with the rows to be displayed -1. Optionally set how many pages there are total - -```javascript - { - // show the loading overlay - this.setState({loading: true}) - // fetch your data - Axios.post('mysite.com/data', { - page: state.page, - pageSize: state.pageSize, - sorting: state.sorting - }) - .then((res) => { - // Update react-table - this.setState({ - data: res.data.rows, - pages: res.data.pages, - loading: false - }) - }) - }} -/> -``` - -For a detailed example, take a peek at our async table mockup - -## Fully Controlled Component -React Table by default works fantastically out of the box, but you can achieve even more control and customization if you choose to maintain the state yourself. It is very easy to do, even if you only want to manage *parts* of the state. - -Here are the props and their corresponding callbacks that control the state of the a table: -```javascript - {...}} // Called when the page index is changed by the user - onPageSizeChange={(pageSize, pageIndex) => {...}} // Called when the pageSize is changed by the user. The resolve page is also sent to maintain approximate position in the data - onSortingChange={(column, shiftKey) => {...}} // Called when a sortable column header is clicked with the column itself and if the shiftkey was held. If the column is a pivoted column, `column` will be an array of columns - onExpandRow={(index, event) => {...}} // Called when an expander is clicked. Use this to manage `expandedRows` -/> -``` - -## Multi-Sort -When clicking on a column header, hold shift to multi-sort! You can toggle `ascending` `descending` and `none` for multi-sort columns. Clicking on a header without holding shift will clear the multi-sort and replace it with the single sort of that column. It's quite handy! - -## Component Overrides -Though we confidently stand by the markup and architecture behind it, `react-table` does offer the ability to change the core componentry it uses to render everything. You can extend or override these internal components by passing a react component to it's corresponding prop on either the global props or on a one-off basis like so: -```javascript -// Change the global default -import { ReactTableDefaults } from 'react-table' -Object.assign(ReactTableDefaults, { - TableComponent: Component, - TheadComponent: Component, - TbodyComponent: Component, - TrGroupComponent: Component, - TrComponent: Component, - ThComponent: Component, - TdComponent: Component, - PaginationComponent: Component, - PreviousComponent: Component, - NextComponent: Component, - LoadingComponent: Component, - ExpanderComponent: Component -}) - -// Or change per instance - -``` +
+ + semantic-release + +Best of JS + Follow @TanStack +
-If you choose to change the core components React-Table uses to render, you must make sure your replacement components consume and utilize all of the supplied and inherited props that are needed for that component to function properly. We would suggest investigating the source for the component you wish to replace. +### [Become a Sponsor!](https://github.com/sponsors/tannerlinsley/) + -## Contributing -To suggest a feature, create an issue if it does not already exist. -If you would like to help develop a suggested feature follow these steps: +# TanStack Table + +> [!NOTE] +> You may know TanStack Table by the adapter names: +> +> - [Angular Table](https://tanstack.com/table/alpha/docs/framework/angular/angular-table) +> - [Lit Table](https://tanstack.com/table/alpha/docs/framework/lit/lit-table) +> - [React Table](https://tanstack.com/table/alpha/docs/framework/react/react-table) +> - [Solid Table](https://tanstack.com/table/alpha/docs/framework/solid/solid-table) +> - [Svelte Table](https://tanstack.com/table/alpha/docs/framework/svelte/svelte-table) +> - [Vue Table](https://tanstack.com/table/alpha/docs/framework/vue/vue-table) + +A headless table library for building powerful datagrids with full control over markup, styles, and behavior. + +- Framework‑agnostic core with bindings for React, Vue & Solid +- 100% customizable — bring your own UI, components, and styles +- Sorting, filtering, grouping, aggregation & row selection +- Lightweight, virtualizable & server‑side friendly + +### Read the Docs → + +## Get Involved + +- We welcome issues and pull requests! +- Participate in [GitHub discussions](https://github.com/TanStack/table/discussions) +- Chat with the community on [Discord](https://discord.com/invite/WrRKjPJ) +- See [CONTRIBUTING.md](./CONTRIBUTING.md) for setup instructions + +## Partners + + + + + + + +
+ + + + + CodeRabbit + + + + + + + + Cloudflare + + + + + + + + AG Grid + + +
-- Fork this repo -- `npm install` -- `npm run watch` -- Implement your changes to files in the `src/` directory -- Submit PR for review +
+Table & you? +

+We're looking for TanStack Table Partners to join our mission! Partner with us to push the boundaries of TanStack Table and build amazing things together. +

+LET'S CHAT +
-If you would like to preview your changes as you develop, you can link and utilize our React Storybook like so: +## Explore the TanStack Ecosystem -- `npm install` -- `run storybook` (or run them in separate tabs) -- Make changes to stories in `/stories`, or create a new one if needed -- View changes at `localhost:8000` +- TanStack Config – Tooling for JS/TS packages +- TanStack DB – Reactive sync client store +- TanStack DevTools – Unified devtools panel +- TanStack Form – Type‑safe form state +- TanStack Pacer – Debouncing, throttling, batching
+- TanStack Query – Async state & caching +- TanStack Ranger – Range & slider primitives +- TanStack Router – Type‑safe routing, caching & URL state +- TanStack Start – Full‑stack SSR & streaming +- TanStack Store – Reactive data store +- TanStack Virtual – Virtualized rendering -## Used By +… and more at TanStack.com » - - Nozzle Logo - + diff --git a/docs/config.json b/docs/config.json new file mode 100644 index 0000000000..3f534f5089 --- /dev/null +++ b/docs/config.json @@ -0,0 +1,1030 @@ +{ + "$schema": "https://raw.githubusercontent.com/TanStack/tanstack.com/main/tanstack-docs-config.schema.json", + "docSearch": { + "appId": "74SF5EKVW9", + "apiKey": "9fc015a3310be6669ed66c6c459f319f", + "indexName": "tanstack-table" + }, + "sections": [ + { + "label": "Getting Started", + "children": [ + { + "label": "Introduction", + "to": "introduction" + }, + { + "label": "Overview", + "to": "overview" + }, + { + "label": "Installation", + "to": "installation" + }, + { + "label": "FAQ", + "to": "faq" + } + ], + "frameworks": [ + { + "label": "angular", + "children": [ + { + "label": "Angular Table Adapter", + "to": "framework/angular/angular-table" + }, + { + "label": "Migrating to V9", + "to": "framework/angular/guide/migrating" + }, + { + "label": "Rendering components", + "to": "framework/angular/guide/rendering" + }, + { + "label": "Table composition", + "to": "framework/angular/guide/table-composition" + } + ] + }, + { + "label": "lit", + "children": [ + { + "label": "Lit Table Adapter", + "to": "framework/lit/lit-table" + } + ] + }, + { + "label": "react", + "children": [ + { + "label": "React Table Adapter", + "to": "framework/react/react-table" + }, + { + "label": "createTableHook Guide", + "to": "framework/react/guide/create-table-hook" + }, + { + "label": "Migrating to V9", + "to": "framework/react/guide/migrating" + }, + { + "label": "useLegacyTable Guide", + "to": "framework/react/guide/use-legacy-table" + } + ] + }, + { + "label": "preact", + "children": [ + { + "label": "createTableHook Guide", + "to": "framework/preact/guide/create-table-hook" + } + ] + }, + { + "label": "solid", + "children": [ + { + "label": "Solid Table Adapter", + "to": "framework/solid/solid-table" + } + ] + }, + { + "label": "svelte", + "children": [ + { + "label": "Svelte Table Adapter", + "to": "framework/svelte/svelte-table" + } + ] + }, + { + "label": "vue", + "children": [ + { + "label": "Vue Table Adapter", + "to": "framework/vue/vue-table" + } + ] + }, + { + "label": "vanilla", + "children": [ + { + "label": "Vanilla JS (No Framework)", + "to": "vanilla" + } + ] + } + ] + }, + { + "label": "Core Guides", + "children": [ + { + "label": "Data", + "to": "guide/data" + }, + { + "label": "Column Defs", + "to": "guide/column-defs" + }, + { + "label": "Table Instance", + "to": "guide/tables" + }, + { + "label": "Row Models", + "to": "guide/row-models" + }, + { + "label": "Rows", + "to": "guide/rows" + }, + { + "label": "Cells", + "to": "guide/cells" + }, + { + "label": "Header Groups", + "to": "guide/header-groups" + }, + { + "label": "Headers", + "to": "guide/headers" + }, + { + "label": "Columns", + "to": "guide/columns" + } + ], + "frameworks": [ + { + "label": "angular", + "children": [ + { + "label": "Table State", + "to": "framework/angular/guide/table-state" + } + ] + }, + { + "label": "lit", + "children": [ + { + "label": "Table State", + "to": "framework/lit/guide/table-state" + } + ] + }, + { + "label": "react", + "children": [ + { + "label": "Table State", + "to": "framework/react/guide/table-state" + } + ] + }, + { + "label": "solid", + "children": [ + { + "label": "Table State", + "to": "framework/solid/guide/table-state" + } + ] + }, + { + "label": "svelte", + "children": [ + { + "label": "Table State", + "to": "framework/svelte/guide/table-state" + } + ] + }, + { + "label": "vue", + "children": [ + { + "label": "Table State", + "to": "framework/vue/guide/table-state" + } + ] + }, + { + "label": "vanilla", + "children": [ + { + "label": "Table State", + "to": "framework/vanilla/guide/table-state" + } + ] + } + ] + }, + { + "label": "Feature Guides", + "children": [ + { + "label": "Column Ordering", + "to": "guide/column-ordering" + }, + { + "label": "Column Pinning", + "to": "guide/column-pinning" + }, + { + "label": "Column Sizing", + "to": "guide/column-sizing" + }, + { + "label": "Column Visibility", + "to": "guide/column-visibility" + }, + { + "label": "Column Filtering", + "to": "guide/column-filtering" + }, + { + "label": "Global Filtering", + "to": "guide/global-filtering" + }, + { + "label": "Fuzzy Filtering", + "to": "guide/fuzzy-filtering" + }, + { + "label": "Column Faceting", + "to": "guide/column-faceting" + }, + { + "label": "Global Faceting", + "to": "guide/global-faceting" + }, + { + "label": "Grouping", + "to": "guide/grouping" + }, + { + "label": "Expanding", + "to": "guide/expanding" + }, + { + "label": "Pagination", + "to": "guide/pagination" + }, + { + "label": "Row Pinning", + "to": "guide/row-pinning" + }, + { + "label": "Row Selection", + "to": "guide/row-selection" + }, + { + "label": "Sorting", + "to": "guide/sorting" + }, + { + "label": "Virtualization", + "to": "guide/virtualization" + }, + { + "label": "Custom Features", + "to": "guide/custom-features" + } + ] + }, + { + "label": "API Reference", + "children": [ + { + "label": "Core API Reference", + "to": "reference/index" + } + ], + "frameworks": [ + { + "label": "angular", + "children": [ + { + "label": "Angular API Reference", + "to": "framework/angular/reference/index" + } + ] + }, + { + "label": "react", + "children": [ + { + "label": "React API Reference", + "to": "framework/react/reference/index" + } + ] + } + ] + }, + { + "collapsible": true, + "defaultCollapsed": true, + "label": "Table API Reference", + "children": [ + { "label": "Table", "to": "reference/type-aliases/Table" }, + { "label": "Table_Core", "to": "reference/type-aliases/Table_Core" }, + { "label": "Table_CoreProperties", "to": "reference/interfaces/Table_CoreProperties" }, + { "label": "Table_Table", "to": "reference/interfaces/Table_Table" }, + { "label": "Table_Columns", "to": "reference/interfaces/Table_Columns" }, + { "label": "Table_Rows", "to": "reference/interfaces/Table_Rows" }, + { "label": "Table_Headers", "to": "reference/interfaces/Table_Headers" }, + { "label": "Table_Plugins", "to": "reference/interfaces/Table_Plugins" }, + { "label": "TableOptions", "to": "reference/type-aliases/TableOptions" }, + { "label": "TableOptions_All", "to": "reference/type-aliases/TableOptions_All" }, + { "label": "TableOptions_Core", "to": "reference/interfaces/TableOptions_Core" }, + { "label": "TableOptions_Table", "to": "reference/interfaces/TableOptions_Table" }, + { "label": "TableOptions_Columns", "to": "reference/interfaces/TableOptions_Columns" }, + { "label": "TableOptions_Rows", "to": "reference/interfaces/TableOptions_Rows" }, + { "label": "TableOptions_Cell", "to": "reference/interfaces/TableOptions_Cell" }, + { "label": "TableOptions_Plugins", "to": "reference/interfaces/TableOptions_Plugins" }, + { "label": "TableState", "to": "reference/type-aliases/TableState" }, + { "label": "TableState_All", "to": "reference/type-aliases/TableState_All" }, + { "label": "TableState_Plugins", "to": "reference/interfaces/TableState_Plugins" }, + { "label": "TableMeta", "to": "reference/interfaces/TableMeta" }, + { "label": "TableFeature", "to": "reference/interfaces/TableFeature" }, + { "label": "TableFeatures", "to": "reference/interfaces/TableFeatures" }, + { "label": "StockFeatures", "to": "reference/interfaces/StockFeatures" }, + { "label": "CoreFeatures", "to": "reference/interfaces/CoreFeatures" }, + { "label": "constructTable", "to": "reference/functions/constructTable" }, + { "label": "constructTableHelper", "to": "reference/functions/constructTableHelper" }, + { "label": "createTableStore", "to": "reference/functions/createTableStore" }, + { "label": "tableOptions", "to": "reference/functions/tableOptions" }, + { "label": "tableFeatures", "to": "reference/functions/tableFeatures" }, + { "label": "getInitialTableState", "to": "reference/functions/getInitialTableState" }, + { "label": "table_setOptions", "to": "reference/functions/table_setOptions" }, + { "label": "table_mergeOptions", "to": "reference/functions/table_mergeOptions" }, + { "label": "table_reset", "to": "reference/functions/table_reset" }, + { "label": "table_getRowModel", "to": "reference/functions/table_getRowModel" }, + { "label": "table_getRow", "to": "reference/functions/table_getRow" }, + { "label": "table_getRowCount", "to": "reference/functions/table_getRowCount" }, + { "label": "table_getRowId", "to": "reference/functions/table_getRowId" }, + { "label": "TableHelperOptions", "to": "reference/type-aliases/TableHelperOptions" }, + { "label": "TableHelper_Core", "to": "reference/type-aliases/TableHelper_Core" }, + { "label": "OnChangeFn", "to": "reference/type-aliases/OnChangeFn" }, + { "label": "Updater", "to": "reference/type-aliases/Updater" }, + { "label": "DebugOptions", "to": "reference/type-aliases/DebugOptions" } + ], + "frameworks": [ + { + "label": "react", + "children": [ + { "label": "useTable", "to": "framework/react/reference/index/functions/useTable" }, + { "label": "createTableHook", "to": "framework/react/reference/index/functions/createTableHook" }, + { "label": "ReactTable", "to": "framework/react/reference/index/type-aliases/ReactTable" }, + { "label": "AppReactTable", "to": "framework/react/reference/index/type-aliases/AppReactTable" }, + { "label": "CreateTableHookOptions", "to": "framework/react/reference/index/type-aliases/CreateTableHookOptions" }, + { "label": "Subscribe", "to": "framework/react/reference/index/functions/Subscribe" }, + { "label": "SubscribeProps", "to": "framework/react/reference/index/type-aliases/SubscribeProps" }, + { "label": "FlexRender", "to": "framework/react/reference/index/functions/FlexRender-1" }, + { "label": "flexRender", "to": "framework/react/reference/index/functions/flexRender" }, + { "label": "FlexRenderProps", "to": "framework/react/reference/index/type-aliases/FlexRenderProps" }, + { "label": "Renderable", "to": "framework/react/reference/index/type-aliases/Renderable" }, + { "label": "AppTableComponent", "to": "framework/react/reference/index/interfaces/AppTableComponent" }, + { "label": "AppTablePropsWithSelector", "to": "framework/react/reference/index/interfaces/AppTablePropsWithSelector" }, + { "label": "AppTablePropsWithoutSelector", "to": "framework/react/reference/index/interfaces/AppTablePropsWithoutSelector" } + ] + }, + { + "label": "angular", + "children": [ + { "label": "injectTable", "to": "framework/angular/reference/functions/injectTable" }, + { "label": "createTableHook", "to": "framework/angular/reference/functions/createTableHook" }, + { "label": "AngularTable", "to": "framework/angular/reference/type-aliases/AngularTable" }, + { "label": "AppAngularTable", "to": "framework/angular/reference/type-aliases/AppAngularTable" }, + { "label": "CreateTableHookResult", "to": "framework/angular/reference/type-aliases/CreateTableHookResult" }, + { "label": "CreateTableContextOptions", "to": "framework/angular/reference/type-aliases/CreateTableContextOptions" }, + { "label": "flexRenderComponent", "to": "framework/angular/reference/functions/flexRenderComponent" }, + { "label": "FlexRenderComponent", "to": "framework/angular/reference/interfaces/FlexRenderComponent" }, + { "label": "FlexRenderContent", "to": "framework/angular/reference/type-aliases/FlexRenderContent" }, + { "label": "FlexRenderInputContent", "to": "framework/angular/reference/type-aliases/FlexRenderInputContent" }, + { "label": "FlexRenderComponentProps", "to": "framework/angular/reference/type-aliases/FlexRenderComponentProps" }, + { "label": "FlexRender", "to": "framework/angular/reference/variables/FlexRender" }, + { "label": "FlexRenderDirective", "to": "framework/angular/reference/classes/FlexRenderDirective" }, + { "label": "FlexRenderCell", "to": "framework/angular/reference/classes/FlexRenderCell" }, + { "label": "TanStackTable", "to": "framework/angular/reference/classes/TanStackTable" }, + { "label": "TanStackTableToken", "to": "framework/angular/reference/variables/TanStackTableToken" }, + { "label": "injectTableContext", "to": "framework/angular/reference/functions/injectTableContext" }, + { "label": "AngularReactivityFlags", "to": "framework/angular/reference/interfaces/AngularReactivityFlags" } + ] + } + ] + }, + { + "collapsible": true, + "defaultCollapsed": true, + "label": "Column API Reference", + "children": [ + { "label": "Column", "to": "reference/type-aliases/Column" }, + { "label": "Column_Core", "to": "reference/interfaces/Column_Core" }, + { "label": "Column_CoreProperties", "to": "reference/interfaces/Column_CoreProperties" }, + { "label": "Column_Column", "to": "reference/interfaces/Column_Column" }, + { "label": "Column_Plugins", "to": "reference/interfaces/Column_Plugins" }, + { "label": "ColumnDef", "to": "reference/type-aliases/ColumnDef" }, + { "label": "ColumnDefBase", "to": "reference/type-aliases/ColumnDefBase" }, + { "label": "AccessorColumnDef", "to": "reference/type-aliases/AccessorColumnDef" }, + { "label": "DisplayColumnDef", "to": "reference/type-aliases/DisplayColumnDef" }, + { "label": "GroupColumnDef", "to": "reference/type-aliases/GroupColumnDef" }, + { "label": "ColumnDefTemplate", "to": "reference/type-aliases/ColumnDefTemplate" }, + { "label": "ColumnHelper", "to": "reference/type-aliases/ColumnHelper" }, + { "label": "ColumnDefaultOptions", "to": "reference/interfaces/ColumnDefaultOptions" }, + { "label": "ColumnMeta", "to": "reference/interfaces/ColumnMeta" }, + { "label": "createColumnHelper", "to": "reference/functions/createColumnHelper" }, + { "label": "constructColumn", "to": "reference/functions/constructColumn" }, + { "label": "column_getFlatColumns", "to": "reference/functions/column_getFlatColumns" }, + { "label": "column_getLeafColumns", "to": "reference/functions/column_getLeafColumns" }, + { "label": "column_getIndex", "to": "reference/functions/column_getIndex" }, + { "label": "column_getIsFirstColumn", "to": "reference/functions/column_getIsFirstColumn" }, + { "label": "column_getIsLastColumn", "to": "reference/functions/column_getIsLastColumn" }, + { "label": "column_getSize", "to": "reference/functions/column_getSize" }, + { "label": "column_getStart", "to": "reference/functions/column_getStart" }, + { "label": "column_getAfter", "to": "reference/functions/column_getAfter" }, + { "label": "AccessorFn", "to": "reference/type-aliases/AccessorFn" }, + { "label": "DeepKeys", "to": "reference/type-aliases/DeepKeys" }, + { "label": "DeepValue", "to": "reference/type-aliases/DeepValue" } + ], + "frameworks": [ + { + "label": "react", + "children": [ + { "label": "AppColumnHelper", "to": "framework/react/reference/index/type-aliases/AppColumnHelper" } + ] + }, + { + "label": "angular", + "children": [ + { "label": "AppColumnHelper", "to": "framework/angular/reference/type-aliases/AppColumnHelper" } + ] + } + ] + }, + { + "collapsible": true, + "defaultCollapsed": true, + "label": "Row API Reference", + "children": [ + { "label": "Row", "to": "reference/type-aliases/Row" }, + { "label": "Row_Core", "to": "reference/interfaces/Row_Core" }, + { "label": "Row_CoreProperties", "to": "reference/interfaces/Row_CoreProperties" }, + { "label": "Row_Row", "to": "reference/interfaces/Row_Row" }, + { "label": "Row_Plugins", "to": "reference/interfaces/Row_Plugins" }, + { "label": "RowData", "to": "reference/type-aliases/RowData" }, + { "label": "RowModel", "to": "reference/interfaces/RowModel" }, + { "label": "constructRow", "to": "reference/functions/constructRow" }, + { "label": "row_getValue", "to": "reference/functions/row_getValue" }, + { "label": "row_getUniqueValues", "to": "reference/functions/row_getUniqueValues" }, + { "label": "row_renderValue", "to": "reference/functions/row_renderValue" }, + { "label": "row_getAllCells", "to": "reference/functions/row_getAllCells" }, + { "label": "row_getAllCellsByColumnId", "to": "reference/functions/row_getAllCellsByColumnId" }, + { "label": "row_getVisibleCells", "to": "reference/functions/row_getVisibleCells" }, + { "label": "row_getLeftVisibleCells", "to": "reference/functions/row_getLeftVisibleCells" }, + { "label": "row_getCenterVisibleCells", "to": "reference/functions/row_getCenterVisibleCells" }, + { "label": "row_getRightVisibleCells", "to": "reference/functions/row_getRightVisibleCells" }, + { "label": "row_getAllVisibleCells", "to": "reference/functions/row_getAllVisibleCells" }, + { "label": "row_getLeafRows", "to": "reference/functions/row_getLeafRows" }, + { "label": "row_getParentRow", "to": "reference/functions/row_getParentRow" }, + { "label": "row_getParentRows", "to": "reference/functions/row_getParentRows" }, + { "label": "RowModelFns", "to": "reference/type-aliases/RowModelFns" }, + { "label": "RowModelFns_Core", "to": "reference/interfaces/RowModelFns_Core" }, + { "label": "RowModelFns_Plugins", "to": "reference/interfaces/RowModelFns_Plugins" }, + { "label": "createCoreRowModel", "to": "reference/functions/createCoreRowModel" }, + { "label": "createFilteredRowModel", "to": "reference/functions/createFilteredRowModel" }, + { "label": "createSortedRowModel", "to": "reference/functions/createSortedRowModel" }, + { "label": "createGroupedRowModel", "to": "reference/functions/createGroupedRowModel" }, + { "label": "createExpandedRowModel", "to": "reference/functions/createExpandedRowModel" }, + { "label": "createPaginatedRowModel", "to": "reference/functions/createPaginatedRowModel" }, + { "label": "createFacetedRowModel", "to": "reference/functions/createFacetedRowModel" }, + { "label": "createFacetedMinMaxValues", "to": "reference/functions/createFacetedMinMaxValues" }, + { "label": "createFacetedUniqueValues", "to": "reference/functions/createFacetedUniqueValues" }, + { "label": "Table_RowModels_Core", "to": "reference/interfaces/Table_RowModels_Core" }, + { "label": "Table_RowModels_Filtered", "to": "reference/interfaces/Table_RowModels_Filtered" }, + { "label": "Table_RowModels_Sorted", "to": "reference/interfaces/Table_RowModels_Sorted" }, + { "label": "Table_RowModels_Grouped", "to": "reference/interfaces/Table_RowModels_Grouped" }, + { "label": "Table_RowModels_Expanded", "to": "reference/interfaces/Table_RowModels_Expanded" }, + { "label": "Table_RowModels_Paginated", "to": "reference/interfaces/Table_RowModels_Paginated" }, + { "label": "Table_RowModels_Faceted", "to": "reference/interfaces/Table_RowModels_Faceted" } + ] + }, + { + "collapsible": true, + "defaultCollapsed": true, + "label": "Cell API Reference", + "children": [ + { "label": "Cell", "to": "reference/type-aliases/Cell" }, + { "label": "Cell_Core", "to": "reference/interfaces/Cell_Core" }, + { "label": "Cell_CoreProperties", "to": "reference/interfaces/Cell_CoreProperties" }, + { "label": "Cell_Cell", "to": "reference/interfaces/Cell_Cell" }, + { "label": "Cell_ColumnGrouping", "to": "reference/interfaces/Cell_ColumnGrouping" }, + { "label": "Cell_Plugins", "to": "reference/interfaces/Cell_Plugins" }, + { "label": "CellContext", "to": "reference/interfaces/CellContext" }, + { "label": "CellData", "to": "reference/type-aliases/CellData" }, + { "label": "constructCell", "to": "reference/functions/constructCell" }, + { "label": "cell_getContext", "to": "reference/functions/cell_getContext" }, + { "label": "cell_getValue", "to": "reference/functions/cell_getValue" }, + { "label": "cell_renderValue", "to": "reference/functions/cell_renderValue" }, + { "label": "cell_getIsGrouped", "to": "reference/functions/cell_getIsGrouped" }, + { "label": "cell_getIsPlaceholder", "to": "reference/functions/cell_getIsPlaceholder" }, + { "label": "cell_getIsAggregated", "to": "reference/functions/cell_getIsAggregated" } + ], + "frameworks": [ + { + "label": "react", + "children": [ + { "label": "AppCellContext", "to": "framework/react/reference/index/type-aliases/AppCellContext" }, + { "label": "AppCellComponent", "to": "framework/react/reference/index/interfaces/AppCellComponent" }, + { "label": "AppCellPropsWithSelector", "to": "framework/react/reference/index/interfaces/AppCellPropsWithSelector" }, + { "label": "AppCellPropsWithoutSelector", "to": "framework/react/reference/index/interfaces/AppCellPropsWithoutSelector" } + ] + }, + { + "label": "angular", + "children": [ + { "label": "AppCellContext", "to": "framework/angular/reference/type-aliases/AppCellContext" }, + { "label": "TanStackTableCell", "to": "framework/angular/reference/classes/TanStackTableCell" }, + { "label": "TanStackTableCellToken", "to": "framework/angular/reference/variables/TanStackTableCellToken" }, + { "label": "TanStackTableCellContext", "to": "framework/angular/reference/interfaces/TanStackTableCellContext" }, + { "label": "injectTableCellContext", "to": "framework/angular/reference/functions/injectTableCellContext" } + ] + } + ] + }, + { + "collapsible": true, + "defaultCollapsed": true, + "label": "Header API Reference", + "children": [ + { "label": "Header", "to": "reference/type-aliases/Header" }, + { "label": "Header_Core", "to": "reference/interfaces/Header_Core" }, + { "label": "Header_CoreProperties", "to": "reference/interfaces/Header_CoreProperties" }, + { "label": "Header_Header", "to": "reference/interfaces/Header_Header" }, + { "label": "Header_Plugins", "to": "reference/interfaces/Header_Plugins" }, + { "label": "HeaderGroup", "to": "reference/type-aliases/HeaderGroup" }, + { "label": "HeaderGroup_Core", "to": "reference/interfaces/HeaderGroup_Core" }, + { "label": "HeaderGroup_Header", "to": "reference/interfaces/HeaderGroup_Header" }, + { "label": "HeaderGroup_Plugins", "to": "reference/interfaces/HeaderGroup_Plugins" }, + { "label": "HeaderContext", "to": "reference/interfaces/HeaderContext" }, + { "label": "constructHeader", "to": "reference/functions/constructHeader" }, + { "label": "buildHeaderGroups", "to": "reference/functions/buildHeaderGroups" }, + { "label": "header_getContext", "to": "reference/functions/header_getContext" }, + { "label": "header_getLeafHeaders", "to": "reference/functions/header_getLeafHeaders" }, + { "label": "header_getSize", "to": "reference/functions/header_getSize" }, + { "label": "header_getStart", "to": "reference/functions/header_getStart" }, + { "label": "header_getResizeHandler", "to": "reference/functions/header_getResizeHandler" }, + { "label": "table_getHeaderGroups", "to": "reference/functions/table_getHeaderGroups" }, + { "label": "table_getLeftHeaderGroups", "to": "reference/functions/table_getLeftHeaderGroups" }, + { "label": "table_getCenterHeaderGroups", "to": "reference/functions/table_getCenterHeaderGroups" }, + { "label": "table_getRightHeaderGroups", "to": "reference/functions/table_getRightHeaderGroups" }, + { "label": "table_getFooterGroups", "to": "reference/functions/table_getFooterGroups" }, + { "label": "table_getLeftFooterGroups", "to": "reference/functions/table_getLeftFooterGroups" }, + { "label": "table_getCenterFooterGroups", "to": "reference/functions/table_getCenterFooterGroups" }, + { "label": "table_getRightFooterGroups", "to": "reference/functions/table_getRightFooterGroups" }, + { "label": "table_getFlatHeaders", "to": "reference/functions/table_getFlatHeaders" }, + { "label": "table_getLeftFlatHeaders", "to": "reference/functions/table_getLeftFlatHeaders" }, + { "label": "table_getCenterFlatHeaders", "to": "reference/functions/table_getCenterFlatHeaders" }, + { "label": "table_getRightFlatHeaders", "to": "reference/functions/table_getRightFlatHeaders" }, + { "label": "table_getLeafHeaders", "to": "reference/functions/table_getLeafHeaders" }, + { "label": "table_getLeftLeafHeaders", "to": "reference/functions/table_getLeftLeafHeaders" }, + { "label": "table_getCenterLeafHeaders", "to": "reference/functions/table_getCenterLeafHeaders" }, + { "label": "table_getRightLeafHeaders", "to": "reference/functions/table_getRightLeafHeaders" } + ], + "frameworks": [ + { + "label": "react", + "children": [ + { "label": "AppHeaderContext", "to": "framework/react/reference/index/type-aliases/AppHeaderContext" }, + { "label": "AppHeaderComponent", "to": "framework/react/reference/index/interfaces/AppHeaderComponent" }, + { "label": "AppHeaderPropsWithSelector", "to": "framework/react/reference/index/interfaces/AppHeaderPropsWithSelector" }, + { "label": "AppHeaderPropsWithoutSelector", "to": "framework/react/reference/index/interfaces/AppHeaderPropsWithoutSelector" } + ] + }, + { + "label": "angular", + "children": [ + { "label": "AppHeaderContext", "to": "framework/angular/reference/type-aliases/AppHeaderContext" }, + { "label": "TanStackTableHeader", "to": "framework/angular/reference/classes/TanStackTableHeader" }, + { "label": "TanStackTableHeaderToken", "to": "framework/angular/reference/variables/TanStackTableHeaderToken" }, + { "label": "TanStackTableHeaderContext", "to": "framework/angular/reference/interfaces/TanStackTableHeaderContext" }, + { "label": "injectTableHeaderContext", "to": "framework/angular/reference/functions/injectTableHeaderContext" }, + { "label": "injectFlexRenderContext", "to": "framework/angular/reference/functions/injectFlexRenderContext" } + ] + } + ] + }, + { + "collapsible": true, + "defaultCollapsed": true, + "label": "Features API Reference", + "children": [ + { "label": "stockFeatures", "to": "reference/variables/stockFeatures" }, + { "label": "coreFeatures", "to": "reference/variables/coreFeatures" }, + { "label": "coreCellsFeature", "to": "reference/variables/coreCellsFeature" }, + { "label": "coreColumnsFeature", "to": "reference/variables/coreColumnsFeature" }, + { "label": "coreHeadersFeature", "to": "reference/variables/coreHeadersFeature" }, + { "label": "coreRowModelsFeature", "to": "reference/variables/coreRowModelsFeature" }, + { "label": "coreRowsFeature", "to": "reference/variables/coreRowsFeature" }, + { "label": "coreTablesFeature", "to": "reference/variables/coreTablesFeature" }, + { "label": "columnFilteringFeature", "to": "reference/variables/columnFilteringFeature" }, + { "label": "columnFacetingFeature", "to": "reference/variables/columnFacetingFeature" }, + { "label": "columnGroupingFeature", "to": "reference/variables/columnGroupingFeature" }, + { "label": "columnOrderingFeature", "to": "reference/variables/columnOrderingFeature" }, + { "label": "columnPinningFeature", "to": "reference/variables/columnPinningFeature" }, + { "label": "columnResizingFeature", "to": "reference/variables/columnResizingFeature" }, + { "label": "columnSizingFeature", "to": "reference/variables/columnSizingFeature" }, + { "label": "columnVisibilityFeature", "to": "reference/variables/columnVisibilityFeature" }, + { "label": "globalFilteringFeature", "to": "reference/variables/globalFilteringFeature" }, + { "label": "rowExpandingFeature", "to": "reference/variables/rowExpandingFeature" }, + { "label": "rowPaginationFeature", "to": "reference/variables/rowPaginationFeature" }, + { "label": "rowPinningFeature", "to": "reference/variables/rowPinningFeature" }, + { "label": "rowSelectionFeature", "to": "reference/variables/rowSelectionFeature" }, + { "label": "rowSortingFeature", "to": "reference/variables/rowSortingFeature" }, + { "label": "Column_ColumnFiltering", "to": "reference/interfaces/Column_ColumnFiltering" }, + { "label": "Column_ColumnFaceting", "to": "reference/interfaces/Column_ColumnFaceting" }, + { "label": "Column_ColumnGrouping", "to": "reference/interfaces/Column_ColumnGrouping" }, + { "label": "Column_ColumnOrdering", "to": "reference/interfaces/Column_ColumnOrdering" }, + { "label": "Column_ColumnPinning", "to": "reference/interfaces/Column_ColumnPinning" }, + { "label": "Column_ColumnResizing", "to": "reference/interfaces/Column_ColumnResizing" }, + { "label": "Column_ColumnSizing", "to": "reference/interfaces/Column_ColumnSizing" }, + { "label": "Column_ColumnVisibility", "to": "reference/interfaces/Column_ColumnVisibility" }, + { "label": "Column_GlobalFiltering", "to": "reference/interfaces/Column_GlobalFiltering" }, + { "label": "Column_RowSorting", "to": "reference/interfaces/Column_RowSorting" }, + { "label": "Table_ColumnFiltering", "to": "reference/interfaces/Table_ColumnFiltering" }, + { "label": "Table_ColumnFaceting", "to": "reference/interfaces/Table_ColumnFaceting" }, + { "label": "Table_ColumnGrouping", "to": "reference/interfaces/Table_ColumnGrouping" }, + { "label": "Table_ColumnOrdering", "to": "reference/interfaces/Table_ColumnOrdering" }, + { "label": "Table_ColumnPinning", "to": "reference/interfaces/Table_ColumnPinning" }, + { "label": "Table_ColumnResizing", "to": "reference/interfaces/Table_ColumnResizing" }, + { "label": "Table_ColumnSizing", "to": "reference/interfaces/Table_ColumnSizing" }, + { "label": "Table_ColumnVisibility", "to": "reference/interfaces/Table_ColumnVisibility" }, + { "label": "Table_GlobalFiltering", "to": "reference/interfaces/Table_GlobalFiltering" }, + { "label": "Table_RowExpanding", "to": "reference/interfaces/Table_RowExpanding" }, + { "label": "Table_RowPagination", "to": "reference/interfaces/Table_RowPagination" }, + { "label": "Table_RowPinning", "to": "reference/interfaces/Table_RowPinning" }, + { "label": "Table_RowSelection", "to": "reference/interfaces/Table_RowSelection" }, + { "label": "Table_RowSorting", "to": "reference/interfaces/Table_RowSorting" }, + { "label": "Row_ColumnFiltering", "to": "reference/interfaces/Row_ColumnFiltering" }, + { "label": "Row_ColumnGrouping", "to": "reference/interfaces/Row_ColumnGrouping" }, + { "label": "Row_ColumnPinning", "to": "reference/interfaces/Row_ColumnPinning" }, + { "label": "Row_ColumnVisibility", "to": "reference/interfaces/Row_ColumnVisibility" }, + { "label": "Row_RowExpanding", "to": "reference/interfaces/Row_RowExpanding" }, + { "label": "Row_RowPinning", "to": "reference/interfaces/Row_RowPinning" }, + { "label": "Row_RowSelection", "to": "reference/interfaces/Row_RowSelection" }, + { "label": "Header_ColumnResizing", "to": "reference/interfaces/Header_ColumnResizing" }, + { "label": "Header_ColumnSizing", "to": "reference/interfaces/Header_ColumnSizing" }, + { "label": "TableOptions_ColumnFiltering", "to": "reference/interfaces/TableOptions_ColumnFiltering" }, + { "label": "TableOptions_ColumnGrouping", "to": "reference/interfaces/TableOptions_ColumnGrouping" }, + { "label": "TableOptions_ColumnOrdering", "to": "reference/interfaces/TableOptions_ColumnOrdering" }, + { "label": "TableOptions_ColumnPinning", "to": "reference/interfaces/TableOptions_ColumnPinning" }, + { "label": "TableOptions_ColumnResizing", "to": "reference/interfaces/TableOptions_ColumnResizing" }, + { "label": "TableOptions_ColumnSizing", "to": "reference/interfaces/TableOptions_ColumnSizing" }, + { "label": "TableOptions_ColumnVisibility", "to": "reference/interfaces/TableOptions_ColumnVisibility" }, + { "label": "TableOptions_GlobalFiltering", "to": "reference/interfaces/TableOptions_GlobalFiltering" }, + { "label": "TableOptions_RowExpanding", "to": "reference/interfaces/TableOptions_RowExpanding" }, + { "label": "TableOptions_RowPagination", "to": "reference/interfaces/TableOptions_RowPagination" }, + { "label": "TableOptions_RowPinning", "to": "reference/interfaces/TableOptions_RowPinning" }, + { "label": "TableOptions_RowSelection", "to": "reference/interfaces/TableOptions_RowSelection" }, + { "label": "TableOptions_RowSorting", "to": "reference/interfaces/TableOptions_RowSorting" }, + { "label": "TableState_ColumnFiltering", "to": "reference/interfaces/TableState_ColumnFiltering" }, + { "label": "TableState_ColumnGrouping", "to": "reference/interfaces/TableState_ColumnGrouping" }, + { "label": "TableState_ColumnOrdering", "to": "reference/interfaces/TableState_ColumnOrdering" }, + { "label": "TableState_ColumnPinning", "to": "reference/interfaces/TableState_ColumnPinning" }, + { "label": "TableState_ColumnResizing", "to": "reference/interfaces/TableState_ColumnResizing" }, + { "label": "TableState_ColumnSizing", "to": "reference/interfaces/TableState_ColumnSizing" }, + { "label": "TableState_ColumnVisibility", "to": "reference/interfaces/TableState_ColumnVisibility" }, + { "label": "TableState_GlobalFiltering", "to": "reference/interfaces/TableState_GlobalFiltering" }, + { "label": "TableState_RowExpanding", "to": "reference/interfaces/TableState_RowExpanding" }, + { "label": "TableState_RowPagination", "to": "reference/interfaces/TableState_RowPagination" }, + { "label": "TableState_RowPinning", "to": "reference/interfaces/TableState_RowPinning" }, + { "label": "TableState_RowSelection", "to": "reference/interfaces/TableState_RowSelection" }, + { "label": "TableState_RowSorting", "to": "reference/interfaces/TableState_RowSorting" }, + { "label": "ColumnDef_ColumnFiltering", "to": "reference/interfaces/ColumnDef_ColumnFiltering" }, + { "label": "ColumnDef_ColumnGrouping", "to": "reference/interfaces/ColumnDef_ColumnGrouping" }, + { "label": "ColumnDef_ColumnPinning", "to": "reference/interfaces/ColumnDef_ColumnPinning" }, + { "label": "ColumnDef_ColumnResizing", "to": "reference/interfaces/ColumnDef_ColumnResizing" }, + { "label": "ColumnDef_ColumnSizing", "to": "reference/interfaces/ColumnDef_ColumnSizing" }, + { "label": "ColumnDef_ColumnVisibility", "to": "reference/interfaces/ColumnDef_ColumnVisibility" }, + { "label": "ColumnDef_GlobalFiltering", "to": "reference/interfaces/ColumnDef_GlobalFiltering" }, + { "label": "ColumnDef_RowSorting", "to": "reference/interfaces/ColumnDef_RowSorting" }, + { "label": "ColumnDef_Plugins", "to": "reference/interfaces/ColumnDef_Plugins" }, + { "label": "ColumnPinningState", "to": "reference/interfaces/ColumnPinningState" }, + { "label": "ColumnSort", "to": "reference/interfaces/ColumnSort" }, + { "label": "ColumnFilter", "to": "reference/interfaces/ColumnFilter" }, + { "label": "PaginationState", "to": "reference/interfaces/PaginationState" }, + { "label": "RowPinningState", "to": "reference/interfaces/RowPinningState" }, + { "label": "columnResizingState", "to": "reference/interfaces/columnResizingState" }, + { "label": "ColumnFiltersState", "to": "reference/type-aliases/ColumnFiltersState" }, + { "label": "ColumnOrderState", "to": "reference/type-aliases/ColumnOrderState" }, + { "label": "ColumnSizingState", "to": "reference/type-aliases/ColumnSizingState" }, + { "label": "ColumnVisibilityState", "to": "reference/type-aliases/ColumnVisibilityState" }, + { "label": "ExpandedState", "to": "reference/type-aliases/ExpandedState" }, + { "label": "GroupingState", "to": "reference/type-aliases/GroupingState" }, + { "label": "RowSelectionState", "to": "reference/type-aliases/RowSelectionState" }, + { "label": "SortingState", "to": "reference/type-aliases/SortingState" }, + { "label": "FilterFn", "to": "reference/interfaces/FilterFn" }, + { "label": "FilterFns", "to": "reference/interfaces/FilterFns" }, + { "label": "FilterMeta", "to": "reference/interfaces/FilterMeta" }, + { "label": "SortFn", "to": "reference/interfaces/SortFn" }, + { "label": "SortFns", "to": "reference/interfaces/SortFns" }, + { "label": "AggregationFns", "to": "reference/interfaces/AggregationFns" }, + { "label": "filterFns", "to": "reference/variables/filterFns" }, + { "label": "sortFns", "to": "reference/variables/sortFns" }, + { "label": "aggregationFns", "to": "reference/variables/aggregationFns" } + ] + }, + { + "collapsible": true, + "defaultCollapsed": true, + "label": "Legacy API Reference", + "children": [], + "frameworks": [ + { + "label": "react", + "children": [ + { "label": "Legacy API Overview", "to": "framework/react/reference/legacy/index" }, + { "label": "useLegacyTable", "to": "framework/react/reference/legacy/functions/useLegacyTable" }, + { "label": "legacyCreateColumnHelper", "to": "framework/react/reference/legacy/functions/legacyCreateColumnHelper" }, + { "label": "getCoreRowModel", "to": "framework/react/reference/legacy/functions/getCoreRowModel" }, + { "label": "getFilteredRowModel", "to": "framework/react/reference/legacy/functions/getFilteredRowModel" }, + { "label": "getSortedRowModel", "to": "framework/react/reference/legacy/functions/getSortedRowModel" }, + { "label": "getGroupedRowModel", "to": "framework/react/reference/legacy/functions/getGroupedRowModel" }, + { "label": "getExpandedRowModel", "to": "framework/react/reference/legacy/functions/getExpandedRowModel" }, + { "label": "getPaginationRowModel", "to": "framework/react/reference/legacy/functions/getPaginationRowModel" }, + { "label": "getFacetedRowModel", "to": "framework/react/reference/legacy/functions/getFacetedRowModel" }, + { "label": "getFacetedMinMaxValues", "to": "framework/react/reference/legacy/functions/getFacetedMinMaxValues" }, + { "label": "getFacetedUniqueValues", "to": "framework/react/reference/legacy/functions/getFacetedUniqueValues" }, + { "label": "LegacyRowModelOptions", "to": "framework/react/reference/legacy/interfaces/LegacyRowModelOptions" }, + { "label": "LegacyTable", "to": "framework/react/reference/legacy/type-aliases/LegacyTable" }, + { "label": "LegacyTableOptions", "to": "framework/react/reference/legacy/type-aliases/LegacyTableOptions" }, + { "label": "LegacyReactTable", "to": "framework/react/reference/legacy/type-aliases/LegacyReactTable" }, + { "label": "LegacyColumnDef", "to": "framework/react/reference/legacy/type-aliases/LegacyColumnDef" }, + { "label": "LegacyColumn", "to": "framework/react/reference/legacy/type-aliases/LegacyColumn" }, + { "label": "LegacyRow", "to": "framework/react/reference/legacy/type-aliases/LegacyRow" }, + { "label": "LegacyCell", "to": "framework/react/reference/legacy/type-aliases/LegacyCell" }, + { "label": "LegacyHeader", "to": "framework/react/reference/legacy/type-aliases/LegacyHeader" }, + { "label": "LegacyHeaderGroup", "to": "framework/react/reference/legacy/type-aliases/LegacyHeaderGroup" } + ] + } + ] + }, + { + "label": "Enterprise", + "children": [ + { + "label": "AG Grid", + "to": "enterprise/ag-grid" + } + ] + }, + { + "label": "Basic Examples", + "children": [], + "frameworks": [ + { + "label": "angular", + "children": [ + { "to": "framework/angular/examples/basic", "label": "Basic" }, + { "to": "framework/angular/examples/basic-app-table", "label": "Basic (App Table)" } + ] + }, + { + "label": "lit", + "children": [ + { "to": "framework/lit/examples/basic", "label": "Basic" } + ] + }, + { + "label": "react", + "children": [ + { "to": "framework/react/examples/basic-use-table", "label": "Basic (useTable)" }, + { "to": "framework/react/examples/basic-use-app-table", "label": "Basic (useAppTable)" }, + { "to": "framework/react/examples/basic-use-legacy-table", "label": "Basic (useLegacyTable)" }, + { "to": "framework/react/examples/basic-external-state", "label": "Basic (External State)" }, + { "to": "framework/react/examples/basic-external-store", "label": "Basic (External Store)" }, + { "to": "framework/react/examples/basic-shadcn", "label": "Shadcn Basic" }, + { "to": "framework/react/examples/column-groups", "label": "Header Groups" } + ] + }, + { + "label": "solid", + "children": [ + { "to": "framework/solid/examples/basic-use-table", "label": "Basic (createTable)" }, + { "to": "framework/solid/examples/basic-app-table", "label": "Basic (createAppTable)" }, + { "to": "framework/solid/examples/basic-external-state", "label": "Basic (External State)" }, + { "to": "framework/solid/examples/basic-external-store", "label": "Basic (External Store)" }, + { "to": "framework/solid/examples/column-groups", "label": "Header Groups" } + ] + }, + { + "label": "svelte", + "children": [ + { "to": "framework/svelte/examples/basic", "label": "Basic" }, + { "to": "framework/svelte/examples/basic-snippets", "label": "Basic Snippets" }, + { "to": "framework/svelte/examples/basic-table-helper", "label": "Basic with Helpers" }, + { "to": "framework/svelte/examples/column-groups", "label": "Header Groups" } + ] + }, + { + "label": "vue", + "children": [ + { "to": "framework/vue/examples/basic", "label": "Basic" } + ] + }, + { + "label": "preact", + "children": [ + { "to": "framework/preact/examples/basic", "label": "Basic" } + ] + }, + { + "label": "vanilla", + "children": [ + { "to": "framework/vanilla/examples/basic", "label": "Basic" } + ] + } + ] + }, + { + "label": "Feature Examples", + "children": [], + "frameworks": [ + { + "label": "angular", + "children": [ + { "to": "framework/angular/examples/filters", "label": "Column Filters" }, + { "to": "framework/angular/examples/column-ordering", "label": "Column Ordering" }, + { "to": "framework/angular/examples/column-pinning", "label": "Column Pinning" }, + { "to": "framework/angular/examples/column-pinning-sticky", "label": "Column Pinning (Sticky)" }, + { "to": "framework/angular/examples/column-resizing-performant", "label": "Column Resizing" }, + { "to": "framework/angular/examples/column-visibility", "label": "Column Visibility" }, + { "to": "framework/angular/examples/expanding", "label": "Row Expanding" }, + { "to": "framework/angular/examples/grouping", "label": "Column Grouping" }, + { "to": "framework/angular/examples/row-selection", "label": "Row Selection" }, + { "to": "framework/angular/examples/row-selection-signal", "label": "Row Selection (Signal)" } + ] + }, + { + "label": "lit", + "children": [ + { "to": "framework/lit/examples/column-sizing", "label": "Column Sizing" }, + { "to": "framework/lit/examples/filters", "label": "Filters" }, + { "to": "framework/lit/examples/row-selection", "label": "Row Selection" }, + { "to": "framework/lit/examples/sorting", "label": "Sorting" }, + { "to": "framework/lit/examples/sorting-dynamic-data", "label": "Sorting (Dynamic Data)" } + ] + }, + { + "label": "react", + "children": [ + { "to": "framework/react/examples/filters", "label": "Column Filters" }, + { "to": "framework/react/examples/filters-faceted", "label": "Column Filters (Faceted)" }, + { "to": "framework/react/examples/filters-fuzzy", "label": "Fuzzy Search Filters" }, + { "to": "framework/react/examples/column-ordering", "label": "Column Ordering" }, + { "to": "framework/react/examples/column-dnd", "label": "Column Ordering (DnD)" }, + { "to": "framework/react/examples/column-pinning", "label": "Column Pinning" }, + { "to": "framework/react/examples/column-pinning-split", "label": "Column Pinning (Split)" }, + { "to": "framework/react/examples/column-pinning-sticky", "label": "Sticky Column Pinning" }, + { "to": "framework/react/examples/column-sizing", "label": "Column Sizing" }, + { "to": "framework/react/examples/column-resizing", "label": "Column Resizing" }, + { "to": "framework/react/examples/column-resizing-performant", "label": "Performant Column Resizing" }, + { "to": "framework/react/examples/column-visibility", "label": "Column Visibility" }, + { "to": "framework/react/examples/expanding", "label": "Expanding" }, + { "to": "framework/react/examples/grouping", "label": "Grouping" }, + { "to": "framework/react/examples/pagination", "label": "Pagination" }, + { "to": "framework/react/examples/row-dnd", "label": "Row DnD" }, + { "to": "framework/react/examples/row-pinning", "label": "Row Pinning" }, + { "to": "framework/react/examples/row-selection", "label": "Row Selection" }, + { "to": "framework/react/examples/sorting", "label": "Sorting" } + ] + }, + { + "label": "solid", + "children": [ + { "to": "framework/solid/examples/column-ordering", "label": "Column Ordering" }, + { "to": "framework/solid/examples/column-visibility", "label": "Column Visibility" }, + { "to": "framework/solid/examples/filters", "label": "Filters" }, + { "to": "framework/solid/examples/filters-faceted", "label": "Filters (Faceted)" }, + { "to": "framework/solid/examples/row-selection", "label": "Row Selection" }, + { "to": "framework/solid/examples/sorting", "label": "Sorting" } + ] + }, + { + "label": "svelte", + "children": [ + { "to": "framework/svelte/examples/column-ordering", "label": "Column Ordering" }, + { "to": "framework/svelte/examples/column-pinning", "label": "Column Pinning" }, + { "to": "framework/svelte/examples/column-visibility", "label": "Column Visibility" }, + { "to": "framework/svelte/examples/filtering", "label": "Filtering" }, + { "to": "framework/svelte/examples/row-selection", "label": "Row Selection" }, + { "to": "framework/svelte/examples/sorting", "label": "Sorting" } + ] + }, + { + "label": "vue", + "children": [ + { "to": "framework/vue/examples/column-ordering", "label": "Column Ordering" }, + { "to": "framework/vue/examples/column-pinning", "label": "Column Pinning" }, + { "to": "framework/vue/examples/pagination", "label": "Pagination" }, + { "to": "framework/vue/examples/pagination-controlled", "label": "Pagination Controlled" }, + { "to": "framework/vue/examples/row-selection", "label": "Row Selection" }, + { "to": "framework/vue/examples/sorting", "label": "Sorting" }, + { "to": "framework/vue/examples/filters", "label": "Column Filters" } + ] + }, + { + "label": "preact", + "children": [ + { "to": "framework/preact/examples/sorting", "label": "Sorting" } + ] + }, + { + "label": "vanilla", + "children": [ + { "to": "framework/vanilla/examples/pagination", "label": "Pagination" }, + { "to": "framework/vanilla/examples/sorting", "label": "Sorting" } + ] + } + ] + }, + { + "label": "Specialized Examples", + "children": [], + "frameworks": [ + { + "label": "angular", + "children": [ + { "to": "framework/angular/examples/composable-tables", "label": "Composable Tables" }, + { "to": "framework/angular/examples/custom-plugin", "label": "Custom Plugin" }, + { "to": "framework/angular/examples/sub-components", "label": "Sub Components" }, + { "to": "framework/angular/examples/remote-data", "label": "Fetch API data (SPA / SSR)" }, + { "to": "framework/angular/examples/signal-input", "label": "Signal Input" }, + { "to": "framework/angular/examples/editable", "label": "Editable data" }, + { "to": "framework/angular/examples/row-dnd", "label": "Row Drag & Drop" } + ] + }, + { + "label": "lit", + "children": [ + { "to": "framework/lit/examples/virtualized-rows", "label": "With TanStack Virtual - Rows" } + ] + }, + { + "label": "react", + "children": [ + { "to": "framework/react/examples/composable-tables", "label": "Composable Tables" }, + { "to": "framework/react/examples/custom-plugin", "label": "Custom Plugin" }, + { "to": "framework/react/examples/sub-components", "label": "Sub Components" }, + { "to": "framework/react/examples/virtualized-columns", "label": "With TanStack Virtual - Columns" }, + { "to": "framework/react/examples/virtualized-columns-experimental", "label": "With TanStack Virtual - Columns (Exp)" }, + { "to": "framework/react/examples/virtualized-rows", "label": "With TanStack Virtual - Rows" }, + { "to": "framework/react/examples/virtualized-rows-experimental", "label": "With TanStack Virtual - Rows (Exp)" }, + { "to": "framework/react/examples/virtualized-infinite-scrolling", "label": "With TanStack Virtual - Infinite Scrolling" }, + { "to": "framework/react/examples/with-tanstack-form", "label": "With TanStack Form" }, + { "to": "framework/react/examples/with-tanstack-query", "label": "With TanStack Query" }, + { "to": "framework/react/examples/with-tanstack-router", "label": "With TanStack Router" } + ] + }, + { + "label": "solid", + "children": [ + { "to": "framework/solid/examples/bootstrap", "label": "Solid Bootstrap" }, + { "to": "framework/solid/examples/composable-tables", "label": "Composable Tables" }, + { "to": "framework/solid/examples/with-tanstack-query", "label": "With TanStack Query" }] + }, + { + "label": "vue", + "children": [ + { "to": "framework/vue/examples/sub-components", "label": "Sub Components" }, + { "to": "framework/vue/examples/virtualized-rows", "label": "With TanStack Virtual (Rows)" } + ] + } + ] + }, + { + "label": "Kitchen Sink", + "children": [], + "frameworks": [ + { + "label": "react", + "children": [ + { "to": "framework/react/examples/kitchen-sink-shadcn", "label": "Kitchen Sink (Shadcn)" } + ] + } + ] + } + ] +} diff --git a/docs/enterprise/ag-grid.md b/docs/enterprise/ag-grid.md new file mode 100644 index 0000000000..6836b9af11 --- /dev/null +++ b/docs/enterprise/ag-grid.md @@ -0,0 +1,43 @@ +--- +title: AG Grid - An alternative enterprise data-grid solution +--- + +

+ + + +

+ +While we clearly love TanStack Table, we acknowledge that it is not a "batteries" included product packed with customer support and enterprise polish. We realize that some of our users may need this though! To help out here, we want to introduce you to AG Grid, an enterprise-grade data grid solution that can supercharge your applications with its extensive feature set and robust performance. While TanStack Table is also a powerful option for implementing data grids, we believe in providing our users with a diverse range of choices that best fit their specific requirements. AG Grid is one such choice, and we're excited to highlight its capabilities for you. + +## Why Choose [AG Grid](https://ag-grid.com/react-data-grid/?utm_source=reacttable&utm_campaign=githubreacttable)? + +Here are some good reasons to consider AG Grid for your next project: + +### Comprehensive Feature Set + +AG Grid offers an extensive set of features, making it a versatile and powerful data grid solution. With AG Grid, you get access to a wide range of functionalities that cater to the needs of complex enterprise applications. From advanced sorting, filtering, and grouping capabilities to column pinning, multi-level headers, and tree data structure support, AG Grid provides you with the tools to create dynamic and interactive data grids that meet your application's unique demands. + +### High Performance + +When it comes to handling large datasets and achieving exceptional performance, AG Grid delivers outstanding results. It employs highly optimized rendering techniques, efficient data updates, and virtualization to ensure smooth scrolling and fast response times, even when dealing with thousands or millions of rows of data. AG Grid's performance optimizations make it an excellent choice for applications that require high-speed data manipulation and visualization. + +### Customization and Extensibility + +AG Grid is designed to be highly customizable and extensible, allowing you to tailor the grid to your specific needs. It provides a rich set of APIs and events that enable you to integrate custom functionality seamlessly. You can define custom cell renderers, editors, filters, and aggregators to enhance the grid's behavior and appearance. AG Grid also supports a variety of themes, allowing you to match the grid's visual style to your application's design. + +### Support for Enterprise Needs + +As an enterprise-focused solution, AG Grid caters to the requirements of complex business applications. It offers enterprise-specific features such as row grouping, column pinning, server-side row model, master/detail grids, and rich editing capabilities. AG Grid also integrates well with other enterprise frameworks and libraries, making it a reliable choice for large-scale projects. + +### Active Development and Community Support + +AG Grid benefits from active development and a thriving community of developers. The team behind AG Grid consistently introduces new features and enhancements, ensuring that the product evolves to meet the changing needs of the industry. The community support is robust, with forums, documentation, and examples readily available to assist you in utilizing the full potential of AG Grid. + +## Conclusion + +While TanStack Table remains a powerful and flexible option for implementing data grids, we understand that different projects have different requirements. AG Grid offers a compelling enterprise-grade solution that may be particularly suited to your needs. Its comprehensive feature set, high performance, customization options, and focus on enterprise requirements make AG Grid an excellent choice for projects that demand a robust and scalable data grid solution. + +We encourage you to explore AG Grid further by visiting their website and trying out their demo. Remember that both TanStack Table and AG Grid have their unique strengths and considerations. We believe in providing options to our users, empowering you to make informed decisions and choose the best fit for your specific use case. + +Visit the [AG Grid website](https://www.ag-grid.com). diff --git a/docs/faq.md b/docs/faq.md new file mode 100644 index 0000000000..714a9fa448 --- /dev/null +++ b/docs/faq.md @@ -0,0 +1,166 @@ +--- +title: FAQ +--- + +## How do I stop infinite rendering loops? + +If you are using React, there is a very common pitfall that can cause infinite rendering. If you fail to give your `columns`, `data`, or `state` a stable reference, React will enter an infinite loop of re-rendering upon any change to the table state. + +Why does this happen? Is this a bug in TanStack Table? **No**, it is not. *This is fundamentally how React works*, and properly managing your columns, data, and state will prevent this from happening. + +TanStack Table is designed to trigger a re-render whenever either the `data` or `columns` that are passed into the table change, or whenever any of the table's state changes. + +> Failing to give `columns` or `data` stable references can cause an infinite loop of re-renders. + +### Pitfall 1: Creating new columns or data on every render + +```js +export default function MyComponent() { + //😵 BAD: This will cause an infinite loop of re-renders because `columns` is redefined as a new array on every render! + const columns = [ + // ... + ]; + + //😵 BAD: This will cause an infinite loop of re-renders because `data` is redefined as a new array on every render! + const data = [ + // ... + ]; + + //❌ Columns and data are defined in the same scope as `useTable` without a stable reference, will cause infinite loop! + const table = useTable({ + columns, + data, + }); + + return ...
; +} +``` + +### Solution 1: Stable references with useMemo or useState + +In React, you can give a "stable" reference to variables by defining them outside/above the component, or by using `useMemo` or `useState`, or by using a 3rd party state management library (like Redux or React Query 😉) + +```js +//✅ OK: Define columns outside of the component +const columns = [ + // ... +]; + +//✅ OK: Define data outside of the component +const data = [ + // ... +]; + +// Usually it's more practical to define columns and data inside the component, so use `useMemo` or `useState` to give them stable references +export default function MyComponent() { + //✅ GOOD: This will not cause an infinite loop of re-renders because `columns` is a stable reference + const columns = useMemo(() => [ + // ... + ], []); + + //✅ GOOD: This will not cause an infinite loop of re-renders because `data` is a stable reference + const [data, setData] = useState(() => [ + // ... + ]); + + // Columns and data are defined in a stable reference, will not cause infinite loop! + const table = useTable({ + columns, + data, + }); + + return ...
; +} +``` + +### Pitfall 2: Mutating columns or data in place + +Even if you give your initial `columns` and `data` stable references, you can still run into infinite loops if you mutate them in place. This is a common pitfall that you may not notice that you are doing at first. Something as simple as an inline `data.filter()` can cause an infinite loop if you are not careful. + +```js +export default function MyComponent() { + //✅ GOOD + const columns = useMemo(() => [ + // ... + ], []); + + //✅ GOOD (React Query provides stable references to data automatically) + const { data, isLoading } = useQuery({ + //... + }); + + const table = useTable({ + columns, + //❌ BAD: This will cause an infinite loop of re-renders because `data` is mutated in place (destroys stable reference) + data: data?.filter(d => d.isActive) ?? [], + }); + + return ...
; +} +``` + +### Solution 2: Memoize your data transformations + +To prevent infinite loops, you should always memoize your data transformations. This can be done with `useMemo` or similar. + +```js +export default function MyComponent() { + //✅ GOOD + const columns = useMemo(() => [ + // ... + ], []); + + //✅ GOOD + const { data, isLoading } = useQuery({ + //... + }); + + //✅ GOOD: This will not cause an infinite loop of re-renders because `filteredData` is memoized + const filteredData = useMemo(() => data?.filter(d => d.isActive) ?? [], [data]); + + const table = useTable({ + columns, + data: filteredData, // stable reference! + }); + + return ...
; +} +``` + +### React Forget + +When React Forget is released, these problems might be a thing of the past. Or just use Solid.js... 🤓 + +## How do I stop my table state from automatically resetting when my data changes? + +Most plugins use state that _should_ normally reset when the data sources changes, but sometimes you need to suppress that from happening if you are filtering your data externally, or immutably editing your data while looking at it, or simply doing anything external with your data that you don't want to trigger a piece of table state to reset automatically. + +For those situations, each plugin provides a way to disable the state from automatically resetting internally when data or other dependencies for a piece of state change. By setting any of them to `false`, you can stop the automatic resets from being triggered. + +Here is a React-based example of stopping basically every piece of state from changing as they normally do while we edit the `data` source for a table: + +```js +const [data, setData] = React.useState([]) +const skipPageResetRef = React.useRef() + +const updateData = newData => { + // When data gets updated with this function, set a flag + // to disable all of the auto resetting + skipPageResetRef.current = true + + setData(newData) +} + +React.useEffect(() => { + // After the table has updated, always remove the flag + skipPageResetRef.current = false +}) + +useTable({ + ... + autoResetPageIndex: !skipPageResetRef.current, + autoResetExpanded: !skipPageResetRef.current, +}) +``` + +Now, when we update our data, the above table states will not automatically reset! diff --git a/docs/favicon.ico b/docs/favicon.ico deleted file mode 100644 index 31b707d749..0000000000 Binary files a/docs/favicon.ico and /dev/null differ diff --git a/docs/framework/angular/angular-table.md b/docs/framework/angular/angular-table.md new file mode 100644 index 0000000000..2f8437c7f5 --- /dev/null +++ b/docs/framework/angular/angular-table.md @@ -0,0 +1,128 @@ +--- +title: Angular Table +--- + +The `@tanstack/angular-table` adapter is a wrapper around the core table logic. Most of it's job is related to managing +state using angular signals, providing types and the rendering implementation of cell/header/footer templates. + +## Exports + +`@tanstack/angular-table` re-exports all of `@tanstack/table-core`'s APIs and the following: + +### `injectTable` + +Creates and returns an Angular-reactive table instance. + +`injectTable` accepts either: + +- an options function `() => TableOptions` +- a computed signal returning `TableOptions` + +The initializer is intentionally re-evaluated whenever any signal read inside it changes. +This is how the adapter keeps the table in sync with Angular's reactivity model. + +Because of that behavior, keep expensive/static values (for example `columns`, feature setup, row models) as stable references outside the initializer, and only read reactive state (`data()`, pagination/filter/sorting signals, etc.) inside it. + +Since `ColumnDef` is stricter about generics, prefer building columns with `createColumnHelper()` so feature and row types are inferred consistently. + +The returned table is also signal-reactive: table state and table APIs are wired for Angular signals, so you can safely consume table methods inside `computed(...)` and `effect(...)`. + +```ts +import { computed, effect, signal } from '@angular/core' +import { + createColumnHelper, + injectTable, + type ColumnDef, + rowPaginationFeature, + stockFeatures +} from '@tanstack/angular-table' + +// Register all table core features +const _features = tableFeatures(stockFeatures); +// ...or register only your needed features +const _features = tableFeatures({ + rowPaginationFeature, + // ...all other features +}) + +const columnHelper = createColumnHelper() + +export class AppComponent { + readonly data = signal([]) + + // If you type columns manually, include both generics: + // readonly columns: ColumnDef[] = [...] + readonly columns = columnHelper.columns([ + columnHelper.accessor('firstName', { + header: 'First name', + cell: info => info.getValue(), + }), + // ... + ]) + + // This function is re-run when any signal read inside changes. + readonly table = injectTable(() => ({ + _features: _features, + // Reactive state can be read directly + data: this.data(), + + state: { + // ... + }, + + // Keep stable references outside the initializer + columns: this.columns, + })) + + constructor() { + effect(() => { + console.log('Visible rows:', this.table.getRowModel().rows.length) + }) + } +} +``` + +See [injectTable API Reference](reference/functions/injectTable) + +### `createTableHook` + +`createTableHook` is the Angular composition API for building reusable table infrastructure. + +Use it when multiple tables should share the same defaults (features, row models, default options, and component registries) while keeping strong types across the app. + +At runtime, `createTableHook` wraps `injectTable` and returns typed helpers such as: + +- `injectAppTable` for creating tables with shared defaults +- `createAppColumnHelper` for strongly typed column definitions +- pre-typed context helpers (`injectTableContext`, `injectTableCellContext`, `injectTableHeaderContext`, `injectFlexRenderCellContext`, `injectFlexRenderHeaderContext`) + +For full setup and patterns, see the [Table Composition Guide](./guide/table-composition.md). + +### `FlexRender` + +An Angular structural rendering primitive for cell/header/footer content. + +It supports the same content kinds as Angular rendering: + +- primitive values (`string`, `number`, plain objects) +- `TemplateRef` +- component types +- `flexRenderComponent(component, options?)` wrappers with typed `inputs`, `outputs`, `injector`, `bindings`, and `directives` + +Column render functions (`header`, `cell`, `footer`) run in Angular injection context, so you can use `inject()` and signals directly in render logic. + +For complete rendering details (`*flexRender`, shorthand directives, `flexRenderComponent`, `TemplateRef`, component inputs/outputs, and `injectFlexRenderContext`), see the [Rendering components Guide](./guide/rendering.md). + +### Context helpers and directives + +`@tanstack/angular-table` also exports Angular DI helpers and directives for table/cell/header context: + +- `TanStackTable` + `injectTableContext()` +- `TanStackTableCell` + `injectTableCellContext()` +- `TanStackTableHeader` + `injectTableHeaderContext()` + +These APIs provide signal-based context values and are available from nearest directives or from `*flexRender`-rendered components when matching props are present. + +### Full API Reference + +See [Angular API Reference](reference/index.md) diff --git a/docs/framework/angular/guide/migrating.md b/docs/framework/angular/guide/migrating.md new file mode 100644 index 0000000000..102b15d927 --- /dev/null +++ b/docs/framework/angular/guide/migrating.md @@ -0,0 +1,764 @@ +--- +title: Migrating to TanStack Table v9 (Angular) +--- + +## What's New in TanStack Table v9 + +TanStack Table v9 is a major release that introduces significant architectural improvements while maintaining the core table logic you're familiar with. Here are the key changes: + +### 1. Tree-shaking + +- **Features are tree-shakeable**: Features are now treated as plugins—import only what you use. If your table only needs sorting, you won't ship filtering, pagination, or other feature code. Bundlers can eliminate unused code, so for smaller tables you can expect a meaningfully smaller bundle compared to v8. This also lets TanStack Table add features over time without bloating everyone's bundles. +- **Row models and their functions are refactored**: Row model factories (`createFilteredRowModel`, `createSortedRowModel`, etc.) now accept their processing functions (`filterFns`, `sortFns`, `aggregationFns`) as parameters. This enables tree-shaking of the functions themselves—if you use a custom filter, you don't pay for built-in filters you never use. + +### 2. State Management + +- **Uses TanStack Store**: The internal state system has been rebuilt on [TanStack Store](https://tanstack.com/store), providing a reactive, framework-agnostic foundation. +- **Opt-in subscriptions instead of memo hacks**: In Angular, you consume state via signals and `computed(...)`. You can keep reads scoped to the state you actually need and avoid unnecessary template work. + +### 3. Composability + +- **`tableOptions`**: New utilities let you compose and share table configurations. Define `_features`, `_rowModels`, and default options once, then reuse them across tables or pass them through `createTableHook`. +- **`createTableHook`** (optional, advanced): Create reusable, strongly typed Angular table factories with pre-bound features, row models, default options, and component registries. + +### The Good News: Most Upgrades Are Opt-in + +While v9 is a significant upgrade, **you don't have to adopt everything at once**: + +- **Don't want to think about tree-shaking yet?** You can start with `stockFeatures` to include most commonly used features. +- **Your table markup is largely unchanged.** How you render ``, ``, ``, ` + @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) { + + @for (header of headerGroup.headers; track header.id) { + + } + + } + + + + @for (row of table.getRowModel().rows; track row.id) { + + @for (cell of row.getVisibleCells(); track cell.id) { + + } + + } + +``` + +## Cell rendering with custom props + +When you need full control over the `props` passed to the render function, use `*flexRender` directly. + +`FlexRenderDirective` accepts two inputs: + +- `flexRender` — the render definition (a column def function, a string, a `TemplateRef`, a component type, or a `flexRenderComponent(...)` wrapper) +- `flexRenderProps` — the props object passed to the render function and used as the implicit template context + +Standard usage: + +```html + + {{ rendered }} + +``` + +You can pass a custom props object to override the default context shape: + +```html + + {{ rendered }} + +``` + +Inside rendered components, the full props object is available via [`injectFlexRenderContext()`](#injectflexrendercontext). + +## Component rendering + +You can render Angular components from column definitions in two ways: + +### Using `flexRenderComponent` + +[`flexRenderComponent(component, options?)`](../reference/functions/flexRenderComponent) wraps a component type with explicit options for `inputs`, `outputs`, `injector`, `bindings`, and `directives`. + +Use this when you need to: + +- pass custom inputs not derived from the render context +- subscribe to component outputs +- provide a custom `Injector` +- use creation-time `bindings` (Angular v20+) +- apply host directives and binding values at runtime + +```ts +import { flexRenderComponent, type ColumnDef } from '@tanstack/angular-table' + +const columns: ColumnDef[] = [ + { + id: 'custom-cell', + cell: ctx => + flexRenderComponent(CustomCellComponent, { + inputs: { + content: ctx.row.original.firstName, + }, + outputs: { + clicked: value => { + console.log(value) + }, + }, + }), + }, +] +``` + +#### How inputs and outputs work + +**Inputs** are applied through [`ComponentRef.setInput(key, value)`](https://angular.dev/api/core/ComponentRef#setInput). This works with both `input()` signals and `@Input()` decorators. Inputs are diffed on every change detection cycle using `KeyValueDiffers` — only changed values trigger `setInput`. + +For object-like inputs, updates are reference-based: if the object reference is stable, Angular's default input equality semantics prevent unnecessary updates. + +**Outputs** work through `OutputEmitterRef` subscriptions. The factory reads the component instance property by name, checks that it is an `OutputEmitterRef`, and subscribes to it. When the output emits, the corresponding callback from `outputs` is invoked. Subscriptions are cleaned up automatically when the component is destroyed. + +#### `bindings` API (Angular v20+) + +`flexRenderComponent` also accepts `bindings` and `directives`, forwarded directly to [`ViewContainerRef.createComponent`](https://angular.dev/api/core/ViewContainerRef#createComponent) at creation time. + +This supports Angular programmatic rendering APIs for passing host directives and binding values at runtime. + +Unlike `inputs`/`outputs` (which are applied imperatively after creation), `bindings` are applied **at creation time** — they participate in the component's initial change detection cycle. + +```ts +import { + inputBinding, + outputBinding, + twoWayBinding, + signal, +} from '@angular/core' +import { flexRenderComponent } from '@tanstack/angular-table' + +readonly name = signal('Ada') + +cell: () => + flexRenderComponent(EditableNameCellComponent, { + bindings: [ + inputBinding('value', this.name), + outputBinding('valueChange', value => { + console.log('changed', value) + }), + twoWayBinding('value', this.name), + ], + }) +``` + +> Avoid mixing `bindings` with `inputs`/`outputs` on the same property. `bindings` are applied at creation, while `inputs`/`outputs` are applied post-creation — mixing them can lead to double initialization or conflicting values. + +See the Angular docs for details: + +- [Programmatic rendering — Binding inputs/outputs/directives](https://angular.dev/guide/components/programmatic-rendering#binding-inputs-outputs-and-setting-host-directives-at-creation) +- [`inputBinding`](https://angular.dev/api/core/inputBinding), [`outputBinding`](https://angular.dev/api/core/outputBinding), [`twoWayBinding`](https://angular.dev/api/core/twoWayBinding) + +### Returning a component class + +Return a component class from `header`, `cell`, or `footer`. + +The render context properties (`table`, `column`, `header`, `cell`, `row`, `getValue`, etc.) are automatically set as component inputs via `ComponentRef.setInput(...)`. + +Define input signals matching the context property names you need: + +```ts +import { Component, input } from '@angular/core' +import type { ColumnDef, Table, CellContext } from '@tanstack/angular-table' + +const columns: ColumnDef[] = [ + { + id: 'select', + header: () => TableHeadSelectionComponent, + cell: () => TableRowSelectionComponent, + }, +] + +@Component({ + template: ` + + `, +}) +export class TableHeadSelectionComponent { + readonly table = input.required>(); + // column = input.required>() + // header = input.required>() +} +``` + +Only properties declared with `input()` / `input.required()` are set — other context properties are silently ignored. You can also access the full context via [`injectFlexRenderContext()`](#injectflexrendercontext). + +## TemplateRef rendering + +You can return a `TemplateRef` from column definitions. The render context is passed as the template's `$implicit` context. + +Use `viewChild(...)` to capture template references: + +```ts +import { Component, TemplateRef, viewChild } from '@angular/core' +import type { + CellContext, + ColumnDef, + HeaderContext, +} from '@tanstack/angular-table' + +@Component({ + template: ` + + {{ context.column.id }} + + + + {{ context.getValue() }} + + `, +}) +export class AppComponent { + readonly customHeader = + viewChild.required }>>( + 'customHeader', + ) + readonly customCell = + viewChild.required }>>( + 'customCell', + ) + + readonly columns: ColumnDef[] = [ + { + id: 'templated', + header: () => this.customHeader(), + cell: () => this.customCell(), + }, + ] +} +``` + +`TemplateRef` rendering uses `createEmbeddedView` with an injector that includes the [DI context tokens](#dependency-injection). For reusable render blocks shared across multiple screens, prefer standalone components over `TemplateRef`. + +## Dependency injection + +`FlexRender` automatically provides DI tokens when rendering components and templates. These tokens are created in the `#getInjector` method of the renderer, which builds a child `Injector` with the render context properties. + +### `injectFlexRenderContext` + +[`injectFlexRenderContext()`](../reference/functions/injectFlexRenderContext) returns the full props object passed to `*flexRender`. The return type depends on the column definition slot: + +- In a `cell` definition: `CellContext` +- In a `header`/`footer` definition: `HeaderContext` + +```ts +import { Component } from '@angular/core' +import { + injectFlexRenderContext, + type CellContext, +} from '@tanstack/angular-table' + +@Component({ + template: ` + {{ context.getValue() }} + + `, +}) +export class InteractiveCellComponent { + readonly context = injectFlexRenderContext>() +} +``` + +Internally, the renderer wraps the context in a `Proxy` so that property access always reflects the latest values, even after re-renders. + +### Context directives + +Three optional directives let you expose table, header, and cell context to **any descendant** in the template — not just components rendered by `*flexRender`. + +This eliminates prop drilling: instead of passing data through multiple `input()` layers, any nested component or directive can inject the context directly. + +| Directive | Selector | Token | Inject helper | +|---|---|---|---| +| [`TanStackTable`](../reference/functions/injectTableContext) | `[tanStackTable]` | `TanStackTableToken` | `injectTableContext()` | +| [`TanStackTableHeader`](../reference/functions/injectTableHeaderContext) | `[tanStackTableHeader]` | `TanStackTableHeaderToken` | `injectTableHeaderContext()` | +| [`TanStackTableCell`](../reference/functions/injectTableCellContext) | `[tanStackTableCell]` | `TanStackTableCellToken` | `injectTableCellContext()` | + +Import them alongside `FlexRender`: + +```ts +import { + FlexRender, + TanStackTable, + TanStackTableHeader, + TanStackTableCell, +} from '@tanstack/angular-table' + +@Component({ + imports: [FlexRender, TanStackTable, TanStackTableHeader, TanStackTableCell], + templateUrl: './app.html', +}) +export class AppComponent {} +``` + +Apply them in the template to establish injection scopes: + +```html +
`, etc. remains the same. + +The main change is **how you define a table** with the Angular adapter — specifically the new `_features` and `_rowModels` options. + +--- + +## Quick Legacy Migration + +Angular does **not** ship a legacy API. + +If you're migrating an Angular project from TanStack Table v8 to v9, you will migrate directly to the v9 Angular adapter APIs (`injectTable`, `_features`, and `_rowModels`). + +--- + +The rest of this guide focuses on migrating to the full v9 API and taking advantage of its features. + +## Core Breaking Changes + +### Entrypoint Change + +The Angular adapter entrypoint to create a table instance is `injectTable`: + +```ts +// v8 +import { createAngularTable } from '@tanstack/angular-table' + +const v8Table = createAngularTable(() => ({ + // options +})) + +// v9 +import { injectTable } from '@tanstack/angular-table' + +const v9Table = injectTable(() => ({ + // options +})) +``` + +> Note: `injectTable` evaluates your initializer whenever any Angular signal read inside of it changes. +> Keep expensive/static values (like `columns`, `_features`, and `_rowModels`) as stable references outside the initializer. + +### New Required Options: `_features` and `_rowModels` + +In v9, you must explicitly declare which features and row models your table uses: + +```ts +// v8 +import { createAngularTable, getCoreRowModel } from '@tanstack/angular-table' + +const v8Table = createAngularTable(() => ({ + columns, + data: data(), + getCoreRowModel: getCoreRowModel(), +})) + +// v9 +import { + injectTable, + tableFeatures, +} from '@tanstack/angular-table' + +const _features = tableFeatures({}) // Empty = core feaFtures only + +// Define stable references outside the initializer +const v9Table = injectTable(() => ({ + _features, + _rowModels: {}, // Core row model is automatic + columns: this.columns, + data: this.data(), +})) +``` + +--- + +## The `_features` Option + +Features control what table functionality is available. In v8, all features were bundled. In v9, you import only what you need. + +### Importing Individual Features + +```ts +import { + tableFeatures, + // Import only the features you need + columnFilteringFeature, + rowSortingFeature, + rowPaginationFeature, + columnVisibilityFeature, + rowSelectionFeature, +} from '@tanstack/angular-table' + +// Create a features object (define this outside your injectTable initializer for stable reference) +const _features = tableFeatures({ + columnFilteringFeature, + rowSortingFeature, + rowPaginationFeature, + columnVisibilityFeature, + rowSelectionFeature, +}) +``` + +### Using `stockFeatures` for v8-like Behavior + +If you want all features without thinking about it (like v8), import `stockFeatures`: + +```ts +import { injectTable, stockFeatures } from '@tanstack/angular-table' + +class TableCmp { + readonly table = injectTable(() => ({ + _features: stockFeatures, // All features included + _rowModels: { /* ... */ }, + columns: this.columns, + data: this.data(), + })) +} +``` + +### Available Features + +| Feature | Import Name | +|---------|-------------| +| Column Filtering | `columnFilteringFeature` | +| Global Filtering | `globalFilteringFeature` | +| Row Sorting | `rowSortingFeature` | +| Row Pagination | `rowPaginationFeature` | +| Row Selection | `rowSelectionFeature` | +| Row Expanding | `rowExpandingFeature` | +| Row Pinning | `rowPinningFeature` | +| Column Pinning | `columnPinningFeature` | +| Column Visibility | `columnVisibilityFeature` | +| Column Ordering | `columnOrderingFeature` | +| Column Sizing | `columnSizingFeature` | +| Column Resizing | `columnResizingFeature` | +| Column Grouping | `columnGroupingFeature` | +| Column Faceting | `columnFacetingFeature` | + +--- + +## The `_rowModels` Option + +Row models are the functions that process your data (filtering, sorting, pagination, etc.). In v9, they're configured via `_rowModels` instead of `get*RowModel` options. + +### Migration Mapping + +| v8 Option | v9 `_rowModels` Key | v9 Factory Function | +|-----------|---------------------|---------------------| +| `getCoreRowModel()` | (automatic) | Not needed — always included | +| `getFilteredRowModel()` | `filteredRowModel` | `createFilteredRowModel(filterFns)` | +| `getSortedRowModel()` | `sortedRowModel` | `createSortedRowModel(sortFns)` | +| `getPaginationRowModel()` | `paginatedRowModel` | `createPaginatedRowModel()` | +| `getExpandedRowModel()` | `expandedRowModel` | `createExpandedRowModel()` | +| `getGroupedRowModel()` | `groupedRowModel` | `createGroupedRowModel(aggregationFns)` | +| `getFacetedRowModel()` | `facetedRowModel` | `createFacetedRowModel()` | +| `getFacetedMinMaxValues()` | `facetedMinMaxValues` | `createFacetedMinMaxValues()` | +| `getFacetedUniqueValues()` | `facetedUniqueValues` | `createFacetedUniqueValues()` | + +### Key Change: Row Model Functions Now Accept Parameters + +Several row model factories now accept their processing functions as parameters. This enables better tree-shaking and explicit configuration: + +```ts +import { + injectTable, + createFilteredRowModel, + createSortedRowModel, + createGroupedRowModel, + createPaginatedRowModel, + filterFns, // Built-in filter functions + sortFns, // Built-in sort functions + aggregationFns, // Built-in aggregation functions +} from '@tanstack/angular-table' + +class TableCmp { + readonly table = injectTable(() => ({ + _features, + _rowModels: { + filteredRowModel: createFilteredRowModel(filterFns), + sortedRowModel: createSortedRowModel(sortFns), + groupedRowModel: createGroupedRowModel(aggregationFns), + paginatedRowModel: createPaginatedRowModel(), + }, + columns: this.columns, + data: this.data(), + })) +} +``` + +### Full Migration Example + +```ts +// v8 +import { + injectTable, + getCoreRowModel, + getFilteredRowModel, + getSortedRowModel, + getPaginationRowModel, + filterFns, + sortingFns, +} from '@tanstack/angular-table' + +const v8Table = createAngularTable(() => ({ + columns, + data: data(), + getCoreRowModel: getCoreRowModel(), // used to be called "get*RowModel()" + getFilteredRowModel: getFilteredRowModel(), + getSortedRowModel: getSortedRowModel(), + getPaginationRowModel: getPaginationRowModel(), + filterFns, // used to be passed in as a root option + sortingFns, +})) + +// v9 +import { + injectTable, + tableFeatures, + columnFilteringFeature, + rowSortingFeature, + rowPaginationFeature, + createFilteredRowModel, + createSortedRowModel, + createPaginatedRowModel, + filterFns, + sortFns, +} from '@tanstack/angular-table' + +const _features = tableFeatures({ + columnFilteringFeature, + rowSortingFeature, + rowPaginationFeature, +}) + +const v9Table = injectTable(() => ({ + _features, + _rowModels: { + filteredRowModel: createFilteredRowModel(filterFns), + sortedRowModel: createSortedRowModel(sortFns), + paginatedRowModel: createPaginatedRowModel(), + }, + columns, + data: data(), +})) +``` + +--- + +## State Management Changes + +### Accessing State + +In v8, you accessed state via `table.getState()`. In v9, state is accessed via the store: + +```ts +// v8 +const state = table.getState() +const v8 = table.getState() +const { sorting, pagination } = v8 + +// v9 - via the store +const fullState = table.store.state +const v9 = table.store.state +const { sorting: v9Sorting, pagination: v9Pagination } = v9 +``` + +### Optimizing Reads with Angular Signals + +In Angular, you have a few good options for consuming table state. + +#### Option 1: Prefer `table.store.subscribe(...)` for a sliced signal + +TanStack Store lets you subscribe to (and derive) a slice of state. With the Angular adapter, you can use that to create a signal-like value that only updates when the selected slice changes. + +This is the closest equivalent to the fine-grained subscription examples you might see in other frameworks. + +```ts +import { computed, effect } from '@angular/core' + +class TableCmp { + readonly table = injectTable(() => ({ + _features, + _rowModels: { /* ... */ }, + columns: this.columns, + data: this.data(), + })) + + // Create a computed to a slice of state. + // The store will only emit when this selected value changes. + private readonly pagination = this.table.computed( + state => state.pagination, + ) + + constructor() { + effect(() => { + const { pageIndex, pageSize } = this.pagination() + console.log('Page', pageIndex, 'Size', pageSize) + }) + } +} +``` + +#### Option 2: Use `computed(...)` and read from `table.store.state` + +You can also use Angular `computed(...)` and directly read from `table.store.state`. This is simple and works well, but for object/array slices you should provide an equality function to avoid unnecessary downstream work when the slice is recreated with the same values. + +```ts +import { computed, effect } from '@angular/core' + +class TableCmp { + readonly table = injectTable(() => ({ + _features, + _rowModels: { /* ... */ }, + columns: this.columns, + data: this.data(), + })) + + // Provide an equality function for object slices + readonly pagination = computed( + () => this.table.store.state.pagination, + { + equal: (a, b) => a.pageIndex === b.pageIndex && a.pageSize === b.pageSize, + }, + ) + + constructor() { + effect(() => { + // This effect only re-runs when pagination changes + const { pageIndex, pageSize } = this.pagination() + console.log('Page', pageIndex, 'Size', pageSize) + }) + } +} +``` + +### Controlled State + +Controlled state patterns are pretty the same as v8: + +```ts +import { signal } from '@angular/core' +import type { SortingState, PaginationState } from '@tanstack/angular-table' + +class TableCmp { + readonly sorting = signal([]) + readonly pagination = signal({ pageIndex: 0, pageSize: 10 }) + + readonly table = injectTable(() => ({ + _features, + _rowModels: { /* ... */ }, + columns: this.columns, + data: this.data(), + state: { + sorting: this.sorting(), + pagination: this.pagination(), + }, + onSortingChange: (updater) => { + updater instanceof Function + ? this.sorting.update(updater) + : this.sorting.set(updater) + }, + onPaginationChange: (updater) => { + updater instanceof Function + ? this.pagination.update(updater) + : this.pagination.set(updater) + }, + })) +} +``` + +--- + +## Column Helper Changes + +The `createColumnHelper` function now requires a `TFeatures` type parameter in addition to `TData`: + +```ts +// v8 +import { createColumnHelper } from '@tanstack/angular-table' + +const columnHelperV8 = createColumnHelper() + +// v9 +import { createColumnHelper, tableFeatures, rowSortingFeature } from '@tanstack/angular-table' + +const _features = tableFeatures({ rowSortingFeature }) +const columnHelperV9 = createColumnHelper() +``` + +### New `columns()` Helper Method + +v9 adds a `columns()` helper for better type inference when wrapping column arrays. + +```ts +const columnHelper = createColumnHelper() + +// Wrap your columns array for better type inference +const columns = columnHelper.columns([ + columnHelper.accessor('firstName', { + header: 'First Name', + cell: (info) => info.getValue(), + }), + columnHelper.accessor('lastName', { + id: 'lastName', + header: () => 'Last Name', + cell: (info) => info.getValue(), + }), + columnHelper.display({ + id: 'actions', + header: 'Actions', + cell: () => 'Edit', + }), +]) +``` + +### Using with `createTableHook` + +When using `createTableHook`, you get a pre-bound `createAppColumnHelper` that only requires `TData`: + +```ts +import { createTableHook, tableFeatures, rowSortingFeature } from '@tanstack/angular-table' + +const { injectAppTable, createAppColumnHelper } = createTableHook({ + _features: tableFeatures({ rowSortingFeature }), + _rowModels: { /* ... */ }, +}) + +// TFeatures is already bound — only need TData! +const columnHelper = createAppColumnHelper() +``` + +--- + +## Rendering Changes + +### `FlexRender` + +The rendering primitives in the Angular adapter are `FlexRender` and the `*flexRender` directives. + +In v9, you can continue to render header/cell/footer content using the Angular adapter rendering utilities, but there are a few important improvements and helper APIs to be aware of. + +#### Structural directive rendering + +Angular rendering is directive-based: + +- `FlexRender` / `*flexRender` renders arbitrary render content (primitives, `TemplateRef`, component types, or `flexRenderComponent(...)` wrappers) +- The directive is responsible for mounting embedded views or components via `ViewContainerRef` + +#### Shorthand directives + +If you're rendering standard table content, prefer the shorthand helpers: + +- `*flexRenderCell="cell; let value"` +- `*flexRenderHeader="header; let value"` +- `*flexRenderFooter="footer; let value"` + +These automatically select the correct column definition (`columnDef.cell` / `header` / `footer`) and the right props (`cell.getContext()` / `header.getContext()`), so you don't need to manually provide `props:`. + +#### DI-aware render functions + context injection + +Column definition render functions (`header`, `cell`, `footer`) run inside an Angular injection context, so they can safely call `inject()` and use signals. + +When a component is rendered through the FlexRender directives, you can also access the full render props object via DI using `injectFlexRenderContext()`. + +#### Component rendering helper: `flexRenderComponent` + +If you need to render an Angular component with explicit configuration (custom `inputs`, `outputs`, `injector`, and Angular v20+ creation-time `bindings`/`directives`), return a `flexRenderComponent(Component, options)` wrapper from your column definition. + +For complete rendering details (including component rendering, `TemplateRef`, `flexRenderComponent`, and context helpers), see the [Rendering components Guide](./rendering.md). + +--- + +## The `tableOptions()` Utility + +The `tableOptions()` helper provides type-safe composition of table options. It's useful for creating reusable partial configurations that can be spread into your table setup. + +### Basic Usage + +```ts +import { injectTable, tableOptions, tableFeatures, rowSortingFeature } from '@tanstack/angular-table' +import { isDevMode } from '@angular/core'; + +// Create a reusable options object with features pre-configured +const baseOptions = tableOptions({ + _features: tableFeatures({ rowSortingFeature }), + debugTable: isDevMode() +}) + +class TableCmp { + readonly table = injectTable(() => ({ + ...baseOptions, + columns: this.columns, + data: this.data(), + _rowModels: {}, + })) +} +``` + +### Composing Partial Options + +`tableOptions()` allows you to omit certain required fields (like `data`, `columns`, or `_features`) when creating partial configurations: + +```ts +import { + tableOptions, + tableFeatures, + rowSortingFeature, + columnFilteringFeature, + createSortedRowModel, + createFilteredRowModel, + filterFns, + sortFns, +} from '@tanstack/angular-table' + +// Partial options without data or columns +const featureOptions = tableOptions({ + _features: tableFeatures({ + rowSortingFeature, + columnFilteringFeature, + }), + _rowModels: { + sortedRowModel: createSortedRowModel(sortFns), + filteredRowModel: createFilteredRowModel(filterFns), + }, +}) +``` + +```ts +import { injectTable, tableOptions, createPaginatedRowModel } from '@tanstack/angular-table' + +// Another partial without _features (inherits from spread) +const paginationDefaults = tableOptions({ + _rowModels: { + paginatedRowModel: createPaginatedRowModel(), + }, + initialState: { + pagination: { pageIndex: 0, pageSize: 25 }, + }, +}) + +class TableCmp { + readonly table = injectTable(() => ({ + ...featureOptions, + ...paginationDefaults, + columns: this.columns, + data: this.data(), + })) +} +``` + +### Using with `createTableHook` + +`tableOptions()` pairs well with `createTableHook` for building composable table factories: + +```ts +import { + createTableHook, + tableOptions, + tableFeatures, + rowSortingFeature, + rowPaginationFeature, + createSortedRowModel, + createPaginatedRowModel, + sortFns, +} from '@tanstack/angular-table' + +const sharedOptions = tableOptions({ + _features: tableFeatures({ rowSortingFeature, rowPaginationFeature }), + _rowModels: { + sortedRowModel: createSortedRowModel(sortFns), + paginatedRowModel: createPaginatedRowModel(), + }, +}) + +const { injectAppTable } = createTableHook(sharedOptions) +``` + +--- + +## `createTableHook`: Composable Table Patterns + +**This is an advanced, optional feature.** You don't need to use `createTableHook`—`injectTable` is sufficient for most use cases. + +For applications with multiple tables sharing the same configuration, `createTableHook` lets you define features, row models, and reusable components once. + +For full setup and patterns, see the [Table composition Guide](./table-composition.md). + +--- + +## Other Breaking Changes + +### Column Pinning Option Split + +The `enablePinning` option has been split into separate options: + +```ts +// v8 +enablePinning: true + +// v9 +enableColumnPinning: true +enableRowPinning: true +``` + +### Removed Internal APIs + +All internal APIs prefixed with `_` have been removed. If you were using any of these, use their public equivalents. + +### Column Sizing vs. Column Resizing Split + +In v8, column sizing and resizing were combined in a single feature. In v9, they've been split into separate features for better tree-shaking. + +| v8 | v9 | +|----|-----| +| `ColumnSizing` (combined feature) | `columnSizingFeature` + `columnResizingFeature` | +| `columnSizingInfo` state | `columnResizing` state | +| `setColumnSizingInfo()` | `setColumnResizing()` | +| `onColumnSizingInfoChange` option | `onColumnResizingChange` option | + +If you only need column sizing (fixed widths) without interactive resizing, you can import just `columnSizingFeature`. If you need drag-to-resize functionality, import both. + +### Sorting API Renames + +Sorting-related APIs have been renamed for consistency: + +| v8 | v9 | +|----|-----| +| `sortingFn` (column def option) | `sortFn` | +| `column.getSortingFn()` | `column.getSortFn()` | +| `column.getAutoSortingFn()` | `column.getAutoSortFn()` | +| `SortingFn` type | `SortFn` type | +| `SortingFns` interface | `SortFns` interface | +| `sortingFns` (built-in functions) | `sortFns` | + +Update your column definitions. + +### Row API Changes + +Some row APIs have changed from private to public: + +| v8 | v9 | +|----|-----| +| `row._getAllCellsByColumnId()` (private) | `row.getAllCellsByColumnId()` (public) | + +--- + +## TypeScript Changes Summary + +### Type Generics + +Most types now require a `TFeatures` parameter: + +```txt +// v8 +type Column +type ColumnDef +type Table +type Row +type Cell + +// v9 +type Column +type ColumnDef +type Table +type Row +type Cell +``` + +### Using `typeof _features` + +The easiest way to get the `TFeatures` type is with `typeof`: + +```ts +const _features = tableFeatures({ + rowSortingFeature, + columnFilteringFeature, +}) + +type MyFeatures = typeof _features + +const columns: ColumnDef[] = [...] +``` + +### Using `StockFeatures` + +If using `stockFeatures`, use the `StockFeatures` type: + +```ts +import type { StockFeatures, ColumnDef } from '@tanstack/angular-table' + +const columns: ColumnDef[] = [...] +``` + +### `ColumnMeta` Generic Change + +If you're using module augmentation to extend `ColumnMeta`, note that it now requires a `TFeatures` parameter. + +### `RowData` Type Restriction + +The `RowData` type is now more restrictive. + +--- + +## Migration Checklist + +- [ ] Update your table setup to v9 and define `_features` using `tableFeatures()` (or use `stockFeatures`) +- [ ] Migrate `get*RowModel()` options to `_rowModels` +- [ ] Update row model factories to include `Fns` parameters where needed +- [ ] Update TypeScript types to include `TFeatures` generic +- [ ] Update state access: `table.getState()` → `table.store.state` +- [ ] Update `createColumnHelper()` → `createColumnHelper()` +- [ ] Replace `enablePinning` with `enableColumnPinning`/`enableRowPinning` if used +- [ ] Rename `sortingFn` → `sortFn` in column definitions +- [ ] Split column sizing/resizing: use both `columnSizingFeature` and `columnResizingFeature` if needed +- [ ] Rename `columnSizingInfo` state → `columnResizing` (and related options) +- [ ] Update `ColumnMeta` module augmentation to include `TFeatures` generic (if used) +- [ ] (Optional) Use `tableOptions()` for composable configurations +- [ ] (Optional) Use `createTableHook` for reusable table patterns + +--- + +## Examples + +Check out these examples to see v9 patterns in action: +- [Basic](../examples/basic) +- [Basic (App Table)](../examples/basic-app-table) +- [Filters](../examples/filters) +- [Column Ordering](../examples/column-ordering) +- [Column Pinning](../examples/column-pinning) +- [Column Visibility](../examples/column-visibility) +- [Expanding](../examples/expanding) +- [Grouping](../examples/grouping) +- [Row Selection](../examples/row-selection) +- [Composable Tables](../examples/composable-tables) + + + diff --git a/docs/framework/angular/guide/rendering.md b/docs/framework/angular/guide/rendering.md new file mode 100644 index 0000000000..d4f5e9190b --- /dev/null +++ b/docs/framework/angular/guide/rendering.md @@ -0,0 +1,421 @@ +--- +title: Rendering components +--- + +The `@tanstack/angular-table` adapter provides structural directives and dependency injection primitives for rendering table content in Angular templates. + +## FlexRender + +[`FlexRender`](../reference/variables/FlexRender) is the rendering primitive. +It is exported as a tuple of two directives: + +- [`FlexRenderDirective`](../reference/classes/FlexRenderDirective) — the base structural directive (`*flexRender`) +- [`FlexRenderCell`](../reference/classes/FlexRenderCell.md) — shorthand directives (`*flexRenderCell`, `*flexRenderHeader`, `*flexRenderFooter`) + +Import `FlexRender` to get both: + +```ts +import { Component } from '@angular/core' +import { FlexRender } from '@tanstack/angular-table' + +@Component({ + imports: [FlexRender], + templateUrl: './app.html', +}) +export class AppComponent {} +``` + +### How it works + +`FlexRender` is an Angular **structural directive**. Internally, it resolves the column definition's `header`, `cell`, or `footer` function and renders the result using [`ViewContainerRef`](https://angular.dev/api/core/ViewContainerRef): + +- **Primitives** (`string`, `number`): rendered via `createEmbeddedView` into the host `ng-template`. The value is exposed as the template's implicit context (`let value`). +- **`TemplateRef`**: rendered via `createEmbeddedView`. The render context (`CellContext`, `HeaderContext`) is passed as `$implicit`. +- **`flexRenderComponent(...)`**: rendered via `createComponent` with explicit `inputs`, `outputs`, `bindings`, `directives`, and `injector`. +- **Component type** (`Type`): rendered via [`createComponent`](https://angular.dev/api/core/ViewContainerRef#createComponent). All properties from the render context are set as component inputs through [`ComponentRef.setInput`](https://angular.dev/api/core/ComponentRef#setInput). + +Column definition functions (`header`, `cell`, `footer`) are called inside [`runInInjectionContext`](https://angular.dev/api/core/runInInjectionContext), which means you can call `inject()`, use signals, and access DI tokens directly in your render logic. + +## Cell rendering + +Prefer the shorthand directives for standard rendering: + +| Directive | Input | Column definition | +|---|---|---| +| `*flexRenderCell` | `Cell` | `columnDef.cell` | +| `*flexRenderHeader` | `Header` | `columnDef.header` | +| `*flexRenderFooter` | `Header` | `columnDef.footer` | + +Each shorthand resolves the correct column definition function and render context automatically through a `computed` signal, so no manual `props` mapping is needed. + +### Example + +```html +
+ @if (!header.isPlaceholder) { + + {{ value }} + + } +
+ + {{ value }} + +
+ + + @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) { + + @for (header of headerGroup.headers; track header.id) { + + } + + } + + @for (row of table.getRowModel().rows; track row.id) { + + @for (cell of row.getVisibleCells(); track cell.id) { + + } + + } +
+ +
+ +
+``` + +Any component nested inside a `[tanStackTableCell]` host can inject the cell context: + +```ts +import { Component } from '@angular/core' +import { injectTableCellContext } from '@tanstack/angular-table' + +@Component({ + template: ` + + `, +}) +export class CellActionsComponent { + readonly cell = injectTableCellContext() + + onAction() { + console.log('Cell:', this.cell()) + } +} +``` + +```html + + + + +``` + +Each directive uses Angular's `providers` array to register a factory that reads its own input signal. + +This means the token is scoped to the directive's host element and its descendants. Multiple `[tanStackTableCell]` directives on different elements provide independent contexts. + +### Automatic token injection in FlexRender + +When `FlexRender` renders a component or template, it also provides DI tokens automatically based on the render context shape. In the renderer's `#getInjector` method, if the context object contains `table`, `cell`, or `header` properties, the corresponding `TanStackTableToken`, `TanStackTableCellToken`, or `TanStackTableHeaderToken` tokens are provided in the child injector. + +This means that even **without** the context directives, components rendered via `*flexRender` can use `injectTableContext()`, `injectTableCellContext()`, and `injectTableHeaderContext()`. The context directives are only needed for components that live **outside** the `*flexRender` rendering tree (e.g. sibling components in the same ``). diff --git a/docs/framework/angular/guide/table-composition.md b/docs/framework/angular/guide/table-composition.md new file mode 100644 index 0000000000..f56e9a8520 --- /dev/null +++ b/docs/framework/angular/guide/table-composition.md @@ -0,0 +1,295 @@ +--- +title: Table Composition (createTableHook) +--- + +`createTableHook` is a convenience API for creating reusable, type-safe table configurations with pre-bound components. It is inspired by [TanStack Form's `createFormHook`](https://tanstack.com/form/latest/docs/framework/react/guides/form-composition) — a pattern where you define shared infrastructure once and consume it across your application with minimal boilerplate. + +> **When to use it:** Use `createTableHook` when you have multiple tables that share the same configuration (features, row models, and reusable components). For a single table, `injectTable` is sufficient. + +## Examples + +- [Composable Tables](../examples/composable-tables) — Two tables (Users and Products) sharing the same `createTableHook` configuration, with table/cell/header components, sorting, filtering, and pagination. +- [Basic App Table](../examples/basic-app-table) — Minimal example using `createTableHook` with no pre-bound components. + +### createTableHook + +`createTableHook` centralizes your table configuration into a single factory call. It returns a set of typed functions — `injectAppTable`, `createAppColumnHelper`, and pre-typed injection helpers — that you use instead of the base APIs. + +## Setup + +Call `createTableHook` with your shared configuration and destructure the returned utilities: + +```ts +// table.ts — shared table infrastructure + +import { + createTableHook, + tableFeatures, + columnFilteringFeature, + createFilteredRowModel, + createPaginatedRowModel, + createSortedRowModel, + filterFns, + rowPaginationFeature, + rowSortingFeature, + sortFns, +} from '@tanstack/angular-table' + +import { PaginationControls, RowCount, TableToolbar } from './components/table-components' +import { TextCell, NumberCell, StatusCell, ProgressCell } from './components/cell-components' +import { SortIndicator, ColumnFilter } from './components/header-components' + +export const { + createAppColumnHelper, + injectAppTable, + injectTableContext, + injectTableCellContext, + injectTableHeaderContext, +} = createTableHook({ + // Features and row models are shared across all tables + _features: tableFeatures({ + columnFilteringFeature, + rowPaginationFeature, + rowSortingFeature, + }), + _rowModels: { + sortedRowModel: createSortedRowModel(sortFns), + filteredRowModel: createFilteredRowModel(filterFns), + paginatedRowModel: createPaginatedRowModel(), + }, + // Default table options applied to every table + getRowId: (row) => row.id, + + // Pre-bound component registries + tableComponents: { + PaginationControls, + RowCount, + TableToolbar, + }, + cellComponents: { + TextCell, + NumberCell, + StatusCell, + ProgressCell, + }, + headerComponents: { + SortIndicator, + ColumnFilter, + }, +}) +``` + +This single file becomes the source of truth for your application's table infrastructure. + +## What `createTableHook` returns + +| Export | Description | +|---|---| +| `injectAppTable` | A wrapper around `injectTable` that merges default options and attaches component registries. Returns an `AppAngularTable` with table/cell/header components available directly on the instance. | +| `createAppColumnHelper` | A typed column helper where `cell`, `header`, and `footer` definitions receive enhanced context types with the registered components. | +| `injectTableContext` | Pre-typed `injectTableContext()` bound to your feature set. | +| `injectTableCellContext` | Pre-typed `injectTableCellContext()` bound to your feature set. | +| `injectTableHeaderContext` | Pre-typed `injectTableHeaderContext()` bound to your feature set. | +| `injectFlexRenderCellContext` | Pre-typed `injectFlexRenderContext()` for cell context. | +| `injectFlexRenderHeaderContext` | Pre-typed `injectFlexRenderContext()` for header context. | + +## Component registries + +`createTableHook` accepts three component registries that map string keys to Angular components or render functions: + +### `tableComponents` + +Components that need access to the **table instance**. These are attached directly to the `AppAngularTable` object returned by `injectAppTable`, so you can reference them in templates as `table.PaginationControls`, `table.RowCount`, etc. + +Use `injectTableContext()` inside these components to access the table: + +```ts +@Component({ + selector: 'app-pagination-controls', + template: ` + + `, + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class PaginationControls { + readonly table = injectTableContext() +} +``` + +Render table components via Angular `NgComponentOutlet`: + +```html + + + +``` + +### `cellComponents` + +Components that render **cell content**. These are attached to the `Cell` prototype, so they are available in column definitions through the enhanced `AppCellContext`: + +```ts +const columnHelper = createAppColumnHelper() + +const columns = columnHelper.columns([ + columnHelper.accessor('firstName', { + header: 'First Name', + cell: ({ cell }) => cell.TextCell, + }), + columnHelper.accessor('age', { + header: 'Age', + cell: ({ cell }) => cell.NumberCell, + }), + columnHelper.accessor('status', { + header: 'Status', + cell: ({ cell }) => cell.StatusCell, + }), +]) +``` + +Use `injectTableCellContext()` or `injectFlexRenderContext()` inside cell components: + +```ts +@Component({ + selector: 'span', + template: `{{ cell().getValue() }}`, +}) +export class TextCell { + readonly cell = injectTableCellContext() +} +``` + +### `headerComponents` + +Components or render functions that render **header/footer content**. These are attached to the `Header` prototype and available through the enhanced `AppHeaderContext`: + +```ts +// Render functions work too — they run in injection context +export function SortIndicator(): string | null { + const header = injectTableHeaderContext() + const sorted = header().column.getIsSorted() + if (!sorted) return null + return sorted === 'asc' ? '🔼' : '🔽' +} +``` + +Access header components in the template via `table.appHeader(header)`: + +```html +@for (_header of headerGroup.headers; track _header.id) { + @let header = table.appHeader(_header); + + {{ value }} + +
+
+ +} +``` + +## Using `injectAppTable` + +`injectAppTable` is a wrapper around `injectTable`. It merges the default options from `createTableHook` with the per-table options, and returns an `AppAngularTable` — the standard table instance augmented with: + +- **Table components** directly on the table object (`table.PaginationControls`, `table.TableToolbar`, etc.) +- **`table.appCell(cell)`** — utility type functions for templates that wraps a `Cell` with the registered `cellComponents` +- **`table.appHeader(header)`** — utility type functions for templates that wraps a `Header` with the registered `headerComponents` +- **`table.appFooter(footer)`** — utility type functions for templates that wraps a `Header` (footer) with the registered `headerComponents` + +You do not need to pass `_features` or `_rowModels` — they are inherited from the hook configuration: + +```ts +@Component({ + selector: 'users-table', + templateUrl: './users-table.html', + imports: [FlexRender, TanStackTable, TanStackTableHeader, TanStackTableCell, NgComponentOutlet], + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class UsersTable { + readonly data = signal(makeData(100)) + + readonly columns = columnHelper.columns([ + columnHelper.accessor('firstName', { + header: 'First Name', + cell: ({ cell }) => cell.TextCell, + }), + // ... + ]) + + // No need to specify _features, _rowModels, ... — they come from createTableHook + table = injectAppTable(() => ({ + columns: this.columns, + data: this.data(), + })) +} +``` + +## Using `createAppColumnHelper` + +`createAppColumnHelper()` returns a column helper identical to `createColumnHelper` at runtime, but with enhanced types: the `cell`, `header`, and `footer` definition callbacks receive `AppCellContext` / `AppHeaderContext` instead of the base context types. + +This means TypeScript knows about your registered components and provides autocompletion: + +```ts +const columnHelper = createAppColumnHelper() + +columnHelper.accessor('firstName', { + cell: ({ cell }) => { + // ✅ TypeScript knows about TextCell, NumberCell, StatusCell, etc. + return cell.TextCell + }, + header: ({ header }) => { + // ✅ TypeScript knows about SortIndicator, ColumnFilter, etc. + return flexRenderComponent(header.SortIndicator) + }, +}) +``` + +You can also use `flexRenderComponent(...)` to wrap the component with custom inputs/outputs: + +```ts +columnHelper.accessor('firstName', { + cell: ({ cell }) => flexRenderComponent(cell.TextCell), + footer: ({ header }) => flexRenderComponent(header.FooterColumnId), +}) +``` + +## Multiple table configurations + +You can call `createTableHook` multiple times to create different table configurations for different parts of your application. Each call returns an independent set of utilities with its own feature set and component registries: + +```ts +// admin-table.ts — tables with editing capabilities +export const { + injectAppTable: injectAdminTable, + createAppColumnHelper: createAdminColumnHelper, +} = createTableHook({ + _features: tableFeatures({ rowSortingFeature, columnFilteringFeature }), + _rowModels: { /* ... */ }, + cellComponents: { EditableCell, DeleteButton }, +}) + +// readonly-table.ts — simpler read-only tables +export const { + injectAppTable: injectReadonlyTable, + createAppColumnHelper: createReadonlyColumnHelper, +} = createTableHook({ + _features: tableFeatures({ rowSortingFeature }), + _rowModels: { /* ... */ }, + cellComponents: { TextCell, NumberCell }, +}) +``` + +## Examples + +- [Composable Tables](../examples/composable-tables) — Full example with two tables sharing the same `createTableHook` configuration. +- [Basic App Table](../examples/basic-app-table) — Minimal example with no pre-bound components. diff --git a/docs/framework/angular/guide/table-state.md b/docs/framework/angular/guide/table-state.md new file mode 100644 index 0000000000..100e5fd601 --- /dev/null +++ b/docs/framework/angular/guide/table-state.md @@ -0,0 +1,217 @@ +--- +title: Table State (Angular) Guide +--- + +## Table State (Angular) Guide + +TanStack Table has a simple underlying internal state management system to store and manage the state of the table. It also lets you selectively pull out any state that you need to manage in your own state management. This guide will walk you through the different ways in which you can interact with and manage the state of the table. + +### Accessing Table State + +You do not need to set up anything special in order for the table state to work. If you pass nothing into either `state`, `initialState`, or any of the `on[State]Change` table options, the table will manage its own state internally. You can access any part of this internal state by using the `table.store.state` table instance API. + +```ts +table = injectTable(() => ({ + columns: this.columns, + data: this.data(), + //... +})) + +someHandler() { + console.log(this.table.store.state) //access the entire internal state + console.log(this.table.store.state.rowSelection) //access just the row selection state +} +``` + +### Custom Initial State + +If all you need to do for certain states is customize their initial default values, you still do not need to manage any of the state yourself. You can simply set values in the `initialState` option of the table instance. + +```jsx +table = injectTable(() => ({ + columns: this.columns, + data: this.data(), + initialState: { + columnOrder: ['age', 'firstName', 'lastName'], //customize the initial column order + columnVisibility: { + id: false //hide the id column by default + }, + expanded: true, //expand all rows by default + sorting: [ + { + id: 'age', + desc: true //sort by age in descending order by default + } + ] + }, + //... +})) +``` + +> **Note**: Only specify each particular state in either `initialState` or `state`, but not both. If you pass in a particular state value to both `initialState` and `state`, the initialized state in `state` will take overwrite any corresponding value in `initialState`. + +### Controlled State + +If you need easy access to the table state in other areas of your application, TanStack Table makes it easy to control and manage any or all of the table state in your own state management system. You can do this by passing in your own state and state management functions to the `state` and `on[State]Change` table options. + +#### Individual Controlled State + +You can control just the state that you need easy access to. You do NOT have to control all of the table state if you do not need to. It is recommended to only control the state that you need on a case-by-case basis. + +In order to control a particular state, you need to both pass in the corresponding `state` value and the `on[State]Change` function to the table instance. + +Let's take filtering, sorting, and pagination as an example in a "manual" server-side data fetching scenario. You can store the filtering, sorting, and pagination state in your own state management, but leave out any other state like column order, column visibility, etc. if your API does not care about those values. + +```ts +import {signal} from '@angular/core'; +import {SortingState, ColumnFiltersState, PaginationState} from '@tanstack/angular-table' +import {toObservable} from "@angular/core/rxjs-interop"; +import {combineLatest, switchMap} from 'rxjs'; + +class TableComponent { + readonly columnFilters = signal([]) //no default filters + readonly sorting = signal([ + { + id: 'age', + desc: true, //sort by age in descending order by default + } + ]) + readonly pagination = signal({ + pageIndex: 0, + pageSize: 15 + }) + + //Use our controlled state values to fetch data + readonly data$ = combineLatest({ + filters: toObservable(this.columnFilters), + sorting: toObservable(this.sorting), + pagination: toObservable(this.pagination) + }).pipe( + switchMap(({filters, sorting, pagination}) => fetchData(filters, sorting, pagination)) + ) + readonly data = toSignal(this.data$); + + readonly table = injectTable(() => ({ + columns: this.columns, + data: this.data(), + //... + state: { + columnFilters: this.columnFilters(), //pass controlled state back to the table (overrides internal state) + sorting: this.sorting(), + pagination: this.pagination(), + }, + onColumnFiltersChange: updater => { //hoist columnFilters state into our own state management + updater instanceof Function + ? this.columnFilters.update(updater) + : this.columnFilters.set(updater) + }, + onSortingChange: updater => { + updater instanceof Function + ? this.sorting.update(updater) + : this.sorting.set(updater) + }, + onPaginationChange: updater => { + updater instanceof Function + ? this.pagination.update(updater) + : this.pagination.set(updater) + }, + })) +} + +//... +``` + +#### Fully Controlled State + +Alternatively, you can control the entire table state with the `onStateChange` table option. It will hoist out the entire table state into your own state management system. Be careful with this approach, as you might find that raising some frequently changing state values up a component tree, like `columnSizingInfo` state`, might cause bad performance issues. + +A couple of more tricks may be needed to make this work. If you use the `onStateChange` table option, the initial values of the `state` must be populated with all of the relevant state values for all of the features that you want to use. You can either manually type out all of the initial state values, or use a constructor in a special way as shown below. + +```ts + + +class TableComponent { + // create an empty table state, we'll override it later + readonly state = signal({} as TableState); + + // create a table instance with default state values + readonly table = injectTable(() => ({ + columns: this.columns, + data: this.data(), + // our fully controlled state overrides the internal state + state: this.state(), + onStateChange: updater => { + // any state changes will be pushed up to our own state management + this.state.set( + updater instanceof Function ? updater(this.state()) : updater + ) + } + })) + + constructor() { + // set the initial table state + this.state.set({ + // populate the initial state with all of the default state values + // from the table instance + ...this.table.initialState, + pagination: { + pageIndex: 0, + pageSize: 15, // optionally customize the initial pagination state. + }, + }) + } +} +``` + +### On State Change Callbacks + +So far, we have seen the `on[State]Change` and `onStateChange` table options work to "hoist" the table state changes into our own state management. However, there are a few things about these using these options that you should be aware of. + +#### 1. **State Change Callbacks MUST have their corresponding state value in the `state` option**. + +Specifying an `on[State]Change` callback tells the table instance that this will be a controlled state. If you do not specify the corresponding `state` value, that state will be "frozen" with its initial value. + +```ts +class TableComponent { + sorting = signal([]) + + table = injectTable(() => ({ + columns: this.columns, + data: this.data(), + //... + state: { + sorting: this.sorting(), // required because we are using `onSortingChange` + }, + onSortingChange: updater => { // makes the `state.sorting` controlled + updater instanceof Function + ? this.sorting.update(updater) + : this.sorting.set(updater) + } + })) +} +``` + +#### 2. **Updaters can either be raw values or callback functions**. + +The `on[State]Change` and `onStateChange` callbacks work exactly like the `setState` functions in React. The updater values can either be a new state value or a callback function that takes the previous state value and returns the new state value. + +What implications does this have? It means that if you want to add in some extra logic in any of the `on[State]Change` callbacks, you can do so, but you need to check whether or not the new incoming updater value is a function or value. + +This is why you will see the `updater instanceof Function ? this.state.update(updater) : this.state.set(updater)` pattern in the examples above. This pattern checks if the updater is a function, and if it is, it calls the function with the previous state value to get the new state value, or the signal will require `signal.update` to be called with the updater instead of `signal.set`. + +### State Types + +All complex states in TanStack Table have their own TypeScript types that you can import and use. This can be handy for ensuring that you are using the correct data structures and properties for the state values that you are controlling. + +```ts +import {injectTable, type SortingState} from '@tanstack/angular-table' + +class TableComponent { + readonly sorting = signal([ + { + id: 'age', // you should get autocomplete for the `id` and `desc` properties + desc: true, + } + ]) +} +``` diff --git a/docs/framework/angular/reference/classes/FlexRenderCell.md b/docs/framework/angular/reference/classes/FlexRenderCell.md new file mode 100644 index 0000000000..b54ae8577e --- /dev/null +++ b/docs/framework/angular/reference/classes/FlexRenderCell.md @@ -0,0 +1,101 @@ +--- +id: FlexRenderCell +title: FlexRenderCell +--- + +# Class: FlexRenderCell\ + +Defined in: [helpers/flexRenderCell.ts:62](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/flexRenderCell.ts#L62) + +Simplified directive wrapper of `*flexRender`. + +Use this utility component to render headers, cells, or footers with custom markup. + +Only one prop (`cell`, `header`, or `footer`) may be passed based on the used selector. + +## Examples + +```html +{{cell}} +{{header}} +{{footer}} +``` + +This replaces calling `*flexRender` directly like this: +```html +{{cell}} +{{header}} +{{footer}} +``` + +Can be imported through FlexRenderCell or [FlexRender](../variables/FlexRender.md) import, +which the latter is preferred. + +```ts +import {FlexRender} from '@tanstack/angular-table + +@Component({ + // ... + imports: [ + FlexRender + ] +}) +``` + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TData + +`TData` *extends* `RowData` + +### TValue + +`TValue` *extends* `CellData` + +## Constructors + +### Constructor + +```ts +new FlexRenderCell(): FlexRenderCell; +``` + +Defined in: [helpers/flexRenderCell.ts:118](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/flexRenderCell.ts#L118) + +#### Returns + +`FlexRenderCell`\<`TFeatures`, `TData`, `TValue`\> + +## Properties + +### cell + +```ts +readonly cell: InputSignal | undefined>; +``` + +Defined in: [helpers/flexRenderCell.ts:67](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/flexRenderCell.ts#L67) + +*** + +### footer + +```ts +readonly footer: InputSignal | undefined>; +``` + +Defined in: [helpers/flexRenderCell.ts:75](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/flexRenderCell.ts#L75) + +*** + +### header + +```ts +readonly header: InputSignal | undefined>; +``` + +Defined in: [helpers/flexRenderCell.ts:71](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/flexRenderCell.ts#L71) diff --git a/docs/framework/angular/reference/classes/FlexRenderComponentInstance.md b/docs/framework/angular/reference/classes/FlexRenderComponentInstance.md new file mode 100644 index 0000000000..7e79c0a0a4 --- /dev/null +++ b/docs/framework/angular/reference/classes/FlexRenderComponentInstance.md @@ -0,0 +1,230 @@ +--- +id: FlexRenderComponentInstance +title: FlexRenderComponentInstance +--- + +# Class: FlexRenderComponentInstance\ + +Defined in: [flex-render/flexRenderComponent.ts:259](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L259) + +Wrapper class for a component that will be used as content for [FlexRenderDirective](FlexRenderDirective.md) + +Prefer [flexRenderComponent](../functions/flexRenderComponent.md) helper for better type-safety + +## Type Parameters + +### TComponent + +`TComponent` = `any` + +## Implements + +- [`FlexRenderComponent`](../interfaces/FlexRenderComponent.md)\<`TComponent`\> + +## Constructors + +### Constructor + +```ts +new FlexRenderComponentInstance( + component, + inputs?, + injector?, + outputs?, + directives?, +bindings?): FlexRenderComponentInstance; +``` + +Defined in: [flex-render/flexRenderComponent.ts:266](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L266) + +#### Parameters + +##### component + +`Type`\<`TComponent`\> + +##### inputs? + +`Inputs`\<`TComponent`\> + +##### injector? + +`Injector` + +##### outputs? + +`Outputs`\<`TComponent`\> + +##### directives? + +(`Type`\<`unknown`\> \| `DirectiveWithBindings`\<`unknown`\>)[] + +##### bindings? + +`Binding`[] + +#### Returns + +`FlexRenderComponentInstance`\<`TComponent`\> + +## Properties + +### allowedInputNames + +```ts +readonly allowedInputNames: string[] = []; +``` + +Defined in: [flex-render/flexRenderComponent.ts:263](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L263) + +List of allowed input names. + +#### Implementation of + +[`FlexRenderComponent`](../interfaces/FlexRenderComponent.md).[`allowedInputNames`](../interfaces/FlexRenderComponent.md#allowedinputnames) + +*** + +### allowedOutputNames + +```ts +readonly allowedOutputNames: string[] = []; +``` + +Defined in: [flex-render/flexRenderComponent.ts:264](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L264) + +List of allowed output names. + +#### Implementation of + +[`FlexRenderComponent`](../interfaces/FlexRenderComponent.md).[`allowedOutputNames`](../interfaces/FlexRenderComponent.md#allowedoutputnames) + +*** + +### bindings? + +```ts +readonly optional bindings: Binding[]; +``` + +Defined in: [flex-render/flexRenderComponent.ts:272](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L272) + +Bindings to apply to the root component + +#### See + +FlexRenderOptions#bindings + +#### Implementation of + +[`FlexRenderComponent`](../interfaces/FlexRenderComponent.md).[`bindings`](../interfaces/FlexRenderComponent.md#bindings) + +*** + +### component + +```ts +readonly component: Type; +``` + +Defined in: [flex-render/flexRenderComponent.ts:267](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L267) + +The component type + +#### Implementation of + +[`FlexRenderComponent`](../interfaces/FlexRenderComponent.md).[`component`](../interfaces/FlexRenderComponent.md#component) + +*** + +### directives? + +```ts +readonly optional directives: (Type | DirectiveWithBindings)[]; +``` + +Defined in: [flex-render/flexRenderComponent.ts:271](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L271) + +Directives that should be applied to the component. + +#### See + +#### Implementation of + +[`FlexRenderComponent`](../interfaces/FlexRenderComponent.md).[`directives`](../interfaces/FlexRenderComponent.md#directives) + +*** + +### injector? + +```ts +readonly optional injector: Injector; +``` + +Defined in: [flex-render/flexRenderComponent.ts:269](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L269) + +Optional Injector that will be used when rendering the component. + +#### See + +FlexRenderOptions#injector + +#### Implementation of + +[`FlexRenderComponent`](../interfaces/FlexRenderComponent.md).[`injector`](../interfaces/FlexRenderComponent.md#injector) + +*** + +### inputs? + +```ts +readonly optional inputs: Inputs; +``` + +Defined in: [flex-render/flexRenderComponent.ts:268](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L268) + +Component instance inputs. Set via [componentRef.setInput API](https://angular.dev/api/core/ComponentRef#setInput)) + +#### See + +FlexRenderOptions#inputs + +#### Implementation of + +[`FlexRenderComponent`](../interfaces/FlexRenderComponent.md).[`inputs`](../interfaces/FlexRenderComponent.md#inputs) + +*** + +### mirror + +```ts +readonly mirror: ComponentMirror; +``` + +Defined in: [flex-render/flexRenderComponent.ts:262](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L262) + +Reflected metadata about the component. + +#### Implementation of + +[`FlexRenderComponent`](../interfaces/FlexRenderComponent.md).[`mirror`](../interfaces/FlexRenderComponent.md#mirror) + +*** + +### outputs? + +```ts +readonly optional outputs: Outputs; +``` + +Defined in: [flex-render/flexRenderComponent.ts:270](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L270) + +Component instance outputs. Subscribed via OutputEmitterRef#subscribe + +#### See + +FlexRenderOptions#outputs + +#### Implementation of + +[`FlexRenderComponent`](../interfaces/FlexRenderComponent.md).[`outputs`](../interfaces/FlexRenderComponent.md#outputs) diff --git a/docs/framework/angular/reference/classes/FlexRenderDirective.md b/docs/framework/angular/reference/classes/FlexRenderDirective.md new file mode 100644 index 0000000000..386aba706f --- /dev/null +++ b/docs/framework/angular/reference/classes/FlexRenderDirective.md @@ -0,0 +1,121 @@ +--- +id: FlexRenderDirective +title: FlexRenderDirective +--- + +# Class: FlexRenderDirective\ + +Defined in: [flexRender.ts:84](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flexRender.ts#L84) + +Use this utility directive to render headers, cells, or footers with custom markup. + +Note: If you are rendering cell, header, or footer without custom context or other props, +you can use the [FlexRenderCell](FlexRenderCell.md) directive as shorthand instead . + +## Example + +```ts +import {FlexRender} from '@tanstack/angular-table'; + +@Component({ + imports: [FlexRender], + template: ` + + {{cell}} + + + + {{header}} + + + + {{footer}} + + `, +}) +class App { +} +``` + +Can be imported through FlexRenderDirective or [FlexRender](../variables/FlexRender.md) import, +which the latter is preferred. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TRowData + +`TRowData` *extends* `RowData` + +### TValue + +`TValue` *extends* `CellData` + +### TProps + +`TProps` *extends* + \| `NonNullable`\<`unknown`\> + \| `CellContext`\<`TFeatures`, `TRowData`, `TValue`\> + \| `HeaderContext`\<`TFeatures`, `TRowData`, `TValue`\> + +## Constructors + +### Constructor + +```ts +new FlexRenderDirective(): FlexRenderDirective; +``` + +Defined in: [flexRender.ts:109](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flexRender.ts#L109) + +#### Returns + +`FlexRenderDirective`\<`TFeatures`, `TRowData`, `TValue`, `TProps`\> + +## Properties + +### content + +```ts +readonly content: InputSignal>; +``` + +Defined in: [flexRender.ts:93](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flexRender.ts#L93) + +*** + +### injector + +```ts +readonly injector: InputSignal; +``` + +Defined in: [flexRender.ts:102](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flexRender.ts#L102) + +*** + +### props + +```ts +readonly props: InputSignal; +``` + +Defined in: [flexRender.ts:98](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flexRender.ts#L98) diff --git a/docs/framework/angular/reference/classes/TanStackTable.md b/docs/framework/angular/reference/classes/TanStackTable.md new file mode 100644 index 0000000000..5758e49247 --- /dev/null +++ b/docs/framework/angular/reference/classes/TanStackTable.md @@ -0,0 +1,82 @@ +--- +id: TanStackTable +title: TanStackTable +--- + +# Class: TanStackTable\ + +Defined in: [helpers/table.ts:59](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/table.ts#L59) + +Provides a TanStack Table instance (`AngularTable`) in Angular DI. + +The table can be injected by: +- any descendant of an element using `[tanStackTable]="..."` +- any component instantiated by `*flexRender` when the render props contains `table` + +## Example + +```html +
+ +
+``` + +```ts +@Component({ + selector: 'app-pagination', + template: ` + + + `, +}) +export class PaginationComponent { + readonly table = injectTableContext() + + prev() { + this.table().previousPage() + } + next() { + this.table().nextPage() + } +} +``` + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TData + +`TData` *extends* `RowData` + +### TSelected + +`TSelected` *extends* `object` = `TableState`\<`TFeatures`\> + +## Constructors + +### Constructor + +```ts +new TanStackTable(): TanStackTable; +``` + +#### Returns + +`TanStackTable`\<`TFeatures`, `TData`, `TSelected`\> + +## Properties + +### table + +```ts +readonly table: InputSignal>; +``` + +Defined in: [helpers/table.ts:69](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/table.ts#L69) + +The current TanStack Table instance. + +Provided as a required signal input so DI consumers always read the latest value. diff --git a/docs/framework/angular/reference/classes/TanStackTableCell.md b/docs/framework/angular/reference/classes/TanStackTableCell.md new file mode 100644 index 0000000000..985d1475de --- /dev/null +++ b/docs/framework/angular/reference/classes/TanStackTableCell.md @@ -0,0 +1,92 @@ +--- +id: TanStackTableCell +title: TanStackTableCell +--- + +# Class: TanStackTableCell\ + +Defined in: [helpers/cell.ts:76](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/cell.ts#L76) + +Provides a TanStack Table `Cell` instance in Angular DI. + +The cell can be injected by: +- any descendant of an element using `[tanStackTableCell]="..."` +- any component instantiated by `*flexRender` when the render props contains `cell` + +## Examples + +Inject from the nearest `[tanStackTableCell]`: +```html + + + +``` + +```ts +@Component({ + selector: 'app-cell-actions', + template: `{{ cell().id }}`, +}) +export class CellActionsComponent { + readonly cell = injectTableCellContext() +} +``` + +Inject inside a component rendered via `flexRender`: +```ts +@Component({ + selector: 'app-price-cell', + template: `{{ cell().getValue() }}`, +}) +export class PriceCellComponent { + readonly cell = injectTableCellContext() +} +``` + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TData + +`TData` *extends* `RowData` + +### TValue + +`TValue` *extends* `CellData` + +## Implements + +- [`TanStackTableCellContext`](../interfaces/TanStackTableCellContext.md)\<`TFeatures`, `TData`, `TValue`\> + +## Constructors + +### Constructor + +```ts +new TanStackTableCell(): TanStackTableCell; +``` + +#### Returns + +`TanStackTableCell`\<`TFeatures`, `TData`, `TValue`\> + +## Properties + +### cell + +```ts +readonly cell: InputSignal>; +``` + +Defined in: [helpers/cell.ts:86](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/cell.ts#L86) + +The current TanStack Table cell. + +Provided as a required signal input so DI consumers always read the latest value. + +#### Implementation of + +[`TanStackTableCellContext`](../interfaces/TanStackTableCellContext.md).[`cell`](../interfaces/TanStackTableCellContext.md#cell) diff --git a/docs/framework/angular/reference/classes/TanStackTableHeader.md b/docs/framework/angular/reference/classes/TanStackTableHeader.md new file mode 100644 index 0000000000..1f1e81e94e --- /dev/null +++ b/docs/framework/angular/reference/classes/TanStackTableHeader.md @@ -0,0 +1,88 @@ +--- +id: TanStackTableHeader +title: TanStackTableHeader +--- + +# Class: TanStackTableHeader\ + +Defined in: [helpers/header.ts:71](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/header.ts#L71) + +Provides a TanStack Table `Header` instance in Angular DI. + +The header can be injected by: +- any descendant of an element using `[tanStackTableHeader]="..."` +- any component instantiated by `*flexRender` when the render props contains `header` + +## Example + +```html + + + +``` + +```ts +@Component({ + selector: 'app-sort-indicator', + template: ` + + `, +}) +export class SortIndicatorComponent { + readonly header = injectTableHeaderContext() + + toggle() { + this.header().column.toggleSorting() + } +} +``` + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TData + +`TData` *extends* `RowData` + +### TValue + +`TValue` *extends* `CellData` + +## Implements + +- [`TanStackTableHeaderContext`](../interfaces/TanStackTableHeaderContext.md)\<`TFeatures`, `TData`, `TValue`\> + +## Constructors + +### Constructor + +```ts +new TanStackTableHeader(): TanStackTableHeader; +``` + +#### Returns + +`TanStackTableHeader`\<`TFeatures`, `TData`, `TValue`\> + +## Properties + +### header + +```ts +readonly header: InputSignal>; +``` + +Defined in: [helpers/header.ts:81](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/header.ts#L81) + +The current TanStack Table header. + +Provided as a required signal input so DI consumers always read the latest value. + +#### Implementation of + +[`TanStackTableHeaderContext`](../interfaces/TanStackTableHeaderContext.md).[`header`](../interfaces/TanStackTableHeaderContext.md#header) diff --git a/docs/framework/angular/reference/functions/createTableHook.md b/docs/framework/angular/reference/functions/createTableHook.md new file mode 100644 index 0000000000..077a4edbfe --- /dev/null +++ b/docs/framework/angular/reference/functions/createTableHook.md @@ -0,0 +1,40 @@ +--- +id: createTableHook +title: createTableHook +--- + +# Function: createTableHook() + +```ts +function createTableHook(__namedParameters): CreateTableHookResult; +``` + +Defined in: [helpers/createTableHook.ts:352](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L352) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TTableComponents + +`TTableComponents` *extends* `Record`\<`string`, `RenderableComponent`\> + +### TCellComponents + +`TCellComponents` *extends* `Record`\<`string`, `RenderableComponent`\> + +### THeaderComponents + +`THeaderComponents` *extends* `Record`\<`string`, `RenderableComponent`\> + +## Parameters + +### \_\_namedParameters + +[`CreateTableContextOptions`](../type-aliases/CreateTableContextOptions.md)\<`TFeatures`, `TTableComponents`, `TCellComponents`, `THeaderComponents`\> + +## Returns + +[`CreateTableHookResult`](../type-aliases/CreateTableHookResult.md)\<`TFeatures`, `TTableComponents`, `TCellComponents`, `THeaderComponents`\> diff --git a/docs/framework/angular/reference/functions/flexRenderComponent.md b/docs/framework/angular/reference/functions/flexRenderComponent.md new file mode 100644 index 0000000000..b1ba5e998a --- /dev/null +++ b/docs/framework/angular/reference/functions/flexRenderComponent.md @@ -0,0 +1,59 @@ +--- +id: flexRenderComponent +title: flexRenderComponent +--- + +# Function: flexRenderComponent() + +```ts +function flexRenderComponent(component, options?): FlexRenderComponent; +``` + +Defined in: [flex-render/flexRenderComponent.ts:150](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L150) + +Helper function to create a [FlexRenderComponent](../interfaces/FlexRenderComponent.md) instance, with better type-safety. + +## Type Parameters + +### TComponent + +`TComponent` = `any` + +## Parameters + +### component + +`Type`\<`TComponent`\> + +### options? + +`FlexRenderOptions`\<`Inputs`\<`TComponent`\>, `Outputs`\<`TComponent`\>\> + +## Returns + +[`FlexRenderComponent`](../interfaces/FlexRenderComponent.md)\<`TComponent`\> + +## Example + +```ts +import {flexRenderComponent} from '@tanstack/angular-table' +import {inputBinding, outputBinding} from '@angular/core'; + +const columns = [ + { + cell: ({ row }) => { + return flexRenderComponent(MyComponent, { + inputs: { value: mySignalValue() }, + outputs: { valueChange: (val) => {} } + // or using angular native createComponent#binding api + bindings: [ + inputBinding('value', mySignalValue), + outputBinding('valueChange', value => { + console.log("my value changed to", value) + }) + ] + }) + }, + }, +] +``` diff --git a/docs/framework/angular/reference/functions/injectFlexRenderContext.md b/docs/framework/angular/reference/functions/injectFlexRenderContext.md new file mode 100644 index 0000000000..18aabf7488 --- /dev/null +++ b/docs/framework/angular/reference/functions/injectFlexRenderContext.md @@ -0,0 +1,26 @@ +--- +id: injectFlexRenderContext +title: injectFlexRenderContext +--- + +# Function: injectFlexRenderContext() + +```ts +function injectFlexRenderContext(): T; +``` + +Defined in: [flex-render/context.ts:12](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/context.ts#L12) + +Inject the flex render context props. + +Can be used in components rendered via FlexRender directives. + +## Type Parameters + +### T + +`T` *extends* `object` + +## Returns + +`T` diff --git a/docs/framework/angular/reference/functions/injectTable.md b/docs/framework/angular/reference/functions/injectTable.md new file mode 100644 index 0000000000..052fe88913 --- /dev/null +++ b/docs/framework/angular/reference/functions/injectTable.md @@ -0,0 +1,96 @@ +--- +id: injectTable +title: injectTable +--- + +# Function: injectTable() + +```ts +function injectTable(options, selector): AngularTable; +``` + +Defined in: [injectTable.ts:95](https://github.com/TanStack/table/blob/main/packages/angular-table/src/injectTable.ts#L95) + +Creates and returns an Angular-reactive table instance. + +The initializer is intentionally re-evaluated whenever any signal read inside it changes. +This is how the adapter keeps the table in sync with Angular's reactivity model. + +Because of that behavior, keep expensive/static values (for example `columns`, feature setup, row models) +as stable references outside the initializer, and only read reactive state (`data()`, pagination/filter/sorting signals, etc.) +inside it. + +The returned table is also signal-reactive: table state and table APIs are wired for Angular signals, so you can safely consume table methods inside `computed(...)` and `effect(...)`. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TData + +`TData` *extends* `RowData` + +### TSelected + +`TSelected` = `TableState`\<`TFeatures`\> + +## Parameters + +### options + +() => `TableOptions`\<`TFeatures`, `TData`\> + +### selector + +(`state`) => `TSelected` + +## Returns + +[`AngularTable`](../type-aliases/AngularTable.md)\<`TFeatures`, `TData`, `TSelected`\> + +An Angular-reactive TanStack Table instance. + +## Example + +1. Register the table features you need +```ts +// Register only the features you need +import {tableFeatures, rowPaginationFeature} from '@tanstack/angular-table'; +const _features = tableFeatures({ + rowPaginationFeature, + // ...all other features you need +}) + +// Use all table core features +import {stockFeatures} from '@tanstack/angular-table'; +const _features = tableFeatures(stockFeatures); +``` +2. Prepare the table columns +```ts +import {ColumnDef} from '@tanstack/angular-table'; + +type MyData = {} + +const columns: ColumnDef[] = [ + // ...column definitions +] + +// or using createColumnHelper +import {createColumnHelper} from '@tanstack/angular-table'; +const columnHelper = createColumnHelper(); +const columns = columnHelper.columns([ + columnHelper.accessor(...), + // ...other columns +]) +``` +3. Create the table instance with `injectTable` +```ts +const table = injectTable(() => { + // ...table options, + _features, + columns: columns, + data: myDataSignal(), +}) +``` diff --git a/docs/framework/angular/reference/functions/injectTableCellContext.md b/docs/framework/angular/reference/functions/injectTableCellContext.md new file mode 100644 index 0000000000..99202b535d --- /dev/null +++ b/docs/framework/angular/reference/functions/injectTableCellContext.md @@ -0,0 +1,36 @@ +--- +id: injectTableCellContext +title: injectTableCellContext +--- + +# Function: injectTableCellContext() + +```ts +function injectTableCellContext(): Signal>; +``` + +Defined in: [helpers/cell.ts:98](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/cell.ts#L98) + +Injects the current TanStack Table cell signal. + +Available when: +- there is a nearest `[tanStackTableCell]` directive in the DI tree, or +- the caller is rendered via `*flexRender` with render props containing `cell` + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TData + +`TData` *extends* `RowData` + +### TValue + +`TValue` *extends* `unknown` + +## Returns + +`Signal`\<`Cell`\<`TFeatures`, `TData`, `TValue`\>\> diff --git a/docs/framework/angular/reference/functions/injectTableContext.md b/docs/framework/angular/reference/functions/injectTableContext.md new file mode 100644 index 0000000000..26356df147 --- /dev/null +++ b/docs/framework/angular/reference/functions/injectTableContext.md @@ -0,0 +1,36 @@ +--- +id: injectTableContext +title: injectTableContext +--- + +# Function: injectTableContext() + +```ts +function injectTableContext(): Signal>; +``` + +Defined in: [helpers/table.ts:81](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/table.ts#L81) + +Injects the current TanStack Table instance signal. + +Available when: +- there is a nearest `[tanStackTable]` directive in the DI tree, or +- the caller is rendered via `*flexRender` with render props containing `table` + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TData + +`TData` *extends* `RowData` + +### TSelected + +`TSelected` *extends* `object` = `TableState`\<`TFeatures`\> + +## Returns + +`Signal`\<[`AngularTable`](../type-aliases/AngularTable.md)\<`TFeatures`, `TData`, `TSelected`\>\> diff --git a/docs/framework/angular/reference/functions/injectTableHeaderContext.md b/docs/framework/angular/reference/functions/injectTableHeaderContext.md new file mode 100644 index 0000000000..0b3981453a --- /dev/null +++ b/docs/framework/angular/reference/functions/injectTableHeaderContext.md @@ -0,0 +1,36 @@ +--- +id: injectTableHeaderContext +title: injectTableHeaderContext +--- + +# Function: injectTableHeaderContext() + +```ts +function injectTableHeaderContext(): Signal>; +``` + +Defined in: [helpers/header.ts:93](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/header.ts#L93) + +Injects the current TanStack Table header signal. + +Available when: +- there is a nearest `[tanStackTableHeader]` directive in the DI tree, or +- the caller is rendered via `*flexRender` with render props containing `header` + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TData + +`TData` *extends* `RowData` + +### TValue + +`TValue` *extends* `unknown` + +## Returns + +`Signal`\<`Header`\<`TFeatures`, `TData`, `TValue`\>\> diff --git a/docs/framework/angular/reference/index.md b/docs/framework/angular/reference/index.md new file mode 100644 index 0000000000..738b405004 --- /dev/null +++ b/docs/framework/angular/reference/index.md @@ -0,0 +1,52 @@ +--- +id: "@tanstack/angular-table" +title: "@tanstack/angular-table" +--- + +# @tanstack/angular-table + +## Classes + +- [FlexRenderCell](classes/FlexRenderCell.md) +- [FlexRenderComponentInstance](classes/FlexRenderComponentInstance.md) +- [FlexRenderDirective](classes/FlexRenderDirective.md) +- [TanStackTable](classes/TanStackTable.md) +- [TanStackTableCell](classes/TanStackTableCell.md) +- [TanStackTableHeader](classes/TanStackTableHeader.md) + +## Interfaces + +- [AngularReactivityFlags](interfaces/AngularReactivityFlags.md) +- [FlexRenderComponent](interfaces/FlexRenderComponent.md) +- [TanStackTableCellContext](interfaces/TanStackTableCellContext.md) +- [TanStackTableHeaderContext](interfaces/TanStackTableHeaderContext.md) + +## Type Aliases + +- [AngularTable](type-aliases/AngularTable.md) +- [AppAngularTable](type-aliases/AppAngularTable.md) +- [AppCellContext](type-aliases/AppCellContext.md) +- [AppColumnHelper](type-aliases/AppColumnHelper.md) +- [AppHeaderContext](type-aliases/AppHeaderContext.md) +- [CreateTableContextOptions](type-aliases/CreateTableContextOptions.md) +- [CreateTableHookResult](type-aliases/CreateTableHookResult.md) +- [FlexRenderComponentProps](type-aliases/FlexRenderComponentProps.md) +- [FlexRenderContent](type-aliases/FlexRenderContent.md) +- [FlexRenderInputContent](type-aliases/FlexRenderInputContent.md) + +## Variables + +- [FlexRender](variables/FlexRender.md) +- [TanStackTableCellToken](variables/TanStackTableCellToken.md) +- [TanStackTableHeaderToken](variables/TanStackTableHeaderToken.md) +- [TanStackTableToken](variables/TanStackTableToken.md) + +## Functions + +- [createTableHook](functions/createTableHook.md) +- [flexRenderComponent](functions/flexRenderComponent.md) +- [injectFlexRenderContext](functions/injectFlexRenderContext.md) +- [injectTable](functions/injectTable.md) +- [injectTableCellContext](functions/injectTableCellContext.md) +- [injectTableContext](functions/injectTableContext.md) +- [injectTableHeaderContext](functions/injectTableHeaderContext.md) diff --git a/docs/framework/angular/reference/interfaces/AngularReactivityFlags.md b/docs/framework/angular/reference/interfaces/AngularReactivityFlags.md new file mode 100644 index 0000000000..f1f7c474f9 --- /dev/null +++ b/docs/framework/angular/reference/interfaces/AngularReactivityFlags.md @@ -0,0 +1,81 @@ +--- +id: AngularReactivityFlags +title: AngularReactivityFlags +--- + +# Interface: AngularReactivityFlags + +Defined in: [angularReactivityFeature.ts:55](https://github.com/TanStack/table/blob/main/packages/angular-table/src/angularReactivityFeature.ts#L55) + +Fine-grained configuration for Angular reactivity. + +Each key controls whether prototype methods/getters on the corresponding TanStack Table +objects are wrapped with signal-aware access. + +- `true` enables wrapping using the default skip rules. +- `false` disables wrapping entirely for that object type. +- a function allows customizing the skip rules (see SkipPropertyFn). + +## Example + +```ts +const table = injectTable(() => { + // ...table options, + reactivity: { + // fine-grained control over which table objects have reactive properties, + // and which properties are wrapped + header: true, + column: true, + row: true, + cell: true, + } +}) +``` + +## Properties + +### cell + +```ts +cell: boolean | SkipPropertyFn; +``` + +Defined in: [angularReactivityFeature.ts:63](https://github.com/TanStack/table/blob/main/packages/angular-table/src/angularReactivityFeature.ts#L63) + +Controls reactive wrapping for `Cell` instances. + +*** + +### column + +```ts +column: boolean | SkipPropertyFn; +``` + +Defined in: [angularReactivityFeature.ts:59](https://github.com/TanStack/table/blob/main/packages/angular-table/src/angularReactivityFeature.ts#L59) + +Controls reactive wrapping for `Column` instances. + +*** + +### header + +```ts +header: boolean | SkipPropertyFn; +``` + +Defined in: [angularReactivityFeature.ts:57](https://github.com/TanStack/table/blob/main/packages/angular-table/src/angularReactivityFeature.ts#L57) + +Controls reactive wrapping for `Header` instances. + +*** + +### row + +```ts +row: boolean | SkipPropertyFn; +``` + +Defined in: [angularReactivityFeature.ts:61](https://github.com/TanStack/table/blob/main/packages/angular-table/src/angularReactivityFeature.ts#L61) + +Controls reactive wrapping for `Row` instances. diff --git a/docs/framework/angular/reference/interfaces/FlexRenderComponent.md b/docs/framework/angular/reference/interfaces/FlexRenderComponent.md new file mode 100644 index 0000000000..8c5516f86f --- /dev/null +++ b/docs/framework/angular/reference/interfaces/FlexRenderComponent.md @@ -0,0 +1,179 @@ +--- +id: FlexRenderComponent +title: FlexRenderComponent +--- + +# Interface: FlexRenderComponent\ + +Defined in: [flex-render/flexRenderComponent.ts:205](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L205) + +Wrapper interface for a component that will be used as content for [FlexRenderDirective](../classes/FlexRenderDirective.md). +Can be created using [flexRenderComponent](../functions/flexRenderComponent.md) helper. + +## Example + +```ts +import {flexRenderComponent} from '@tanstack/angular-table' + +// Usage in cell/header/footer definition +const columns = [ + { + cell: ({ row }) => { + return flexRenderComponent(MyComponent, { + inputs: { value: mySignalValue() }, + outputs: { valueChange: (val) => {} } + // or using angular createComponent#bindings api + bindings: [ + inputBinding('value', mySignalValue), + outputBinding('valueChange', value => { + console.log("my value changed to", value) + }) + ] + }) + }, + }, +] + +import {input, output} from '@angular/core'; + +@Component({ + selector: 'my-component', +}) +class MyComponent { + readonly value = input(0); + readonly valueChange = output(); +} + +``` + +## Type Parameters + +### TComponent + +`TComponent` = `any` + +## Properties + +### allowedInputNames + +```ts +readonly allowedInputNames: string[]; +``` + +Defined in: [flex-render/flexRenderComponent.ts:217](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L217) + +List of allowed input names. + +*** + +### allowedOutputNames + +```ts +readonly allowedOutputNames: string[]; +``` + +Defined in: [flex-render/flexRenderComponent.ts:221](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L221) + +List of allowed output names. + +*** + +### bindings? + +```ts +optional bindings: Binding[]; +``` + +Defined in: [flex-render/flexRenderComponent.ts:245](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L245) + +Bindings to apply to the root component + +#### See + +FlexRenderOptions#bindings + +*** + +### component + +```ts +readonly component: Type; +``` + +Defined in: [flex-render/flexRenderComponent.ts:209](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L209) + +The component type + +*** + +### directives? + +```ts +optional directives: (Type | DirectiveWithBindings)[]; +``` + +Defined in: [flex-render/flexRenderComponent.ts:251](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L251) + +Directives that should be applied to the component. + +#### See + +*** + +### injector? + +```ts +readonly optional injector: Injector; +``` + +Defined in: [flex-render/flexRenderComponent.ts:239](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L239) + +Optional Injector that will be used when rendering the component. + +#### See + +FlexRenderOptions#injector + +*** + +### inputs? + +```ts +readonly optional inputs: Inputs; +``` + +Defined in: [flex-render/flexRenderComponent.ts:233](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L233) + +Component instance inputs. Set via [componentRef.setInput API](https://angular.dev/api/core/ComponentRef#setInput)) + +#### See + +FlexRenderOptions#inputs + +*** + +### mirror + +```ts +readonly mirror: ComponentMirror; +``` + +Defined in: [flex-render/flexRenderComponent.ts:213](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L213) + +Reflected metadata about the component. + +*** + +### outputs? + +```ts +readonly optional outputs: Outputs; +``` + +Defined in: [flex-render/flexRenderComponent.ts:227](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L227) + +Component instance outputs. Subscribed via OutputEmitterRef#subscribe + +#### See + +FlexRenderOptions#outputs diff --git a/docs/framework/angular/reference/interfaces/TanStackTableCellContext.md b/docs/framework/angular/reference/interfaces/TanStackTableCellContext.md new file mode 100644 index 0000000000..a81f140e97 --- /dev/null +++ b/docs/framework/angular/reference/interfaces/TanStackTableCellContext.md @@ -0,0 +1,39 @@ +--- +id: TanStackTableCellContext +title: TanStackTableCellContext +--- + +# Interface: TanStackTableCellContext\ + +Defined in: [helpers/cell.ts:11](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/cell.ts#L11) + +DI context shape for a TanStack Table cell. + +This exists to make the current `Cell` injectable by any nested component/directive +without having to pass it through inputs/props manually. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TData + +`TData` *extends* `RowData` + +### TValue + +`TValue` *extends* `CellData` + +## Properties + +### cell + +```ts +cell: Signal>; +``` + +Defined in: [helpers/cell.ts:17](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/cell.ts#L17) + +Signal that returns the current cell instance. diff --git a/docs/framework/angular/reference/interfaces/TanStackTableHeaderContext.md b/docs/framework/angular/reference/interfaces/TanStackTableHeaderContext.md new file mode 100644 index 0000000000..4b48ff47e8 --- /dev/null +++ b/docs/framework/angular/reference/interfaces/TanStackTableHeaderContext.md @@ -0,0 +1,39 @@ +--- +id: TanStackTableHeaderContext +title: TanStackTableHeaderContext +--- + +# Interface: TanStackTableHeaderContext\ + +Defined in: [helpers/header.ts:11](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/header.ts#L11) + +DI context shape for a TanStack Table header. + +This exists to make the current `Header` injectable by any nested component/directive +without passing it through inputs/props. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TData + +`TData` *extends* `RowData` + +### TValue + +`TValue` *extends* `CellData` + +## Properties + +### header + +```ts +header: Signal>; +``` + +Defined in: [helpers/header.ts:17](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/header.ts#L17) + +Signal that returns the current header instance. diff --git a/docs/framework/angular/reference/type-aliases/AngularTable.md b/docs/framework/angular/reference/type-aliases/AngularTable.md new file mode 100644 index 0000000000..cce80f9b04 --- /dev/null +++ b/docs/framework/angular/reference/type-aliases/AngularTable.md @@ -0,0 +1,67 @@ +--- +id: AngularTable +title: AngularTable +--- + +# Type Alias: AngularTable\ + +```ts +type AngularTable = Table & object; +``` + +Defined in: [injectTable.ts:21](https://github.com/TanStack/table/blob/main/packages/angular-table/src/injectTable.ts#L21) + +## Type Declaration + +### state + +```ts +readonly state: Signal>; +``` + +The selected state from the table store, based on the selector provided. + +### Subscribe() + +```ts +Subscribe: (props) => Signal>; +``` + +Subscribe to changes in the table store with a custom selector. + +#### Type Parameters + +##### TSubSelected + +`TSubSelected` = \{ +\} + +#### Parameters + +##### props + +###### equal? + +`ValueEqualityFn`\<`TSubSelected`\> + +###### selector + +(`state`) => `TSubSelected` + +#### Returns + +`Signal`\<`Readonly`\<`TSubSelected`\>\> + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TData + +`TData` *extends* `RowData` + +### TSelected + +`TSelected` = `TableState`\<`TFeatures`\> diff --git a/docs/framework/angular/reference/type-aliases/AppAngularTable.md b/docs/framework/angular/reference/type-aliases/AppAngularTable.md new file mode 100644 index 0000000000..cf2c35fc96 --- /dev/null +++ b/docs/framework/angular/reference/type-aliases/AppAngularTable.md @@ -0,0 +1,108 @@ +--- +id: AppAngularTable +title: AppAngularTable +--- + +# Type Alias: AppAngularTable\ + +```ts +type AppAngularTable = AngularTable & NoInfer & object; +``` + +Defined in: [helpers/createTableHook.ts:243](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L243) + +Extended table API returned by useAppTable with all App wrapper components + +## Type Declaration + +### appCell() + +```ts +appCell: (cell) => Cell & NoInfer; +``` + +#### Type Parameters + +##### TValue + +`TValue` + +#### Parameters + +##### cell + +`Cell`\<`TFeatures`, `TData`, `TValue`\> + +#### Returns + +`Cell`\<`TFeatures`, `TData`, `TValue`\> & `NoInfer`\<`TCellComponents`\> + +### appFooter() + +```ts +appFooter: (footer) => Header & NoInfer; +``` + +#### Type Parameters + +##### TValue + +`TValue` + +#### Parameters + +##### footer + +`Header`\<`TFeatures`, `TData`, `TValue`\> + +#### Returns + +`Header`\<`TFeatures`, `TData`, `TValue`\> & `NoInfer`\<`THeaderComponents`\> + +### appHeader() + +```ts +appHeader: (header) => Header & NoInfer; +``` + +#### Type Parameters + +##### TValue + +`TValue` + +#### Parameters + +##### header + +`Header`\<`TFeatures`, `TData`, `TValue`\> + +#### Returns + +`Header`\<`TFeatures`, `TData`, `TValue`\> & `NoInfer`\<`THeaderComponents`\> + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TData + +`TData` *extends* `RowData` + +### TSelected + +`TSelected` + +### TTableComponents + +`TTableComponents` *extends* `Record`\<`string`, `RenderableComponent`\> + +### TCellComponents + +`TCellComponents` *extends* `Record`\<`string`, `RenderableComponent`\> + +### THeaderComponents + +`THeaderComponents` *extends* `Record`\<`string`, `RenderableComponent`\> diff --git a/docs/framework/angular/reference/type-aliases/AppCellContext.md b/docs/framework/angular/reference/type-aliases/AppCellContext.md new file mode 100644 index 0000000000..0c4ff3b05c --- /dev/null +++ b/docs/framework/angular/reference/type-aliases/AppCellContext.md @@ -0,0 +1,105 @@ +--- +id: AppCellContext +title: AppCellContext +--- + +# Type Alias: AppCellContext\ + +```ts +type AppCellContext = object; +``` + +Defined in: [helpers/createTableHook.ts:47](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L47) + +Enhanced CellContext with pre-bound cell components. +The `cell` property includes the registered cellComponents. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TData + +`TData` *extends* `RowData` + +### TValue + +`TValue` *extends* `CellData` + +### TCellComponents + +`TCellComponents` *extends* `Record`\<`string`, `RenderableComponent`\> + +## Properties + +### cell + +```ts +cell: Cell & TCellComponents & object; +``` + +Defined in: [helpers/createTableHook.ts:53](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L53) + +#### Type Declaration + +##### FlexRender() + +```ts +FlexRender: () => unknown; +``` + +###### Returns + +`unknown` + +*** + +### column + +```ts +column: Column; +``` + +Defined in: [helpers/createTableHook.ts:55](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L55) + +*** + +### getValue + +```ts +getValue: CellContext["getValue"]; +``` + +Defined in: [helpers/createTableHook.ts:56](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L56) + +*** + +### renderValue + +```ts +renderValue: CellContext["renderValue"]; +``` + +Defined in: [helpers/createTableHook.ts:57](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L57) + +*** + +### row + +```ts +row: Row; +``` + +Defined in: [helpers/createTableHook.ts:58](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L58) + +*** + +### table + +```ts +table: Table; +``` + +Defined in: [helpers/createTableHook.ts:59](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L59) diff --git a/docs/framework/angular/reference/type-aliases/AppColumnHelper.md b/docs/framework/angular/reference/type-aliases/AppColumnHelper.md new file mode 100644 index 0000000000..df53fe07cc --- /dev/null +++ b/docs/framework/angular/reference/type-aliases/AppColumnHelper.md @@ -0,0 +1,144 @@ +--- +id: AppColumnHelper +title: AppColumnHelper +--- + +# Type Alias: AppColumnHelper\ + +```ts +type AppColumnHelper = object; +``` + +Defined in: [helpers/createTableHook.ts:168](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L168) + +Enhanced column helper with pre-bound components in cell/header/footer contexts. +This enables TypeScript to know about the registered components when defining columns. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TData + +`TData` *extends* `RowData` + +### TCellComponents + +`TCellComponents` *extends* `Record`\<`string`, `RenderableComponent`\> + +### THeaderComponents + +`THeaderComponents` *extends* `Record`\<`string`, `RenderableComponent`\> + +## Properties + +### accessor() + +```ts +accessor: (accessor, column) => TAccessor extends AccessorFn ? AccessorFnColumnDef : AccessorKeyColumnDef; +``` + +Defined in: [helpers/createTableHook.ts:178](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L178) + +Creates a data column definition with an accessor key or function. +The cell, header, and footer contexts include pre-bound components. + +#### Type Parameters + +##### TAccessor + +`TAccessor` *extends* `AccessorFn`\<`TData`\> \| `DeepKeys`\<`TData`\> + +##### TValue + +`TValue` *extends* `TAccessor` *extends* `AccessorFn`\<`TData`, infer TReturn\> ? `TReturn` : `TAccessor` *extends* `DeepKeys`\<`TData`\> ? `DeepValue`\<`TData`, `TAccessor`\> : `never` + +#### Parameters + +##### accessor + +`TAccessor` + +##### column + +`TAccessor` *extends* `AccessorFn`\<`TData`\> ? `AppColumnDefBase`\<`TFeatures`, `TData`, `TValue`, `TCellComponents`, `THeaderComponents`\> & `object` : `AppColumnDefBase`\<`TFeatures`, `TData`, `TValue`, `TCellComponents`, `THeaderComponents`\> + +#### Returns + +`TAccessor` *extends* `AccessorFn`\<`TData`\> ? `AccessorFnColumnDef`\<`TFeatures`, `TData`, `TValue`\> : `AccessorKeyColumnDef`\<`TFeatures`, `TData`, `TValue`\> + +*** + +### columns() + +```ts +columns: (columns) => ColumnDef[] & [...TColumns]; +``` + +Defined in: [helpers/createTableHook.ts:209](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L209) + +Wraps an array of column definitions to preserve each column's individual TValue type. + +#### Type Parameters + +##### TColumns + +`TColumns` *extends* `ReadonlyArray`\<`ColumnDef`\<`TFeatures`, `TData`, `any`\>\> + +#### Parameters + +##### columns + +\[`...TColumns`\] + +#### Returns + +`ColumnDef`\<`TFeatures`, `TData`, `any`\>[] & \[`...TColumns`\] + +*** + +### display() + +```ts +display: (column) => DisplayColumnDef; +``` + +Defined in: [helpers/createTableHook.ts:217](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L217) + +Creates a display column definition for non-data columns. +The cell, header, and footer contexts include pre-bound components. + +#### Parameters + +##### column + +`AppDisplayColumnDef`\<`TFeatures`, `TData`, `TCellComponents`, `THeaderComponents`\> + +#### Returns + +`DisplayColumnDef`\<`TFeatures`, `TData`, `unknown`\> + +*** + +### group() + +```ts +group: (column) => GroupColumnDef; +``` + +Defined in: [helpers/createTableHook.ts:230](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L230) + +Creates a group column definition with nested child columns. +The cell, header, and footer contexts include pre-bound components. + +#### Parameters + +##### column + +`AppGroupColumnDef`\<`TFeatures`, `TData`, `TCellComponents`, `THeaderComponents`\> + +#### Returns + +`GroupColumnDef`\<`TFeatures`, `TData`, `unknown`\> diff --git a/docs/framework/angular/reference/type-aliases/AppHeaderContext.md b/docs/framework/angular/reference/type-aliases/AppHeaderContext.md new file mode 100644 index 0000000000..0c004cd6cb --- /dev/null +++ b/docs/framework/angular/reference/type-aliases/AppHeaderContext.md @@ -0,0 +1,75 @@ +--- +id: AppHeaderContext +title: AppHeaderContext +--- + +# Type Alias: AppHeaderContext\ + +```ts +type AppHeaderContext = object; +``` + +Defined in: [helpers/createTableHook.ts:66](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L66) + +Enhanced HeaderContext with pre-bound header components. +The `header` property includes the registered headerComponents. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TData + +`TData` *extends* `RowData` + +### TValue + +`TValue` *extends* `CellData` + +### THeaderComponents + +`THeaderComponents` *extends* `Record`\<`string`, `RenderableComponent`\> + +## Properties + +### column + +```ts +column: Column; +``` + +Defined in: [helpers/createTableHook.ts:72](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L72) + +*** + +### header + +```ts +header: Header & THeaderComponents & object; +``` + +Defined in: [helpers/createTableHook.ts:73](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L73) + +#### Type Declaration + +##### FlexRender() + +```ts +FlexRender: () => unknown; +``` + +###### Returns + +`unknown` + +*** + +### table + +```ts +table: Table; +``` + +Defined in: [helpers/createTableHook.ts:75](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L75) diff --git a/docs/framework/angular/reference/type-aliases/CreateTableContextOptions.md b/docs/framework/angular/reference/type-aliases/CreateTableContextOptions.md new file mode 100644 index 0000000000..4b87417e67 --- /dev/null +++ b/docs/framework/angular/reference/type-aliases/CreateTableContextOptions.md @@ -0,0 +1,83 @@ +--- +id: CreateTableContextOptions +title: CreateTableContextOptions +--- + +# Type Alias: CreateTableContextOptions\ + +```ts +type CreateTableContextOptions = Omit, "columns" | "data" | "store" | "state" | "initialState"> & object; +``` + +Defined in: [helpers/createTableHook.ts:273](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L273) + +Options for creating a table hook with pre-bound components and default table options. +Extends all TableOptions except 'columns' | 'data' | 'store' | 'state' | 'initialState'. + +## Type Declaration + +### cellComponents? + +```ts +optional cellComponents: TCellComponents; +``` + +Cell-level components that need access to the cell instance. +These are available on the cell object passed to AppCell's children. +Use `useCellContext()` inside these components. + +#### Example + +```ts +{ TextCell, NumberCell, DateCell, CurrencyCell } +``` + +### headerComponents? + +```ts +optional headerComponents: THeaderComponents; +``` + +Header-level components that need access to the header instance. +These are available on the header object passed to AppHeader/AppFooter's children. +Use `useHeaderContext()` inside these components. + +#### Example + +```ts +{ SortIndicator, ColumnFilter, ResizeHandle } +``` + +### tableComponents? + +```ts +optional tableComponents: TTableComponents; +``` + +Table-level components that need access to the table instance. +These are available directly on the table object returned by useAppTable. +Use `useTableContext()` inside these components. + +#### Example + +```ts +{ PaginationControls, GlobalFilter, RowCount } +``` + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TTableComponents + +`TTableComponents` *extends* `Record`\<`string`, `RenderableComponent`\> + +### TCellComponents + +`TCellComponents` *extends* `Record`\<`string`, `RenderableComponent`\> + +### THeaderComponents + +`THeaderComponents` *extends* `Record`\<`string`, `RenderableComponent`\> diff --git a/docs/framework/angular/reference/type-aliases/CreateTableHookResult.md b/docs/framework/angular/reference/type-aliases/CreateTableHookResult.md new file mode 100644 index 0000000000..93155a8932 --- /dev/null +++ b/docs/framework/angular/reference/type-aliases/CreateTableHookResult.md @@ -0,0 +1,200 @@ +--- +id: CreateTableHookResult +title: CreateTableHookResult +--- + +# Type Alias: CreateTableHookResult\ + +```ts +type CreateTableHookResult = object; +``` + +Defined in: [helpers/createTableHook.ts:305](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L305) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TTableComponents + +`TTableComponents` *extends* `Record`\<`string`, `RenderableComponent`\> + +### TCellComponents + +`TCellComponents` *extends* `Record`\<`string`, `RenderableComponent`\> + +### THeaderComponents + +`THeaderComponents` *extends* `Record`\<`string`, `RenderableComponent`\> + +## Properties + +### createAppColumnHelper() + +```ts +createAppColumnHelper: () => AppColumnHelper; +``` + +Defined in: [helpers/createTableHook.ts:311](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L311) + +#### Type Parameters + +##### TData + +`TData` *extends* `RowData` + +#### Returns + +[`AppColumnHelper`](AppColumnHelper.md)\<`TFeatures`, `TData`, `TCellComponents`, `THeaderComponents`\> + +*** + +### injectAppTable() + +```ts +injectAppTable: (tableOptions, selector?) => AppAngularTable; +``` + +Defined in: [helpers/createTableHook.ts:336](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L336) + +#### Type Parameters + +##### TData + +`TData` *extends* `RowData` + +##### TSelected + +`TSelected` = `TableState`\<`TFeatures`\> + +#### Parameters + +##### tableOptions + +() => `Omit`\<`TableOptions`\<`TFeatures`, `TData`\>, `"_features"` \| `"_rowModels"`\> + +##### selector? + +(`state`) => `TSelected` + +#### Returns + +[`AppAngularTable`](AppAngularTable.md)\<`TFeatures`, `TData`, `TSelected`, `TTableComponents`, `TCellComponents`, `THeaderComponents`\> + +*** + +### injectFlexRenderCellContext() + +```ts +injectFlexRenderCellContext: () => CellContext; +``` + +Defined in: [helpers/createTableHook.ts:332](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L332) + +#### Type Parameters + +##### TData + +`TData` *extends* `RowData` + +##### TValue + +`TValue` *extends* `CellData` + +#### Returns + +`CellContext`\<`TFeatures`, `TData`, `TValue`\> + +*** + +### injectFlexRenderHeaderContext() + +```ts +injectFlexRenderHeaderContext: () => HeaderContext; +``` + +Defined in: [helpers/createTableHook.ts:328](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L328) + +#### Type Parameters + +##### TData + +`TData` *extends* `RowData` + +##### TValue + +`TValue` *extends* `CellData` + +#### Returns + +`HeaderContext`\<`TFeatures`, `TData`, `TValue`\> + +*** + +### injectTableCellContext() + +```ts +injectTableCellContext: () => Signal>; +``` + +Defined in: [helpers/createTableHook.ts:324](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L324) + +#### Type Parameters + +##### TValue + +`TValue` *extends* `CellData` = `CellData` + +##### TRowData + +`TRowData` *extends* `RowData` = `RowData` + +#### Returns + +`Signal`\<`Cell`\<`TFeatures`, `TRowData`, `TValue`\>\> + +*** + +### injectTableContext() + +```ts +injectTableContext: () => Signal>; +``` + +Defined in: [helpers/createTableHook.ts:317](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L317) + +#### Type Parameters + +##### TData + +`TData` *extends* `RowData` = `RowData` + +#### Returns + +`Signal`\<[`AngularTable`](AngularTable.md)\<`TFeatures`, `TData`\>\> + +*** + +### injectTableHeaderContext() + +```ts +injectTableHeaderContext: () => Signal>; +``` + +Defined in: [helpers/createTableHook.ts:320](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L320) + +#### Type Parameters + +##### TValue + +`TValue` *extends* `CellData` = `CellData` + +##### TRowData + +`TRowData` *extends* `RowData` = `RowData` + +#### Returns + +`Signal`\<`Header`\<`TFeatures`, `TRowData`, `TValue`\>\> diff --git a/docs/framework/angular/reference/type-aliases/FlexRenderComponentProps.md b/docs/framework/angular/reference/type-aliases/FlexRenderComponentProps.md new file mode 100644 index 0000000000..14ba2f95e1 --- /dev/null +++ b/docs/framework/angular/reference/type-aliases/FlexRenderComponentProps.md @@ -0,0 +1,13 @@ +--- +id: FlexRenderComponentProps +title: FlexRenderComponentProps +--- + +# Type Alias: FlexRenderComponentProps + +```ts +type FlexRenderComponentProps = InjectionToken<{ +}>; +``` + +Defined in: [flex-render/context.ts:3](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/context.ts#L3) diff --git a/docs/framework/angular/reference/type-aliases/FlexRenderContent.md b/docs/framework/angular/reference/type-aliases/FlexRenderContent.md new file mode 100644 index 0000000000..f251b54a38 --- /dev/null +++ b/docs/framework/angular/reference/type-aliases/FlexRenderContent.md @@ -0,0 +1,31 @@ +--- +id: FlexRenderContent +title: FlexRenderContent +--- + +# Type Alias: FlexRenderContent\ + +```ts +type FlexRenderContent = + | string + | number + | Type + | FlexRenderComponent + | TemplateRef<{ + $implicit: TProps; +}> + | null + | Record + | undefined; +``` + +Defined in: [flex-render/renderer.ts:40](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/renderer.ts#L40) + +Content supported by the `flexRender` directive when declaring +a table column header/cell. + +## Type Parameters + +### TProps + +`TProps` *extends* `NonNullable`\<`unknown`\> diff --git a/docs/framework/angular/reference/type-aliases/FlexRenderInputContent.md b/docs/framework/angular/reference/type-aliases/FlexRenderInputContent.md new file mode 100644 index 0000000000..069a0aeb40 --- /dev/null +++ b/docs/framework/angular/reference/type-aliases/FlexRenderInputContent.md @@ -0,0 +1,25 @@ +--- +id: FlexRenderInputContent +title: FlexRenderInputContent +--- + +# Type Alias: FlexRenderInputContent\ + +```ts +type FlexRenderInputContent = + | number + | string + | (props) => FlexRenderContent + | null + | undefined; +``` + +Defined in: [flex-render/renderer.ts:53](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/renderer.ts#L53) + +Input content supported by the `flexRender` directives. + +## Type Parameters + +### TProps + +`TProps` *extends* `NonNullable`\<`unknown`\> diff --git a/docs/framework/angular/reference/variables/FlexRender.md b/docs/framework/angular/reference/variables/FlexRender.md new file mode 100644 index 0000000000..61d4a34d5e --- /dev/null +++ b/docs/framework/angular/reference/variables/FlexRender.md @@ -0,0 +1,21 @@ +--- +id: FlexRender +title: FlexRender +--- + +# Variable: FlexRender + +```ts +const FlexRender: readonly [typeof FlexRenderDirective, typeof FlexRenderCell]; +``` + +Defined in: [index.ts:25](https://github.com/TanStack/table/blob/main/packages/angular-table/src/index.ts#L25) + +Constant helper to import FlexRender directives. + +You should prefer to use this constant over importing the directives separately, +as it ensures you always have the correct set of directives over library updates. + +## See + +[FlexRenderDirective](../classes/FlexRenderDirective.md) and [FlexRenderCell](../classes/FlexRenderCell.md) for more details on the directives included in this export. diff --git a/docs/framework/angular/reference/variables/TanStackTableCellToken.md b/docs/framework/angular/reference/variables/TanStackTableCellToken.md new file mode 100644 index 0000000000..0074737e5e --- /dev/null +++ b/docs/framework/angular/reference/variables/TanStackTableCellToken.md @@ -0,0 +1,16 @@ +--- +id: TanStackTableCellToken +title: TanStackTableCellToken +--- + +# Variable: TanStackTableCellToken + +```ts +const TanStackTableCellToken: InjectionToken>; +``` + +Defined in: [helpers/cell.ts:25](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/cell.ts#L25) + +Injection token that provides access to the current cell. + +This token is provided by the [TanStackTableCell](../classes/TanStackTableCell.md) directive. diff --git a/docs/framework/angular/reference/variables/TanStackTableHeaderToken.md b/docs/framework/angular/reference/variables/TanStackTableHeaderToken.md new file mode 100644 index 0000000000..985af1fcc1 --- /dev/null +++ b/docs/framework/angular/reference/variables/TanStackTableHeaderToken.md @@ -0,0 +1,16 @@ +--- +id: TanStackTableHeaderToken +title: TanStackTableHeaderToken +--- + +# Variable: TanStackTableHeaderToken + +```ts +const TanStackTableHeaderToken: InjectionToken>; +``` + +Defined in: [helpers/header.ts:25](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/header.ts#L25) + +Injection token that provides access to the current header. + +This token is provided by the [TanStackTableHeader](../classes/TanStackTableHeader.md) directive. diff --git a/docs/framework/angular/reference/variables/TanStackTableToken.md b/docs/framework/angular/reference/variables/TanStackTableToken.md new file mode 100644 index 0000000000..1c20190368 --- /dev/null +++ b/docs/framework/angular/reference/variables/TanStackTableToken.md @@ -0,0 +1,16 @@ +--- +id: TanStackTableToken +title: TanStackTableToken +--- + +# Variable: TanStackTableToken + +```ts +const TanStackTableToken: InjectionToken>; +``` + +Defined in: [helpers/table.ts:11](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/table.ts#L11) + +Injection token that provides access to the current [AngularTable](../type-aliases/AngularTable.md) instance. + +This token is provided by the [TanStackTable](../classes/TanStackTable.md) directive. diff --git a/docs/framework/lit/guide/table-state.md b/docs/framework/lit/guide/table-state.md new file mode 100644 index 0000000000..9bcbebaf8d --- /dev/null +++ b/docs/framework/lit/guide/table-state.md @@ -0,0 +1,193 @@ +--- +title: Table State (Lit) Guide +--- + +## Table State (Lit) Guide + +TanStack Table has a simple underlying internal state management system to store and manage the state of the table. It also lets you selectively pull out any state that you need to manage in your own state management. This guide will walk you through the different ways in which you can interact with and manage the state of the table. + +### Accessing Table State + +You do not need to set up anything special in order for the table state to work. If you pass nothing into either `state`, `initialState`, or any of the `on[State]Change` table options, the table will manage its own state internally. You can access any part of this internal state by using the `table.store.state` table instance API. + +```ts +private tableController = new TableController(this); + +render() { + const table = this.tableController.table({ + columns, + data, + ... + }) + + console.log(table.store.state) //access the entire internal state + console.log(table.store.state.rowSelection) //access just the row selection state + // ... +} +``` + +### Custom Initial State + +If all you need to do for certain states is customize their initial default values, you still do not need to manage any of the state yourself. You can simply set values in the `initialState` option of the table instance. + +```ts +render() { + const table = this.tableController.table({ + columns, + data, + initialState: { + columnOrder: ['age', 'firstName', 'lastName'], //customize the initial column order + columnVisibility: { + id: false //hide the id column by default + }, + expanded: true, //expand all rows by default + sorting: [ + { + id: 'age', + desc: true //sort by age in descending order by default + } + ] + }, + }) + + return html`...`; +} +``` + +> **Note**: Only specify each particular state in either `initialState` or `state`, but not both. If you pass in a particular state value to both `initialState` and `state`, the initialized state in `state` will take overwrite any corresponding value in `initialState`. + +### Controlled State + +If you need easy access to the table state in other areas of your application, TanStack Table makes it easy to control and manage any or all of the table state in your own state management system. You can do this by passing in your own state and state management functions to the `state` and `on[State]Change` table options. + +#### Individual Controlled State + +You can control just the state that you need easy access to. You do NOT have to control all of the table state if you do not need to. It is recommended to only control the state that you need on a case-by-case basis. + +In order to control a particular state, you need to both pass in the corresponding `state` value and the `on[State]Change` function to the table instance. + +Let's take filtering, sorting, and pagination as an example in a "manual" server-side data fetching scenario. You can store the filtering, sorting, and pagination state in your own state management, but leave out any other state like column order, column visibility, etc. if your API does not care about those values. + +```jsx +import {html} from "lit"; + +@customElement('my-component') +class MyComponent extends LitElement { + @state() + private _sorting: SortingState = [] + + render() { + const table = this.tableController.table({ + columns, + data, + state: { + sorting: this._sorting, + }, + onSortingChange: updaterOrValue => { + if (typeof updaterOrValue === 'function') { + this._sorting = updaterOrValue(this._sorting) + } else { + this._sorting = updaterOrValue + } + }, + getSortedRowModel: createSortedRowModel(sortFns), + getCoreRowModel: createCoreRowModel(), + }) + + return html`...` + } +} +//... +``` + +#### Fully Controlled State + +Alternatively, you can control the entire table state with the `onStateChange` table option. It will hoist out the entire table state into your own state management system. Be careful with this approach, as you might find that raising some frequently changing state values up a component tree, like `columnSizingInfo` state`, might cause bad performance issues. + +A couple of more tricks may be needed to make this work. If you use the `onStateChange` table option, the initial values of the `state` must be populated with all of the relevant state values for all of the features that you want to use. You can either manually type out all of the initial state values, or use the `table.setOptions` API in a special way as shown below. + +```ts + +private tableController = new TableController(this); + +@state() +private _tableState; + +render() { + const table = this.tableController.table({ + columns, + data, + getCoreRowModel: createCoreRowModel(), + getSortedRowModel: createSortedRowModel(sortFns) + }) + const state = { ...table.initialState, ...this.tableState }; + table.setOptions(prev => ({ + ...prev, + state, + onStateChange: updater => { + this.tableState = + updater instanceof Function ? updater(state) : updater //any state changes will be pushed up to our own state management + }, + })) + + return html`...`; +} +``` + +### On State Change Callbacks + +So far, we have seen the `on[State]Change` and `onStateChange` table options work to "hoist" the table state changes into our own state management. However, there are a few things about these using these options that you should be aware of. + +#### 1. **State Change Callbacks MUST have their corresponding state value in the `state` option**. + +Specifying an `on[State]Change` callback tells the table instance that this will be a controlled state. If you do not specify the corresponding `state` value, that state will be "frozen" with its initial value. + +```jsx +@state() +private _sorting = []; +//... +render() { + const table = this.tableController.table({ + columns, + data, + state: { + sorting: this._sorting, + }, + onSortingChange: updaterOrValue => { + if (typeof updaterOrValue === 'function') { + this._sorting = updaterOrValue(this._sorting) + } else { + this._sorting = updaterOrValue + } + }, + getSortedRowModel: createSortedRowModel(sortFns), + getCoreRowModel: createCoreRowModel(), + }) + + return html`...`; +} +``` + +#### 2. **Updaters can either be raw values or callback functions**. + +The `on[State]Change` and `onStateChange` callbacks work exactly like the `setState` functions in React. The updater values can either be a new state value or a callback function that takes the previous state value and returns the new state value. + +What implications does this have? It means that if you want to add in some extra logic in any of the `on[State]Change` callbacks, you can do so, but you need to check whether or not the new incoming updater value is a function or value. + +This is why you will see the `updater instanceof Function ? updater(state.value) : updater` pattern in the examples above. This pattern checks if the updater is a function, and if it is, it calls the function with the previous state value to get the new state value. + +### State Types + +All complex states in TanStack Table have their own TypeScript types that you can import and use. This can be handy for ensuring that you are using the correct data structures and properties for the state values that you are controlling. + +```tsx +import { TableController, type SortingState } from '@tanstack/lit-table' +//... +@state() +private _sorting: SortingState = [ + { + id: 'age', //you should get autocomplete for the `id` and `desc` properties + desc: true, + } +] +``` diff --git a/docs/framework/lit/lit-table.md b/docs/framework/lit/lit-table.md new file mode 100644 index 0000000000..8a5c263c9f --- /dev/null +++ b/docs/framework/lit/lit-table.md @@ -0,0 +1,63 @@ +--- +title: Lit Table +--- + +The `@tanstack/lit-table` adapter is a wrapper around the core table logic. Most of it's job is related to managing state the "lit" way, providing types and the rendering implementation of cell/header/footer templates. + +## Exports + +`@tanstack/lit-table` re-exports all of `@tanstack/table-core`'s APIs and the following: + +### `TableController` + +Is a reactive controller that provides a `table` API that takes an `options` object and returns a table instance. + +```ts +import { TableController } from '@tanstack/lit-table' + +@customElement('my-table-element') +class MyTableElement extends LitElement { + private tableController = new TableController(this) + + protected render() { + const table = this.tableController.table(options) + // ...render your table + } +} +``` + +### `flexRender` + +A utility function for rendering cell/header/footer templates with dynamic values. + +Example: + +```jsx +import { flexRender } from '@tanstack/lit-table' +//... +return html` + + ${table + .getRowModel() + .rows.slice(0, 10) + .map( + row => html` + + ${row + .getVisibleCells() + .map( + cell => html` + + ${flexRender( + cell.column.columnDef.cell, + cell.getContext() + )} + + ` + )} + + ` + )} + +` +``` diff --git a/docs/framework/preact/guide/create-table-hook.md b/docs/framework/preact/guide/create-table-hook.md new file mode 100644 index 0000000000..138e749bc0 --- /dev/null +++ b/docs/framework/preact/guide/create-table-hook.md @@ -0,0 +1,169 @@ +--- +title: createTableHook Guide +--- + +`createTableHook` is an advanced API for building reusable, composable table configurations in Preact. It mirrors the [React `createTableHook` API](../react/guide/create-table-hook) — you define features, row models, and pre-bound components once, then reuse them across multiple tables with minimal boilerplate. + +> **When to use it:** Use `createTableHook` when you have multiple tables that share the same configuration. For a single table, `useTable` is sufficient. + +## Setup + +Create a shared table configuration file and call `createTableHook` with your features, row models, and component registries: + +```tsx +// hooks/table.ts + +import { + createTableHook, + tableFeatures, + columnFilteringFeature, + rowPaginationFeature, + rowSortingFeature, + createFilteredRowModel, + createPaginatedRowModel, + createSortedRowModel, + filterFns, + sortFns, +} from '@tanstack/preact-table' + +import { PaginationControls, RowCount, TableToolbar } from '../components/table-components' +import { TextCell, NumberCell, StatusCell } from '../components/cell-components' +import { SortIndicator, ColumnFilter } from '../components/header-components' + +export const { + createAppColumnHelper, + useAppTable, + useTableContext, + useCellContext, + useHeaderContext, +} = createTableHook({ + _features: tableFeatures({ + columnFilteringFeature, + rowPaginationFeature, + rowSortingFeature, + }), + + _rowModels: { + sortedRowModel: createSortedRowModel(sortFns), + filteredRowModel: createFilteredRowModel(filterFns), + paginatedRowModel: createPaginatedRowModel(), + }, + + getRowId: (row) => row.id, + + tableComponents: { + PaginationControls, + RowCount, + TableToolbar, + }, + + cellComponents: { + TextCell, + NumberCell, + StatusCell, + }, + + headerComponents: { + SortIndicator, + ColumnFilter, + }, +}) +``` + +## What `createTableHook` Returns + +| Export | Description | +|--------|-------------| +| `useAppTable` | Hook for creating tables. Merges default options from the hook with per-table options. | +| `createAppColumnHelper` | Column helper with `TFeatures` pre-bound. Only requires `TData`. | +| `useTableContext` | Access the table instance inside `tableComponents`. | +| `useCellContext` | Access the cell instance inside `cellComponents`. | +| `useHeaderContext` | Access the header instance inside `headerComponents`. | + +## Component Registries + +The API matches React's `createTableHook`: + +- **`tableComponents`** — Components attached to the table (`table.PaginationControls`, etc.). Use `useTableContext()` inside them. +- **`cellComponents`** — Components attached to the cell (`cell.TextCell`, etc.). Use `useCellContext()` inside them. +- **`headerComponents`** — Components attached to the header (`header.SortIndicator`, etc.). Use `useHeaderContext()` inside them. + +## Using `useAppTable` + +```tsx +const personColumnHelper = createAppColumnHelper() + +function UsersTable() { + const [data, setData] = useState(() => makeData(100)) + + const columns = useMemo( + () => + personColumnHelper.columns([ + personColumnHelper.accessor('firstName', { + header: 'First Name', + cell: ({ cell }) => , + }), + personColumnHelper.accessor('age', { + header: 'Age', + cell: ({ cell }) => , + }), + ]), + [], + ) + + const table = useAppTable({ + columns, + data, + }) + + return ( + ({ pagination: state.pagination })}> + {() => ( +
+ setData(makeData(100))} /> + + + {table.getHeaderGroups().map((headerGroup) => ( + + {headerGroup.headers.map((h) => ( + + {(header) => ( + + )} + + ))} + + ))} + + + {table.getRowModel().rows.map((row) => ( + + {row.getAllCells().map((c) => ( + + {(cell) => } + + ))} + + ))} + +
+ + +
+ + +
+ )} +
+ ) +} +``` + +## AppTable, AppHeader, AppCell, AppFooter + +Same as React: `table.AppTable`, `table.AppHeader`, `table.AppCell`, and `table.AppFooter` provide context to your registered components. Use the `selector` prop on `AppTable` for optimized re-renders. + +## See Also + +- [React createTableHook Guide](../react/guide/create-table-hook) — The React guide has more detailed examples and the same API. +- [Composable Tables (React)](../react/examples/composable-tables) — Reference implementation (Preact API mirrors React). diff --git a/docs/framework/react/guide/create-table-hook.md b/docs/framework/react/guide/create-table-hook.md new file mode 100644 index 0000000000..254b26daa0 --- /dev/null +++ b/docs/framework/react/guide/create-table-hook.md @@ -0,0 +1,281 @@ +--- +title: createTableHook Guide +--- + +`createTableHook` is an advanced API for building reusable, composable table configurations. It lets you define features, row models, and pre-bound components once, then reuse them across multiple tables with minimal boilerplate. It is inspired by [TanStack Form's `createFormHook`](https://tanstack.com/form/latest/docs/framework/react/guides/form-composition). + +> **When to use it:** Use `createTableHook` when you have multiple tables that share the same configuration (features, row models, and reusable components). For a single table, `useTable` is sufficient. + +## Examples + +- [Composable Tables](../examples/composable-tables) — Two tables (Users and Products) sharing the same `createTableHook` configuration, with table/cell/header components, sorting, filtering, and pagination. +- [Basic useAppTable](../examples/basic-use-app-table) — Minimal example using `createTableHook` with no pre-bound components. + +## Setup + +Create a shared table configuration file and call `createTableHook` with your features, row models, and component registries: + +```tsx +// hooks/table.ts + +import { + createTableHook, + tableFeatures, + columnFilteringFeature, + rowPaginationFeature, + rowSortingFeature, + createFilteredRowModel, + createPaginatedRowModel, + createSortedRowModel, + filterFns, + sortFns, +} from '@tanstack/react-table' + +import { PaginationControls, RowCount, TableToolbar } from '../components/table-components' +import { TextCell, NumberCell, StatusCell, ProgressCell } from '../components/cell-components' +import { SortIndicator, ColumnFilter } from '../components/header-components' + +export const { + createAppColumnHelper, + useAppTable, + useTableContext, + useCellContext, + useHeaderContext, +} = createTableHook({ + _features: tableFeatures({ + columnFilteringFeature, + rowPaginationFeature, + rowSortingFeature, + }), + + _rowModels: { + sortedRowModel: createSortedRowModel(sortFns), + filteredRowModel: createFilteredRowModel(filterFns), + paginatedRowModel: createPaginatedRowModel(), + }, + + getRowId: (row) => row.id, + + tableComponents: { + PaginationControls, + RowCount, + TableToolbar, + }, + + cellComponents: { + TextCell, + NumberCell, + StatusCell, + ProgressCell, + }, + + headerComponents: { + SortIndicator, + ColumnFilter, + }, +}) +``` + +## What `createTableHook` Returns + +| Export | Description | +|--------|-------------| +| `useAppTable` | Hook for creating tables. Merges default options from the hook with per-table options. No need to pass `_features` or `_rowModels`—they come from the hook. | +| `createAppColumnHelper` | Column helper with `TFeatures` pre-bound. Only requires `TData`. Use `createAppColumnHelper()` instead of `createColumnHelper()`. | +| `useTableContext` | Access the table instance inside `tableComponents`. | +| `useCellContext` | Access the cell instance inside `cellComponents`. | +| `useHeaderContext` | Access the header instance inside `headerComponents`. | + +## Component Registries + +### `tableComponents` + +Components that need access to the **table instance**. They are attached to the table object, so you use them as `table.PaginationControls`, `table.RowCount`, etc. + +Use `useTableContext()` inside these components: + +```tsx +export function PaginationControls() { + const table = useTableContext() + + return ( +
+ + +
+ ) +} +``` + +### `cellComponents` + +Components that render **cell content**. They are attached to the `cell` object in column definitions, so you use them as `cell.TextCell`, `cell.NumberCell`, etc. + +Use `useCellContext()` inside these components: + +```tsx +export function TextCell() { + const cell = useCellContext() + return {cell.getValue()} +} + +export function NumberCell() { + const cell = useCellContext() + return {cell.getValue().toLocaleString()} +} +``` + +### `headerComponents` + +Components that render **header/footer content**. They are attached to the `header` object, so you use them as `header.SortIndicator`, `header.ColumnFilter`, etc. + +Use `useHeaderContext()` inside these components: + +```tsx +export function SortIndicator() { + const header = useHeaderContext() + const sorted = header.column.getIsSorted() + if (!sorted) return null + return {sorted === 'asc' ? '🔼' : '🔽'} +} +``` + +## Using `useAppTable` + +Create tables with `useAppTable`—`_features` and `_rowModels` are inherited from the hook: + +```tsx +const personColumnHelper = createAppColumnHelper() + +function UsersTable() { + const [data, setData] = useState(() => makeData(1000)) + + const columns = useMemo( + () => + personColumnHelper.columns([ + personColumnHelper.accessor('firstName', { + header: 'First Name', + cell: ({ cell }) => , + }), + personColumnHelper.accessor('age', { + header: 'Age', + cell: ({ cell }) => , + }), + personColumnHelper.accessor('status', { + header: 'Status', + cell: ({ cell }) => , + }), + ]), + [], + ) + + const table = useAppTable({ + columns, + data, + debugTable: true, + }) + + return ( + ({ pagination: state.pagination, sorting: state.sorting })}> + {({ sorting }) => ( +
+ setData(makeData(1000))} /> + + + {table.getHeaderGroups().map((headerGroup) => ( + + {headerGroup.headers.map((h) => ( + + {(header) => ( + + )} + + ))} + + ))} + + + {table.getRowModel().rows.map((row) => ( + + {row.getAllCells().map((c) => ( + + {(cell) => } + + ))} + + ))} + +
+ + + +
+ + +
+ )} +
+ ) +} +``` + +## AppTable, AppHeader, AppCell, AppFooter + +The table returned by `useAppTable` includes wrapper components that provide context to your registered components: + +- **`table.AppTable`** — Wraps the table UI and provides a `selector` prop for optimized re-renders. Renders its children with the selected state. +- **`table.AppHeader`** — Wraps a header and provides the enhanced `header` context (with `header.SortIndicator`, `header.ColumnFilter`, etc.) to its render prop. +- **`table.AppCell`** — Wraps a cell and provides the enhanced `cell` context (with `cell.TextCell`, `cell.FlexRender`, etc.) to its render prop. +- **`table.AppFooter`** — Same as AppHeader but for footer cells. + +## Optimized Rendering with `selector` + +Pass a `selector` to `table.AppTable` to subscribe only to the state slices you need. This reduces re-renders when other state (e.g., column filters) changes but your component doesn't use it: + +```tsx + ({ + pagination: state.pagination, + sorting: state.sorting, + columnFilters: state.columnFilters, + })} +> + {({ sorting, columnFilters }) => ( + // This only re-renders when pagination, sorting, or columnFilters change +
...
+ )} +
+``` + +For v8-style behavior (re-render on any state change), pass `(state) => state`. + +## Multiple Table Configurations + +You can call `createTableHook` multiple times for different parts of your app: + +```tsx +// admin-tables.ts +export const { useAppTable: useAdminTable, createAppColumnHelper: createAdminColumnHelper } = + createTableHook({ + _features: tableFeatures({ rowSortingFeature, columnFilteringFeature, rowSelectionFeature }), + _rowModels: { /* ... */ }, + cellComponents: { EditableCell, DeleteButton }, + }) + +// readonly-tables.ts +export const { useAppTable: useReadonlyTable, createAppColumnHelper: createReadonlyColumnHelper } = + createTableHook({ + _features: tableFeatures({ rowSortingFeature }), + _rowModels: { /* ... */ }, + cellComponents: { TextCell, NumberCell }, + }) +``` + +## See Also + +- [Migrating to v9](./migrating) — Includes a createTableHook section +- [Composable Tables example](../examples/composable-tables) — Full implementation with two tables diff --git a/docs/framework/react/guide/migrating.md b/docs/framework/react/guide/migrating.md new file mode 100644 index 0000000000..fea5738398 --- /dev/null +++ b/docs/framework/react/guide/migrating.md @@ -0,0 +1,930 @@ +--- +title: Migrating to TanStack Table v9 (React) +--- + +## What's New in TanStack Table v9 + +TanStack Table v9 is a major release that introduces significant architectural improvements while maintaining the core table logic you're familiar with. Here are the key changes: + +### 1. Tree-shaking + +- **Features are tree-shakeable**: Features are now treated as plugins—import only what you use. If your table only needs sorting, you won't ship filtering, pagination, or other feature code. Bundlers can eliminate unused code, so for smaller tables you can expect to bundle ~6–7kb compared to 15–20kb for the same table in v8. This also lets TanStack Table add features over time without bloating everyone's bundles. +- **Row models and their functions are refactored**: Row model factories (`createFilteredRowModel`, `createSortedRowModel`, etc.) now accept their processing functions (`filterFns`, `sortFns`, `aggregationFns`) as parameters. This enables tree-shaking of the functions themselves—if you use a custom filter, you don't pay for built-in filters you never use. + +### 2. State Management + +- **Uses TanStack Store**: The internal state system has been rebuilt on [TanStack Store](https://tanstack.com/store), providing a reactive, framework-agnostic foundation. This works similarly to TanStack Form's state model. +- **Opt-in subscriptions instead of memo hacks**: Use `table.Subscribe` or pass a selector to `useTable` to subscribe to specific slices of state. Only re-render when the state you care about changes—no more `React.memo` or manual memoization. Pass `state => state` if you want v8-style behavior where any state change triggers a re-render. + +### 3. Composability + +- **`tableOptions`**: New utilities let you compose and share table configurations. Define `_features`, `_rowModels`, and default options once, then reuse them across tables or pass them through `createTableHook`. +- **`createTableHook`** (optional, advanced): Create custom table hooks with pre-bound features, row models, and components—similar to TanStack Form's `createFormHook`. Define your table setup once and reuse it across many tables. You don't need this for most use cases; `useTable` is sufficient. + +### The Good News: Most Upgrades Are Opt-in + +While v9 is a significant upgrade, **you don't have to adopt everything at once**: + +- **Don't want to optimize renders?** Pass `state => state` as the selector to `useTable` and rendering works like v8. +- **Don't want to think about tree-shaking?** Import `stockFeatures` to include all features, just like v8. +- **Table markup is largely unchanged.** How you render ``, ``, ``, `} + + +// With selector - children receives cell and selected state + s.columnFilters}> + {(c, filters) => } + +``` + +### AppFooter + +```ts +AppFooter: AppHeaderComponent>; +``` + +Wraps a footer and provides header context with pre-bound headerComponents. +Optionally accepts a selector for Subscribe functionality. + +#### Example + +```tsx + + {(f) => } + +``` + +### AppHeader + +```ts +AppHeader: AppHeaderComponent>; +``` + +Wraps a header and provides header context with pre-bound headerComponents. +Optionally accepts a selector for Subscribe functionality. + +#### Example + +```tsx +// Without selector + + {(h) => } + + +// With selector + s.sorting}> + {(h, sorting) => } + +``` + +### AppTable + +```ts +AppTable: AppTableComponent; +``` + +Root wrapper component that provides table context with optional Subscribe. + +#### Example + +```tsx +// Without selector - children is ReactNode + +
`, etc. remains the same. + +The main change is **how you define a table** with the `useTable` hook — specifically the new `_features` and `_rowModels` options. + +--- + +## Quick Legacy Migration + +Need to migrate incrementally? Use `useLegacyTable` — it accepts the v8-style API while using v9 under the hood. **This is deprecated** and intended only as a temporary migration aid. It includes all features by default, resulting in a larger bundle size. + +Legacy APIs live in a separate export. Import core utilities from `@tanstack/react-table` and legacy-specific APIs from `@tanstack/react-table/legacy`: + +```tsx +import { flexRender } from '@tanstack/react-table' +import { + useLegacyTable, + getCoreRowModel, + getFilteredRowModel, + getSortedRowModel, + getPaginationRowModel, + legacyCreateColumnHelper, +} from '@tanstack/react-table/legacy' +``` + +See the [useLegacyTable Guide](./use-legacy-table.md) for full documentation, examples, and type helpers. + +--- + +The rest of this guide focuses on migrating to the full v9 API and taking advantage of its features. + +## Core Breaking Changes + +### Hook Rename + +The hook name has been simplified to be consistent across all TanStack libraries: + +```tsx +// v8 +import { useReactTable } from '@tanstack/react-table' +const table = useReactTable(options) + +// v9 +import { useTable } from '@tanstack/react-table' +const table = useTable(options) +``` + +### New Required Options: `_features` and `_rowModels` + +In v9, you must explicitly declare which features and row models your table uses: + +```tsx +// v8 +import { useReactTable, getCoreRowModel } from '@tanstack/react-table' + +const table = useReactTable({ + columns, + data, + getCoreRowModel: getCoreRowModel(), +}) + +// v9 +import { useTable, tableFeatures } from '@tanstack/react-table' + +const _features = tableFeatures({}) // Empty = core features only + +const table = useTable({ + _features, + _rowModels: {}, // Core row model is automatic + columns, + data, +}) +``` + +--- + +## The `_features` Option + +Features control what table functionality is available. In v8, all features were bundled. In v9, you import only what you need. + +### Importing Individual Features + +```tsx +import { + tableFeatures, + // Import only the features you need + columnFilteringFeature, + rowSortingFeature, + rowPaginationFeature, + columnVisibilityFeature, + rowSelectionFeature, +} from '@tanstack/react-table' + +// Create a features object (define this outside your component for stable reference) +const _features = tableFeatures({ + columnFilteringFeature, + rowSortingFeature, + rowPaginationFeature, + columnVisibilityFeature, + rowSelectionFeature, +}) +``` + +### Using `stockFeatures` for v8-like Behavior + +If you want all features without thinking about it (like v8), import `stockFeatures`: + +```tsx +import { useTable, stockFeatures } from '@tanstack/react-table' + +const table = useTable({ + _features: stockFeatures, // All features included + _rowModels: { /* ... */ }, + columns, + data, +}) +``` + +### Available Features + +| Feature | Import Name | +|---------|-------------| +| Column Filtering | `columnFilteringFeature` | +| Global Filtering | `globalFilteringFeature` | +| Row Sorting | `rowSortingFeature` | +| Row Pagination | `rowPaginationFeature` | +| Row Selection | `rowSelectionFeature` | +| Row Expanding | `rowExpandingFeature` | +| Row Pinning | `rowPinningFeature` | +| Column Pinning | `columnPinningFeature` | +| Column Visibility | `columnVisibilityFeature` | +| Column Ordering | `columnOrderingFeature` | +| Column Sizing | `columnSizingFeature` | +| Column Resizing | `columnResizingFeature` | +| Column Grouping | `columnGroupingFeature` | +| Column Faceting | `columnFacetingFeature` | + +--- + +## The `_rowModels` Option + +Row models are the functions that process your data (filtering, sorting, pagination, etc.). In v9, they're configured via `_rowModels` instead of `get*RowModel` options. + +### Migration Mapping + +| v8 Option | v9 `_rowModels` Key | v9 Factory Function | +|-----------|---------------------|---------------------| +| `getCoreRowModel()` | (automatic) | Not needed — always included | +| `getFilteredRowModel()` | `filteredRowModel` | `createFilteredRowModel(filterFns)` | +| `getSortedRowModel()` | `sortedRowModel` | `createSortedRowModel(sortFns)` | +| `getPaginationRowModel()` | `paginatedRowModel` | `createPaginatedRowModel()` | +| `getExpandedRowModel()` | `expandedRowModel` | `createExpandedRowModel()` | +| `getGroupedRowModel()` | `groupedRowModel` | `createGroupedRowModel(aggregationFns)` | +| `getFacetedRowModel()` | `facetedRowModel` | `createFacetedRowModel()` | +| `getFacetedMinMaxValues()` | `facetedMinMaxValues` | `createFacetedMinMaxValues()` | +| `getFacetedUniqueValues()` | `facetedUniqueValues` | `createFacetedUniqueValues()` | + +### Key Change: Row Model Functions Now Accept Parameters + +Several row model factories now accept their processing functions as parameters. This enables better tree-shaking and explicit configuration: + +```tsx +import { + createFilteredRowModel, + createSortedRowModel, + createGroupedRowModel, + filterFns, // Built-in filter functions + sortFns, // Built-in sort functions + aggregationFns, // Built-in aggregation functions +} from '@tanstack/react-table' + +const table = useTable({ + _features, + _rowModels: { + filteredRowModel: createFilteredRowModel(filterFns), + sortedRowModel: createSortedRowModel(sortFns), + groupedRowModel: createGroupedRowModel(aggregationFns), + paginatedRowModel: createPaginatedRowModel(), + }, + columns, + data, +}) +``` + +### Full Migration Example + +```tsx +// v8 +import { + useReactTable, + getCoreRowModel, + getFilteredRowModel, + getSortedRowModel, + getPaginationRowModel, + filterFns, + sortingFns, +} from '@tanstack/react-table' + +const table = useReactTable({ + columns, + data, + getCoreRowModel: getCoreRowModel(), // used to be called "get*RowModel()" + getFilteredRowModel: getFilteredRowModel(), + getSortedRowModel: getSortedRowModel(), + getPaginationRowModel: getPaginationRowModel(), + filterFns, // used to be passed in as a root option + sortingFns, +}) + +// v9 +import { + useTable, + tableFeatures, + columnFilteringFeature, + rowSortingFeature, + rowPaginationFeature, + createFilteredRowModel, + createSortedRowModel, + createPaginatedRowModel, + filterFns, + sortFns, +} from '@tanstack/react-table' + +const _features = tableFeatures({ + columnFilteringFeature, + rowSortingFeature, + rowPaginationFeature, +}) + +const table = useTable({ + _features, + _rowModels: { + filteredRowModel: createFilteredRowModel(filterFns), // now called "create*RowModel()" with a Fns parameter + sortedRowModel: createSortedRowModel(sortFns), + paginatedRowModel: createPaginatedRowModel(), + }, + columns, + data, +}) +``` + +--- + +## State Management Changes + +### Accessing State + +In v8, you accessed state via `table.getState()`. In v9, state is accessed differently: + +```tsx +// v8 +const state = table.getState() +const { sorting, pagination } = table.getState() + +// v9 - via the store (full state) +const fullState = table.store.state +const { sorting, pagination } = table.store.state + +// v9 - via table.state (selected state from your selector) +const table = useTable(options, (state) => ({ + sorting: state.sorting, + pagination: state.pagination, +})) +// Now table.state only contains sorting and pagination +const { sorting, pagination } = table.state +``` + +### Optimized Rendering with `table.Subscribe` + +The biggest state management improvement is `table.Subscribe`, which enables fine-grained reactivity: + +```tsx +function MyTable() { + const table = useTable({ + _features, + _rowModels: { /* ... */ }, + columns, + data, + }) + + return ( + ({ + sorting: state.sorting, + pagination: state.pagination, + })} + > + {({ sorting, pagination }) => ( + // This only re-renders when sorting or pagination changes +
+ {/* ... */}
+
Page {pagination.pageIndex + 1}
+
+ )} +
+ ) +} +``` + +### Opt-Out: v8-Style Full State Subscription + +If you want v8-style behavior where the component re-renders on any state change, pass `state => state` as the selector: + +```tsx +// Re-renders on ANY state change (like v8) +const table = useTable( + { + _features, + _rowModels: { /* ... */ }, + columns, + data, + }, + (state) => state, // Subscribe to entire state +) + +// table.state now contains the full state +const { sorting, pagination, columnFilters } = table.state +``` + +### Controlled State + +Controlled state patterns work similarly to v8: + +```tsx +const [sorting, setSorting] = useState([]) +const [pagination, setPagination] = useState({ + pageIndex: 0, + pageSize: 10, +}) + +const table = useTable({ + _features, + _rowModels: { /* ... */ }, + columns, + data, + state: { + sorting, + pagination, + }, + onSortingChange: setSorting, + onPaginationChange: setPagination, +}) +``` + +--- + +## Column Helper Changes + +The `createColumnHelper` function now requires a `TFeatures` type parameter in addition to `TData`: + +```tsx +// v8 +import { createColumnHelper } from '@tanstack/react-table' + +const columnHelper = createColumnHelper() + +// v9 +import { createColumnHelper, tableFeatures, rowSortingFeature } from '@tanstack/react-table' + +const _features = tableFeatures({ rowSortingFeature }) +const columnHelper = createColumnHelper() +``` + +### New `columns()` Helper Method + +v9 adds a `columns()` helper for better type inference when wrapping column arrays. In v8, `TValue` wasn't always type-safe—especially with group columns, where nested column types could be lost or widened. The `columns()` helper uses variadic tuple types to preserve each column's individual `TValue` type, so `info.getValue()` and cell renderers stay correctly typed throughout nested structures: + +```tsx +const columnHelper = createColumnHelper() + +// Wrap your columns array for better type inference +const columns = columnHelper.columns([ + columnHelper.accessor('firstName', { + header: 'First Name', + cell: (info) => info.getValue(), + }), + columnHelper.accessor('lastName', { + id: 'lastName', + header: () => Last Name, + cell: (info) => {info.getValue()}, + }), + columnHelper.display({ + id: 'actions', + header: 'Actions', + cell: (info) => , + }), +]) +``` + +### Using with `createTableHook` + +When using `createTableHook`, you get a pre-bound `createAppColumnHelper` that only requires `TData`: + +```tsx +const { useAppTable, createAppColumnHelper } = createTableHook({ + _features: tableFeatures({ rowSortingFeature }), + _rowModels: { /* ... */ }, +}) + +// TFeatures is already bound — only need TData! +const columnHelper = createAppColumnHelper() +``` + +--- + +## Rendering Changes + +### `flexRender` Function + +The `flexRender` function still exists and works the same way: + +```tsx +import { flexRender } from '@tanstack/react-table' + +// Still works in v9 +{flexRender(cell.column.columnDef.cell, cell.getContext())} +{flexRender(header.column.columnDef.header, header.getContext())} +``` + +### New `` Component + +v9 adds a cleaner component-based approach attached to the table instance: + +```tsx +const table = useTable({ /* ... */ }) + +// Instead of: +{flexRender(header.column.columnDef.header, header.getContext())} + +// You can use: + + + +``` + +This should be way more convenient and type-safe than the old `flexRender` function! + +### Standalone `` Component + +There's also a standalone component you can import: + +```tsx +import { FlexRender } from '@tanstack/react-table' + + + + +``` + +--- + +## The `tableOptions()` Utility + +The `tableOptions()` helper provides type-safe composition of table options. It's useful for creating reusable partial configurations that can be spread into your table setup. + +### Basic Usage + +```tsx +import { tableOptions, tableFeatures, rowSortingFeature } from '@tanstack/react-table' + +// Create a reusable options object with features pre-configured +const baseOptions = tableOptions({ + _features: tableFeatures({ rowSortingFeature }), + debugTable: process.env.NODE_ENV === 'development', +}) + +// Use in your table — columns, data, and other options can be added +const table = useTable({ + ...baseOptions, + columns, + data, + _rowModels: {}, +}) +``` + +### Composing Partial Options + +`tableOptions()` allows you to omit certain required fields (like `data`, `columns`, or `_features`) when creating partial configurations: + +```tsx +// Partial options without data or columns +const featureOptions = tableOptions({ + _features: tableFeatures({ + rowSortingFeature, + columnFilteringFeature, + }), + _rowModels: { + sortedRowModel: createSortedRowModel(sortFns), + filteredRowModel: createFilteredRowModel(filterFns), + }, +}) + +// Another partial without _features (inherits from spread) +const paginationDefaults = tableOptions({ + _rowModels: { + paginatedRowModel: createPaginatedRowModel(), + }, + initialState: { + pagination: { pageIndex: 0, pageSize: 25 }, + }, +}) + +// Combine them +const table = useTable({ + ...featureOptions, + ...paginationDefaults, + columns, + data, +}) +``` + +### Using with `createTableHook` + +`tableOptions()` pairs well with `createTableHook` for building composable table factories: + +```tsx +const sharedOptions = tableOptions({ + _features: tableFeatures({ rowSortingFeature, rowPaginationFeature }), + _rowModels: { + sortedRowModel: createSortedRowModel(sortFns), + paginatedRowModel: createPaginatedRowModel(), + }, +}) + +const { useAppTable } = createTableHook(sharedOptions) +``` + +--- + +## `createTableHook`: Composable Table Patterns + +**This is an advanced, optional feature.** You don't need to use `createTableHook`—`useTable` is sufficient for most use cases. If you're familiar with [TanStack Form](https://tanstack.com/form)'s `createFormHook`, `createTableHook` works almost the same way: it creates a custom hook with pre-bound configuration that you can reuse across many tables. + +For applications with multiple tables sharing the same configuration, `createTableHook` lets you define features, row models, and reusable components once: + +```tsx +// hooks/table.ts +import { + createTableHook, + tableFeatures, + columnFilteringFeature, + rowSortingFeature, + rowPaginationFeature, + createFilteredRowModel, + createSortedRowModel, + createPaginatedRowModel, + filterFns, + sortFns, +} from '@tanstack/react-table' + +// Import your reusable components +import { PaginationControls, SortIndicator, TextCell } from './components' + +export const { + useAppTable, + createAppColumnHelper, + useTableContext, + useCellContext, + useHeaderContext, +} = createTableHook({ + // Features defined once + _features: tableFeatures({ + columnFilteringFeature, + rowSortingFeature, + rowPaginationFeature, + }), + + // Row models defined once + _rowModels: { + filteredRowModel: createFilteredRowModel(filterFns), + sortedRowModel: createSortedRowModel(sortFns), + paginatedRowModel: createPaginatedRowModel(), + }, + + // Default table options + debugTable: process.env.NODE_ENV === 'development', + + // Register reusable components + tableComponents: { PaginationControls }, + cellComponents: { TextCell }, + headerComponents: { SortIndicator }, +}) +``` + +### Using `useAppTable` + +```tsx +// features/users.tsx +import { useAppTable, createAppColumnHelper } from './hooks/table' + +const columnHelper = createAppColumnHelper() + +const columns = columnHelper.columns([ + columnHelper.accessor('firstName', { + header: 'First Name', + cell: ({ cell }) => , // Pre-bound component! + }), +]) + +function UsersTable({ data }: { data: Person[] }) { + const table = useAppTable({ + columns, + data, + // _features and _rowModels already configured! + }) + + return ( + + + + {table.getHeaderGroups().map((headerGroup) => ( + + {headerGroup.headers.map((h) => ( + + {(header) => ( + + )} + + ))} + + ))} + + + {table.getRowModel().rows.map((row) => ( + + {row.getAllCells().map((c) => ( + + {(cell) => ( + + )} + + ))} + + ))} + +
+ + +
+ +
+ +
+ ) +} +``` + +### Context Hooks for Components + +Components registered via `createTableHook` can access their context: + +```tsx +// components/SortIndicator.tsx +import { useHeaderContext } from './hooks/table' + +export function SortIndicator() { + const header = useHeaderContext() + const sorted = header.column.getIsSorted() + + if (!sorted) return null + return sorted === 'asc' ? ' 🔼' : ' 🔽' +} + +// components/TextCell.tsx +import { useCellContext } from './hooks/table' + +export function TextCell() { + const cell = useCellContext() + return {cell.getValue() as string} +} + +// components/PaginationControls.tsx +import { useTableContext } from './hooks/table' + +export function PaginationControls() { + const table = useTableContext() + + return ( + s.pagination}> + {(pagination) => ( +
+ + Page {pagination.pageIndex + 1} + +
+ )} +
+ ) +} +``` + +--- + +## Other Breaking Changes + +### Column Pinning Option Split + +The `enablePinning` option has been split into separate options: + +```tsx +// v8 +enablePinning: true + +// v9 +enableColumnPinning: true +enableRowPinning: true +``` + +### Removed Internal APIs + +All internal APIs prefixed with `_` have been removed. If you were using any of these, use their public equivalents: + +- Removed: `table._getPinnedRows()` +- Removed: `table._getFacetedRowModel()` +- Removed: `table._getFacetedMinMaxValues()` +- Removed: `table._getFacetedUniqueValues()` + +### Column Sizing vs. Column Resizing Split + +In v8, column sizing and resizing were combined in a single feature. In v9, they've been split into separate features for better tree-shaking. + +| v8 | v9 | +|----|-----| +| `ColumnSizing` (combined feature) | `columnSizingFeature` + `columnResizingFeature` | +| `columnSizingInfo` state | `columnResizing` state | +| `setColumnSizingInfo()` | `setColumnResizing()` | +| `onColumnSizingInfoChange` option | `onColumnResizingChange` option | + +If you only need column sizing (fixed widths) without interactive resizing, you can import just `columnSizingFeature`. If you need drag-to-resize functionality, import both: + +```tsx +import { columnSizingFeature, columnResizingFeature } from '@tanstack/react-table' + +const _features = tableFeatures({ + columnSizingFeature, + columnResizingFeature, // Only if you need interactive resizing +}) +``` + +### Sorting API Renames + +Sorting-related APIs have been renamed for consistency: + +| v8 | v9 | +|----|-----| +| `sortingFn` (column def option) | `sortFn` | +| `column.getSortingFn()` | `column.getSortFn()` | +| `column.getAutoSortingFn()` | `column.getAutoSortFn()` | +| `SortingFn` type | `SortFn` type | +| `SortingFns` interface | `SortFns` interface | +| `sortingFns` (built-in functions) | `sortFns` | + +Update your column definitions: + +```tsx +// v8 +const columns = [ + { + accessorKey: 'name', + sortingFn: 'alphanumeric', // or custom function + }, +] + +// v9 +const columns = [ + { + accessorKey: 'name', + sortFn: 'alphanumeric', // or custom function + }, +] +``` + +### Row API Changes + +Some row APIs have changed from private to public: + +| v8 | v9 | +|----|-----| +| `row._getAllCellsByColumnId()` (private) | `row.getAllCellsByColumnId()` (public) | + +If you were accessing this internal API, you can now use it without the underscore prefix. + +--- + +## TypeScript Changes Summary + +### Type Generics + +Most types now require a `TFeatures` parameter: + +```tsx +// v8 +type Column +type ColumnDef +type Table +type Row +type Cell + +// v9 +type Column +type ColumnDef +type Table +type Row +type Cell +``` + +### Using `typeof _features` + +The easiest way to get the `TFeatures` type is with `typeof`: + +```tsx +const _features = tableFeatures({ + rowSortingFeature, + columnFilteringFeature, +}) + +// Use typeof to get the type +type MyFeatures = typeof _features + +const columns: ColumnDef[] = [...] + +function Filter({ column }: { column: Column }) { + // ... +} +``` + +### Using `StockFeatures` + +If using `stockFeatures` with `useTable`, use the `StockFeatures` type: + +```tsx +import type { StockFeatures, ColumnDef } from '@tanstack/react-table' + +const columns: ColumnDef[] = [...] +``` + +### `ColumnMeta` Generic Change + +If you're using module augmentation to extend `ColumnMeta`, note that it now requires a `TFeatures` parameter: + +```tsx +// v8 +declare module '@tanstack/react-table' { + interface ColumnMeta { + customProperty: string + } +} + +// v9 - TFeatures is now the first parameter +declare module '@tanstack/react-table' { + interface ColumnMeta { + customProperty: string + } +} +``` + +### `RowData` Type Restriction + +The `RowData` type is now more restrictive: + +```tsx +// v8 - very permissive +type RowData = unknown | object | any[] + +// v9 - must be a record or array +type RowData = Record | Array +``` + +This change improves type safety. If you were passing unusual data types, ensure your data conforms to `Record` or `Array`. + +--- + +## Migration Checklist + +- [ ] Update import: `useReactTable` → `useTable` +- [ ] Define `_features` using `tableFeatures()` (or use `stockFeatures`) +- [ ] Migrate `get*RowModel()` options to `_rowModels` +- [ ] Update row model factories to include `Fns` parameters where needed +- [ ] Update TypeScript types to include `TFeatures` generic +- [ ] Update state access: `table.getState()` → `table.store.state` or `table.state` +- [ ] Update `createColumnHelper()` → `createColumnHelper()` +- [ ] Replace `enablePinning` with `enableColumnPinning`/`enableRowPinning` if used +- [ ] Rename `sortingFn` → `sortFn` in column definitions +- [ ] Split column sizing/resizing: use both `columnSizingFeature` and `columnResizingFeature` if needed +- [ ] Rename `columnSizingInfo` state → `columnResizing` (and related options) +- [ ] Update `ColumnMeta` module augmentation to include `TFeatures` generic (if used) +- [ ] (Optional) Add `table.Subscribe` for render optimizations +- [ ] (Optional) Use `tableOptions()` for composable configurations +- [ ] (Optional) Migrate to `createTableHook` for reusable table patterns + +--- + +## Examples + +Check out these examples to see v9 patterns in action: + +- [Basic useTable](../examples/basic-use-table) - Simple table with the new `useTable` hook +- [Basic useLegacyTable](../examples/basic-use-legacy-table) - Migration example using `useLegacyTable` +- [Basic useAppTable](../examples/basic-use-app-table) - Using `createTableHook` +- [Filters](../examples/filters) - Filtering with the new API +- [Sorting](../examples/sorting) - Sorting with the new API +- [Composable Tables](../examples/composable-tables) - Advanced `createTableHook` patterns diff --git a/docs/framework/react/guide/table-state.md b/docs/framework/react/guide/table-state.md new file mode 100644 index 0000000000..fa11792898 --- /dev/null +++ b/docs/framework/react/guide/table-state.md @@ -0,0 +1,204 @@ +--- +title: Table State (React) Guide +--- + +## Examples + +Want to skip to the implementation? Check out these examples: + +- [kitchen sink](../examples/kitchen-sink) +- [fully controlled](../examples/fully-controlled) + +## Table State (React) Guide + +TanStack Table has a simple underlying internal state management system to store and manage the state of the table. It also lets you selectively pull out any state that you need to manage in your own state management. This guide will walk you through the different ways in which you can interact with and manage the state of the table. + +### Accessing Table State + +You do not need to set up anything special in order for the table state to work. If you pass nothing into either `state`, `initialState`, or any of the `on[State]Change` table options, the table will manage its own state internally. You can access any part of this internal state by using the `table.store.state` table instance API. + +```jsx +const table = useTable({ + columns, + data, + //... +}) + +console.log(table.store.state) //access the entire internal state +console.log(table.store.state.rowSelection) //access just the row selection state +``` + +### Custom Initial State + +If all you need to do for certain states is customize their initial default values, you still do not need to manage any of the state yourself. You can simply set values in the `initialState` option of the table instance. + +```jsx +const table = useTable({ + columns, + data, + initialState: { + columnOrder: ['age', 'firstName', 'lastName'], //customize the initial column order + columnVisibility: { + id: false //hide the id column by default + }, + expanded: true, //expand all rows by default + sorting: [ + { + id: 'age', + desc: true //sort by age in descending order by default + } + ] + }, + //... +}) +``` + +> **Note**: Only specify each particular state in either `initialState` or `state`, but not both. If you pass in a particular state value to both `initialState` and `state`, the initialized state in `state` will take overwrite any corresponding value in `initialState`. + +### Controlled State + +If you need easy access to the table state in other areas of your application, TanStack Table makes it easy to control and manage any or all of the table state in your own state management system. You can do this by passing in your own state and state management functions to the `state` and `on[State]Change` table options. + +#### Individual Controlled State + +You can control just the state that you need easy access to. You do NOT have to control all of the table state if you do not need to. It is recommended to only control the state that you need on a case-by-case basis. + +In order to control a particular state, you need to both pass in the corresponding `state` value and the `on[State]Change` function to the table instance. + +Let's take filtering, sorting, and pagination as an example in a "manual" server-side data fetching scenario. You can store the filtering, sorting, and pagination state in your own state management, but leave out any other state like column order, column visibility, etc. if your API does not care about those values. + +```jsx +const [columnFilters, setColumnFilters] = React.useState([]) //no default filters +const [sorting, setSorting] = React.useState([{ + id: 'age', + desc: true, //sort by age in descending order by default +}]) +const [pagination, setPagination] = React.useState({ pageIndex: 0, pageSize: 15 }) + +//Use our controlled state values to fetch data +const tableQuery = useQuery({ + queryKey: ['users', columnFilters, sorting, pagination], + queryFn: () => fetchUsers(columnFilters, sorting, pagination), + //... +}) + +const table = useTable({ + columns, + data: tableQuery.data, + //... + state: { + columnFilters, //pass controlled state back to the table (overrides internal state) + sorting, + pagination + }, + onColumnFiltersChange: setColumnFilters, //hoist columnFilters state into our own state management + onSortingChange: setSorting, + onPaginationChange: setPagination, +}) +//... +``` + +#### Fully Controlled State + +Alternatively, you can control the entire table state with the `onStateChange` table option. It will hoist out the entire table state into your own state management system. Be careful with this approach, as you might find that raising some frequently changing state values up a react tree, like `columnSizingInfo` state`, might cause bad performance issues. + +A couple of more tricks may be needed to make this work. If you use the `onStateChange` table option, the initial values of the `state` must be populated with all of the relevant state values for all of the features that you want to use. You can either manually type out all of the initial state values, or use the `table.setOptions` API in a special way as shown below. + +```jsx +//create a table instance with default state values +const table = useTable({ + columns, + data, + //... Note: `state` values are NOT passed in yet +}) + + +const [state, setState] = React.useState({ + ...table.initialState, //populate the initial state with all of the default state values from the table instance + pagination: { + pageIndex: 0, + pageSize: 15 //optionally customize the initial pagination state. + } +}) + +//Use the table.setOptions API to merge our fully controlled state onto the table instance +table.setOptions(prev => ({ + ...prev, //preserve any other options that we have set up above + state, //our fully controlled state overrides the internal state + onStateChange: setState //any state changes will be pushed up to our own state management +})) +``` + +### On State Change Callbacks + +So far, we have seen the `on[State]Change` and `onStateChange` table options work to "hoist" the table state changes into our own state management. However, there are a few things about using these options that you should be aware of. + +#### 1. **State Change Callbacks MUST have their corresponding state value in the `state` option**. + +Specifying an `on[State]Change` callback tells the table instance that this will be a controlled state. If you do not specify the corresponding `state` value, that state will be "frozen" with its initial value. + +```jsx +const [sorting, setSorting] = React.useState([]) +//... +const table = useTable({ + columns, + data, + //... + state: { + sorting, //required because we are using `onSortingChange` + }, + onSortingChange: setSorting, //makes the `state.sorting` controlled +}) +``` + +#### 2. **Updaters can either be raw values or callback functions**. + +The `on[State]Change` and `onStateChange` callbacks work exactly like the `setState` functions in React. The updater values can either be a new state value or a callback function that takes the previous state value and returns the new state value. + +What implications does this have? It means that if you want to add in some extra logic in any of the `on[State]Change` callbacks, you can do so, but you need to check whether or not the new incoming updater value is a function or value. + +```jsx +const [sorting, setSorting] = React.useState([]) +const [pagination, setPagination] = React.useState({ pageIndex: 0, pageSize: 10 }) + +const table = useTable({ + columns, + data, + //... + state: { + pagination, + sorting, + } + //syntax 1 + onPaginationChange: (updater) => { + setPagination(old => { + const newPaginationValue = updater instanceof Function ? updater(old) : updater + //do something with the new pagination value + //... + return newPaginationValue + }) + }, + //syntax 2 + onSortingChange: (updater) => { + const newSortingValue = updater instanceof Function ? updater(sorting) : updater + //do something with the new sorting value + //... + setSorting(updater) //normal state update + } +}) +``` + +### State Types + +All complex states in TanStack Table have their own TypeScript types that you can import and use. This can be handy for ensuring that you are using the correct data structures and properties for the state values that you are controlling. + +```tsx +import { useTable, type SortingState } from '@tanstack/react-table' +//... +const [sorting, setSorting] = React.useState([ + { + id: 'age', //you should get autocomplete for the `id` and `desc` properties + desc: true, + } +]) +``` diff --git a/docs/framework/react/guide/use-legacy-table.md b/docs/framework/react/guide/use-legacy-table.md new file mode 100644 index 0000000000..ce5dd0ef96 --- /dev/null +++ b/docs/framework/react/guide/use-legacy-table.md @@ -0,0 +1,226 @@ +--- +title: Using useLegacyTable for Incremental Migration +--- + +The `useLegacyTable` hook provides a compatibility layer that accepts the v8-style API while using v9 under the hood. This is useful for teams that need to migrate incrementally or have large codebases where a full migration isn't immediately practical. + +> **Warning:** `useLegacyTable` is **deprecated** and intended only as a temporary migration aid. It includes all features by default, resulting in a larger bundle size compared to the tree-shakeable v9 API. Plan to migrate to `useTable` for better performance and smaller bundles. + +## When to Use `useLegacyTable` + +- You have an existing v8 codebase and need to upgrade dependencies +- You want to migrate incrementally, one table at a time +- You need v9 compatibility but don't have time for a full migration yet + +## Basic Usage + +```tsx +import { useState } from 'react' +import { flexRender } from '@tanstack/react-table' +import { + getCoreRowModel, + getFilteredRowModel, + getPaginationRowModel, + getSortedRowModel, + legacyCreateColumnHelper, + useLegacyTable, +} from '@tanstack/react-table/legacy' +import type { + ColumnFiltersState, + PaginationState, + SortingState, +} from '@tanstack/react-table' +import type { + LegacyColumn, + LegacyColumnDef, + LegacyRow, +} from '@tanstack/react-table/legacy' + +interface Person { + name: string + email: string + age: number +} + +const columnHelper = legacyCreateColumnHelper() + +const columns: LegacyColumnDef[] = [ + columnHelper.accessor('name', { header: 'Name' }), + columnHelper.accessor('email', { header: 'Email' }), + columnHelper.accessor('age', { header: 'Age' }), + columnHelper.display({ id: 'actions', header: 'Actions' }), +] + +function MyTable({ data }: { data: Person[] }) { + const [sorting, setSorting] = useState([]) + const [columnFilters, setColumnFilters] = useState([]) + const [pagination, setPagination] = useState({ + pageIndex: 0, + pageSize: 10, + }) + + // useLegacyTable accepts the v8-style API + const table = useLegacyTable({ + columns, + data, + getCoreRowModel: getCoreRowModel(), + getFilteredRowModel: getFilteredRowModel(), + getSortedRowModel: getSortedRowModel(), + getPaginationRowModel: getPaginationRowModel(), + state: { sorting, columnFilters, pagination }, + onSortingChange: setSorting, + onColumnFiltersChange: setColumnFilters, + onPaginationChange: setPagination, + }) + + return ( + + + {table.getHeaderGroups().map((headerGroup) => ( + + {headerGroup.headers.map((header) => ( + + ))} + + ))} + + + {table.getRowModel().rows.map((row) => ( + + {row.getAllCells().map((cell) => ( + + ))} + + ))} + +
+ {flexRender( + header.column.columnDef.header, + header.getContext() + )} + {header.column.getCanFilter() ? ( + + ) : null} +
+ {cell.column.id === 'actions' ? ( + + ) : ( + flexRender(cell.column.columnDef.cell, cell.getContext()) + )} +
+ ) +} + +function Filter({ column }: { column: LegacyColumn }) { + return ( + column.setFilterValue(e.target.value)} + placeholder="Filter..." + /> + ) +} + +function RowActions({ row }: { row: LegacyRow }) { + return +} +``` + +## Type Helpers + +When using `useLegacyTable`, use these type helpers for proper TypeScript support: + +| Type | Description | +|------|-------------| +| `LegacyColumnDef` | Column definition type (equivalent to v8's `ColumnDef`) | +| `LegacyColumn` | Column instance type | +| `LegacyRow` | Row instance type | +| `LegacyCell` | Cell instance type | +| `LegacyTable` | Table instance type | +| `legacyCreateColumnHelper()` | Column helper with StockFeatures pre-bound—only requires TData | + +### Using `legacyCreateColumnHelper` + +Use `legacyCreateColumnHelper` instead of `createColumnHelper`—it has StockFeatures pre-bound, so you only need to specify `TData`: + +```tsx +import { legacyCreateColumnHelper } from '@tanstack/react-table/legacy' +import type { LegacyColumnDef } from '@tanstack/react-table/legacy' + +const columnHelper = legacyCreateColumnHelper() + +const columns: LegacyColumnDef[] = [ + columnHelper.accessor('name', { header: 'Name' }), + // ... +] +``` + +## API Differences from v8 + +While `useLegacyTable` aims for v8 compatibility, there are a few differences: + +### Row Model Functions + +The `get*RowModel()` functions are imported from `@tanstack/react-table/legacy`: + +```tsx +import { + getCoreRowModel, + getFilteredRowModel, + getSortedRowModel, + getPaginationRowModel, + getExpandedRowModel, + getGroupedRowModel, + getFacetedRowModel, + getFacetedMinMaxValues, + getFacetedUniqueValues, +} from '@tanstack/react-table/legacy' +``` + +### Sorting Function Renames + +Note that in v9, sorting-related APIs have been renamed. If you're using custom sorting functions in column definitions: + +| v8 | v9 | +|----|-----| +| `sortingFn` | `sortFn` | + +The legacy table adapter handles this internally for built-in sorting, but if you're defining custom sorting functions, be aware of the rename. + +## Caveats and Limitations + +### Bundle Size + +`useLegacyTable` includes **all features** by default, similar to v8. This means: + +- No tree-shaking benefits +- Bundle size is **much larger** than v8—each feature has grown since v8, and you pay for all of them +- The tree-shakeable v9 API exists so TanStack Table can add features over time without bloating everyone's bundles; only users who opt into a feature pay for it +- If bundle size is a concern, prioritize migrating to the full v9 API + +### Deprecation + +`useLegacyTable` is deprecated and will be removed in a future major version. It exists solely to ease migration. Plan your migration timeline accordingly. + +### No `table.Subscribe` + +The fine-grained reactivity feature (`table.Subscribe`) is not available with `useLegacyTable`. The table re-renders on every state change, like v8. + +### No `createTableHook` Integration + +`useLegacyTable` cannot be used with `createTableHook`. If you want to create reusable table configurations, migrate to the full v9 API. + +## Migration Path + +Once you're ready to migrate to the full v9 API: + +1. Replace `useLegacyTable` with `useTable` +2. Define your `_features` using `tableFeatures()` +3. Convert `get*RowModel()` options to `_rowModels` +4. Update types from `Legacy*` to the standard v9 types + +See the [main migration guide](./migrating.md) for complete instructions. + +## Example + +See the [Basic useLegacyTable example](../examples/basic-use-legacy-table) for a working implementation. diff --git a/docs/framework/react/react-table.md b/docs/framework/react/react-table.md new file mode 100644 index 0000000000..7cbd507263 --- /dev/null +++ b/docs/framework/react/react-table.md @@ -0,0 +1,19 @@ +--- +title: React Table +--- + +The `@tanstack/react-table` adapter is a wrapper around the core table logic. Most of its job is related to managing state the "react" way, providing types and the rendering implementation of cell/header/footer templates. + +## `useTable` + +Takes an `options` object and returns a table. + +```tsx +import { useTable } from '@tanstack/react-table' + +function App() { + const table = useTable(options) + + // ...render your table +} +``` diff --git a/docs/framework/react/reference/index.md b/docs/framework/react/reference/index.md new file mode 100644 index 0000000000..1902741d6c --- /dev/null +++ b/docs/framework/react/reference/index.md @@ -0,0 +1,11 @@ +--- +id: "@tanstack/react-table" +title: "@tanstack/react-table" +--- + +# @tanstack/react-table + +## Modules + +- [index](index/index.md) +- [legacy](legacy/index.md) diff --git a/docs/framework/react/reference/index/functions/FlexRender-1.md b/docs/framework/react/reference/index/functions/FlexRender-1.md new file mode 100644 index 0000000000..1fc66ee6b0 --- /dev/null +++ b/docs/framework/react/reference/index/functions/FlexRender-1.md @@ -0,0 +1,71 @@ +--- +id: FlexRender +title: FlexRender +--- + +# Function: FlexRender() + +```ts +function FlexRender(props): + | string + | number + | bigint + | boolean + | Iterable + | Promise + | Element + | null + | undefined; +``` + +Defined in: [FlexRender.tsx:97](https://github.com/TanStack/table/blob/main/packages/react-table/src/FlexRender.tsx#L97) + +Simplified component wrapper of `flexRender`. Use this utility component to render headers, cells, or footers with custom markup. +Only one prop (`cell`, `header`, or `footer`) may be passed. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TData + +`TData` *extends* `RowData` + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### props + +[`FlexRenderProps`](../type-aliases/FlexRenderProps.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + + \| `string` + \| `number` + \| `bigint` + \| `boolean` + \| `Iterable`\<`ReactNode`, `any`, `any`\> + \| `Promise`\<`AwaitedReactNode`\> + \| `Element` + \| `null` + \| `undefined` + +## Example + +```tsx + + + +``` + +This replaces calling `flexRender` directly like this: +```tsx +flexRender(cell.column.columnDef.cell, cell.getContext()) +flexRender(header.column.columnDef.header, header.getContext()) +flexRender(footer.column.columnDef.footer, footer.getContext()) +``` diff --git a/docs/framework/react/reference/index/functions/Subscribe.md b/docs/framework/react/reference/index/functions/Subscribe.md new file mode 100644 index 0000000000..115ca34b4f --- /dev/null +++ b/docs/framework/react/reference/index/functions/Subscribe.md @@ -0,0 +1,61 @@ +--- +id: Subscribe +title: Subscribe +--- + +# Function: Subscribe() + +```ts +function Subscribe(props): ReactNode | Promise; +``` + +Defined in: [Subscribe.ts:58](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L58) + +A React component that allows you to subscribe to the table state. + +This is useful for opting into state re-renders for specific parts of the table state. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TData + +`TData` *extends* `RowData` + +### TSelected + +`TSelected` = \{ +\} + +## Parameters + +### props + +[`SubscribeProps`](../type-aliases/SubscribeProps.md)\<`TFeatures`, `TData`, `TSelected`\> + +## Returns + +`ReactNode` \| `Promise`\<`ReactNode`\> + +## Examples + +```tsx +// As a standalone component + ({ rowSelection: state.rowSelection })}> + {({ rowSelection }) => ( +
Selected rows: {Object.keys(rowSelection).length}
+ )} +
+``` + +```tsx +// As table.Subscribe (table instance method) + ({ rowSelection: state.rowSelection })}> + {({ rowSelection }) => ( +
Selected rows: {Object.keys(rowSelection).length}
+ )} +
+``` diff --git a/docs/framework/react/reference/index/functions/createTableHook.md b/docs/framework/react/reference/index/functions/createTableHook.md new file mode 100644 index 0000000000..51e54b22b1 --- /dev/null +++ b/docs/framework/react/reference/index/functions/createTableHook.md @@ -0,0 +1,322 @@ +--- +id: createTableHook +title: createTableHook +--- + +# Function: createTableHook() + +```ts +function createTableHook(__namedParameters): object; +``` + +Defined in: [createTableHook.tsx:590](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L590) + +Creates a custom table hook with pre-bound components for composition. + +This is the table equivalent of TanStack Form's `createFormHook`. It allows you to: +- Define features, row models, and default options once, shared across all tables +- Register reusable table, cell, and header components +- Access table/cell/header instances via context in those components +- Get a `useAppTable` hook that returns an extended table with App wrapper components +- Get a `createAppColumnHelper` function pre-bound to your features + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TTableComponents + +`TTableComponents` *extends* `Record`\<`string`, `ComponentType`\<`any`\>\> + +### TCellComponents + +`TCellComponents` *extends* `Record`\<`string`, `ComponentType`\<`any`\>\> + +### THeaderComponents + +`THeaderComponents` *extends* `Record`\<`string`, `ComponentType`\<`any`\>\> + +## Parameters + +### \_\_namedParameters + +[`CreateTableHookOptions`](../type-aliases/CreateTableHookOptions.md)\<`TFeatures`, `TTableComponents`, `TCellComponents`, `THeaderComponents`\> + +## Returns + +### appFeatures + +```ts +appFeatures: TFeatures; +``` + +### createAppColumnHelper() + +```ts +createAppColumnHelper: () => AppColumnHelper; +``` + +Create a column helper pre-bound to the features and components configured in this table hook. +The cell, header, and footer contexts include pre-bound components (e.g., `cell.TextCell`). + +#### Type Parameters + +##### TData + +`TData` *extends* `RowData` + +#### Returns + +[`AppColumnHelper`](../type-aliases/AppColumnHelper.md)\<`TFeatures`, `TData`, `TCellComponents`, `THeaderComponents`\> + +#### Example + +```tsx +const columnHelper = createAppColumnHelper() + +const columns = [ + columnHelper.accessor('firstName', { + header: 'First Name', + cell: ({ cell }) => , // cell has pre-bound components! + }), + columnHelper.accessor('age', { + header: 'Age', + cell: ({ cell }) => , + }), +] +``` + +### useAppTable() + +```ts +useAppTable: (tableOptions, selector?) => AppReactTable; +``` + +Enhanced useTable hook that returns a table with App wrapper components +and pre-bound tableComponents attached directly to the table object. + +Default options from createTableHook are automatically merged with +the options passed here. Options passed here take precedence. + +TFeatures is already known from the createTableHook call; TData is inferred from the data prop. + +#### Type Parameters + +##### TData + +`TData` *extends* `RowData` + +##### TSelected + +`TSelected` = \{ +\} + +#### Parameters + +##### tableOptions + +`Omit`\<`TableOptions`\<`TFeatures`, `TData`\>, `"_features"` \| `"_rowModels"`\> + +##### selector? + +(`state`) => `TSelected` + +#### Returns + +[`AppReactTable`](../type-aliases/AppReactTable.md)\<`TFeatures`, `TData`, `TSelected`, `TTableComponents`, `TCellComponents`, `THeaderComponents`\> + +### useCellContext() + +```ts +useCellContext: () => Cell; +``` + +Access the cell instance from within an `AppCell` wrapper. +Use this in custom `cellComponents` passed to `createTableHook`. +TFeatures is already known from the createTableHook call. + +#### Type Parameters + +##### TValue + +`TValue` *extends* `unknown` = `unknown` + +#### Returns + +`Cell`\<`TFeatures`, `any`, `TValue`\> + +#### Example + +```tsx +function TextCell() { + const cell = useCellContext() + return {cell.getValue()} +} + +function NumberCell({ format }: { format?: Intl.NumberFormatOptions }) { + const cell = useCellContext() + return {cell.getValue().toLocaleString(undefined, format)} +} +``` + +### useHeaderContext() + +```ts +useHeaderContext: () => Header; +``` + +Access the header instance from within an `AppHeader` or `AppFooter` wrapper. +Use this in custom `headerComponents` passed to `createTableHook`. +TFeatures is already known from the createTableHook call. + +#### Type Parameters + +##### TValue + +`TValue` *extends* `unknown` = `unknown` + +#### Returns + +`Header`\<`TFeatures`, `any`, `TValue`\> + +#### Example + +```tsx +function SortIndicator() { + const header = useHeaderContext() + const sorted = header.column.getIsSorted() + return sorted === 'asc' ? '🔼' : sorted === 'desc' ? '🔽' : null +} + +function ColumnFilter() { + const header = useHeaderContext() + if (!header.column.getCanFilter()) return null + return ( + header.column.setFilterValue(e.target.value)} + placeholder="Filter..." + /> + ) +} +``` + +### useTableContext() + +```ts +useTableContext: () => ReactTable; +``` + +Access the table instance from within an `AppTable` wrapper. +Use this in custom `tableComponents` passed to `createTableHook`. +TFeatures is already known from the createTableHook call. + +#### Type Parameters + +##### TData + +`TData` *extends* `RowData` = `RowData` + +#### Returns + +[`ReactTable`](../type-aliases/ReactTable.md)\<`TFeatures`, `TData`\> + +#### Example + +```tsx +function PaginationControls() { + const table = useTableContext() + return ( + s.pagination}> + {(pagination) => ( +
+ + Page {pagination.pageIndex + 1} + +
+ )} +
+ ) +} +``` + +## Example + +```tsx +// hooks/table.ts +export const { + useAppTable, + createAppColumnHelper, + useTableContext, + useCellContext, + useHeaderContext, +} = createTableHook({ + _features: tableFeatures({ + rowPaginationFeature, + rowSortingFeature, + columnFilteringFeature, + }), + _rowModels: { + paginatedRowModel: createPaginatedRowModel(), + sortedRowModel: createSortedRowModel(sortFns), + filteredRowModel: createFilteredRowModel(filterFns), + }, + tableComponents: { PaginationControls, RowCount }, + cellComponents: { TextCell, NumberCell }, + headerComponents: { SortIndicator, ColumnFilter }, +}) + +// Create column helper with TFeatures already bound +const columnHelper = createAppColumnHelper() + +// components/table-components.tsx +function PaginationControls() { + const table = useTableContext() // TFeatures already known! + return s.pagination}>... +} + +// features/users.tsx +function UsersTable({ data }: { data: Person[] }) { + const table = useAppTable({ + columns, + data, // TData inferred from Person[] + }) + + return ( + + + + {table.getHeaderGroups().map(headerGroup => ( + + {headerGroup.headers.map(h => ( + + {(header) => ( + + )} + + ))} + + ))} + + + {table.getRowModel().rows.map(row => ( + + {row.getAllCells().map(c => ( + + {(cell) => } + + ))} + + ))} + +
+ + +
+ +
+ ) +} +``` diff --git a/docs/framework/react/reference/index/functions/flexRender.md b/docs/framework/react/reference/index/functions/flexRender.md new file mode 100644 index 0000000000..c2e3d81d19 --- /dev/null +++ b/docs/framework/react/reference/index/functions/flexRender.md @@ -0,0 +1,40 @@ +--- +id: flexRender +title: flexRender +--- + +# Function: flexRender() + +```ts +function flexRender(Comp, props): ReactNode | Element; +``` + +Defined in: [FlexRender.tsx:45](https://github.com/TanStack/table/blob/main/packages/react-table/src/FlexRender.tsx#L45) + +If rendering headers, cells, or footers with custom markup, use flexRender instead of `cell.getValue()` or `cell.renderValue()`. + +## Type Parameters + +### TProps + +`TProps` *extends* `object` + +## Parameters + +### Comp + +[`Renderable`](../type-aliases/Renderable.md)\<`TProps`\> + +### props + +`TProps` + +## Returns + +`ReactNode` \| `Element` + +## Example + +```ts +flexRender(cell.column.columnDef.cell, cell.getContext()) +``` diff --git a/docs/framework/react/reference/index/functions/useTable.md b/docs/framework/react/reference/index/functions/useTable.md new file mode 100644 index 0000000000..e18c56384b --- /dev/null +++ b/docs/framework/react/reference/index/functions/useTable.md @@ -0,0 +1,41 @@ +--- +id: useTable +title: useTable +--- + +# Function: useTable() + +```ts +function useTable(tableOptions, selector): ReactTable; +``` + +Defined in: [useTable.ts:78](https://github.com/TanStack/table/blob/main/packages/react-table/src/useTable.ts#L78) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TData + +`TData` *extends* `RowData` + +### TSelected + +`TSelected` = \{ +\} + +## Parameters + +### tableOptions + +`TableOptions`\<`TFeatures`, `TData`\> + +### selector + +(`state`) => `TSelected` + +## Returns + +[`ReactTable`](../type-aliases/ReactTable.md)\<`TFeatures`, `TData`, `TSelected`\> diff --git a/docs/framework/react/reference/index/index.md b/docs/framework/react/reference/index/index.md new file mode 100644 index 0000000000..679304d2bc --- /dev/null +++ b/docs/framework/react/reference/index/index.md @@ -0,0 +1,38 @@ +--- +id: index +title: index +--- + +# index + +## Interfaces + +- [AppCellComponent](interfaces/AppCellComponent.md) +- [AppCellPropsWithoutSelector](interfaces/AppCellPropsWithoutSelector.md) +- [AppCellPropsWithSelector](interfaces/AppCellPropsWithSelector.md) +- [AppHeaderComponent](interfaces/AppHeaderComponent.md) +- [AppHeaderPropsWithoutSelector](interfaces/AppHeaderPropsWithoutSelector.md) +- [AppHeaderPropsWithSelector](interfaces/AppHeaderPropsWithSelector.md) +- [AppTableComponent](interfaces/AppTableComponent.md) +- [AppTablePropsWithoutSelector](interfaces/AppTablePropsWithoutSelector.md) +- [AppTablePropsWithSelector](interfaces/AppTablePropsWithSelector.md) + +## Type Aliases + +- [AppCellContext](type-aliases/AppCellContext.md) +- [AppColumnHelper](type-aliases/AppColumnHelper.md) +- [AppHeaderContext](type-aliases/AppHeaderContext.md) +- [AppReactTable](type-aliases/AppReactTable.md) +- [CreateTableHookOptions](type-aliases/CreateTableHookOptions.md) +- [FlexRenderProps](type-aliases/FlexRenderProps.md) +- [ReactTable](type-aliases/ReactTable.md) +- [Renderable](type-aliases/Renderable.md) +- [SubscribeProps](type-aliases/SubscribeProps.md) + +## Functions + +- [createTableHook](functions/createTableHook.md) +- [flexRender](functions/flexRender.md) +- [FlexRender](functions/FlexRender-1.md) +- [Subscribe](functions/Subscribe.md) +- [useTable](functions/useTable.md) diff --git a/docs/framework/react/reference/index/interfaces/AppCellComponent.md b/docs/framework/react/reference/index/interfaces/AppCellComponent.md new file mode 100644 index 0000000000..dba89e3e63 --- /dev/null +++ b/docs/framework/react/reference/index/interfaces/AppCellComponent.md @@ -0,0 +1,80 @@ +--- +id: AppCellComponent +title: AppCellComponent +--- + +# Interface: AppCellComponent()\ + +Defined in: [createTableHook.tsx:368](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L368) + +Component type for AppCell - wraps a cell and provides cell context with optional Subscribe + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TData + +`TData` *extends* `RowData` + +### TCellComponents + +`TCellComponents` *extends* `Record`\<`string`, `ComponentType`\<`any`\>\> + +## Call Signature + +```ts +AppCellComponent(props): ReactNode; +``` + +Defined in: [createTableHook.tsx:373](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L373) + +Component type for AppCell - wraps a cell and provides cell context with optional Subscribe + +### Type Parameters + +#### TValue + +`TValue` *extends* `unknown` = `unknown` + +### Parameters + +#### props + +[`AppCellPropsWithoutSelector`](AppCellPropsWithoutSelector.md)\<`TFeatures`, `TData`, `TValue`, `TCellComponents`\> + +### Returns + +`ReactNode` + +## Call Signature + +```ts +AppCellComponent(props): ReactNode; +``` + +Defined in: [createTableHook.tsx:381](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L381) + +Component type for AppCell - wraps a cell and provides cell context with optional Subscribe + +### Type Parameters + +#### TValue + +`TValue` *extends* `unknown` = `unknown` + +#### TSelected + +`TSelected` = `unknown` + +### Parameters + +#### props + +[`AppCellPropsWithSelector`](AppCellPropsWithSelector.md)\<`TFeatures`, `TData`, `TValue`, `TCellComponents`, `TSelected`\> + +### Returns + +`ReactNode` diff --git a/docs/framework/react/reference/index/interfaces/AppCellPropsWithSelector.md b/docs/framework/react/reference/index/interfaces/AppCellPropsWithSelector.md new file mode 100644 index 0000000000..182e8b3cc5 --- /dev/null +++ b/docs/framework/react/reference/index/interfaces/AppCellPropsWithSelector.md @@ -0,0 +1,86 @@ +--- +id: AppCellPropsWithSelector +title: AppCellPropsWithSelector +--- + +# Interface: AppCellPropsWithSelector\ + +Defined in: [createTableHook.tsx:313](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L313) + +Props for AppCell component - with selector + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TData + +`TData` *extends* `RowData` + +### TValue + +`TValue` *extends* `CellData` + +### TCellComponents + +`TCellComponents` *extends* `Record`\<`string`, `ComponentType`\<`any`\>\> + +### TSelected + +`TSelected` + +## Properties + +### cell + +```ts +cell: Cell; +``` + +Defined in: [createTableHook.tsx:320](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L320) + +*** + +### children() + +```ts +children: (cell, state) => ReactNode; +``` + +Defined in: [createTableHook.tsx:321](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L321) + +#### Parameters + +##### cell + +`Cell_Cell`\<`TFeatures`, `TData`, `TValue`\> & `UnionToIntersection`\<`"columnGroupingFeature"` *extends* keyof `TFeatures` ? `Cell_ColumnGrouping` : `never`\> & `UnionToIntersection`\<\{ \[K in string \| number \| symbol\]: TFeatures\[K\] extends TableFeature\ ? "Cell" extends keyof FeatureConstructorOptions ? FeatureConstructorOptions\[keyof FeatureConstructorOptions & "Cell"\] : never : any \}\[keyof `TFeatures`\]\> & `Cell_Plugins`\<`TFeatures`, `TData`, `TValue`\> & `TCellComponents` & `object` + +##### state + +`TSelected` + +#### Returns + +`ReactNode` + +*** + +### selector() + +```ts +selector: (state) => TSelected; +``` + +Defined in: [createTableHook.tsx:326](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L326) + +#### Parameters + +##### state + +`TableState`\<`TFeatures`\> + +#### Returns + +`TSelected` diff --git a/docs/framework/react/reference/index/interfaces/AppCellPropsWithoutSelector.md b/docs/framework/react/reference/index/interfaces/AppCellPropsWithoutSelector.md new file mode 100644 index 0000000000..31282d47c5 --- /dev/null +++ b/docs/framework/react/reference/index/interfaces/AppCellPropsWithoutSelector.md @@ -0,0 +1,68 @@ +--- +id: AppCellPropsWithoutSelector +title: AppCellPropsWithoutSelector +--- + +# Interface: AppCellPropsWithoutSelector\ + +Defined in: [createTableHook.tsx:296](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L296) + +Props for AppCell component - without selector + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TData + +`TData` *extends* `RowData` + +### TValue + +`TValue` *extends* `CellData` + +### TCellComponents + +`TCellComponents` *extends* `Record`\<`string`, `ComponentType`\<`any`\>\> + +## Properties + +### cell + +```ts +cell: Cell; +``` + +Defined in: [createTableHook.tsx:302](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L302) + +*** + +### children() + +```ts +children: (cell) => ReactNode; +``` + +Defined in: [createTableHook.tsx:303](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L303) + +#### Parameters + +##### cell + +`Cell_Cell`\<`TFeatures`, `TData`, `TValue`\> & `UnionToIntersection`\<`"columnGroupingFeature"` *extends* keyof `TFeatures` ? `Cell_ColumnGrouping` : `never`\> & `UnionToIntersection`\<\{ \[K in string \| number \| symbol\]: TFeatures\[K\] extends TableFeature\ ? "Cell" extends keyof FeatureConstructorOptions ? FeatureConstructorOptions\[keyof FeatureConstructorOptions & "Cell"\] : never : any \}\[keyof `TFeatures`\]\> & `Cell_Plugins`\<`TFeatures`, `TData`, `TValue`\> & `TCellComponents` & `object` + +#### Returns + +`ReactNode` + +*** + +### selector? + +```ts +optional selector: undefined; +``` + +Defined in: [createTableHook.tsx:307](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L307) diff --git a/docs/framework/react/reference/index/interfaces/AppHeaderComponent.md b/docs/framework/react/reference/index/interfaces/AppHeaderComponent.md new file mode 100644 index 0000000000..c00749f75b --- /dev/null +++ b/docs/framework/react/reference/index/interfaces/AppHeaderComponent.md @@ -0,0 +1,80 @@ +--- +id: AppHeaderComponent +title: AppHeaderComponent +--- + +# Interface: AppHeaderComponent()\ + +Defined in: [createTableHook.tsx:395](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L395) + +Component type for AppHeader/AppFooter - wraps a header and provides header context with optional Subscribe + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TData + +`TData` *extends* `RowData` + +### THeaderComponents + +`THeaderComponents` *extends* `Record`\<`string`, `ComponentType`\<`any`\>\> + +## Call Signature + +```ts +AppHeaderComponent(props): ReactNode; +``` + +Defined in: [createTableHook.tsx:400](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L400) + +Component type for AppHeader/AppFooter - wraps a header and provides header context with optional Subscribe + +### Type Parameters + +#### TValue + +`TValue` *extends* `unknown` = `unknown` + +### Parameters + +#### props + +[`AppHeaderPropsWithoutSelector`](AppHeaderPropsWithoutSelector.md)\<`TFeatures`, `TData`, `TValue`, `THeaderComponents`\> + +### Returns + +`ReactNode` + +## Call Signature + +```ts +AppHeaderComponent(props): ReactNode; +``` + +Defined in: [createTableHook.tsx:408](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L408) + +Component type for AppHeader/AppFooter - wraps a header and provides header context with optional Subscribe + +### Type Parameters + +#### TValue + +`TValue` *extends* `unknown` = `unknown` + +#### TSelected + +`TSelected` = `unknown` + +### Parameters + +#### props + +[`AppHeaderPropsWithSelector`](AppHeaderPropsWithSelector.md)\<`TFeatures`, `TData`, `TValue`, `THeaderComponents`, `TSelected`\> + +### Returns + +`ReactNode` diff --git a/docs/framework/react/reference/index/interfaces/AppHeaderPropsWithSelector.md b/docs/framework/react/reference/index/interfaces/AppHeaderPropsWithSelector.md new file mode 100644 index 0000000000..a56d2653d0 --- /dev/null +++ b/docs/framework/react/reference/index/interfaces/AppHeaderPropsWithSelector.md @@ -0,0 +1,88 @@ +--- +id: AppHeaderPropsWithSelector +title: AppHeaderPropsWithSelector +--- + +# Interface: AppHeaderPropsWithSelector\ + +Defined in: [createTableHook.tsx:349](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L349) + +Props for AppHeader/AppFooter component - with selector + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TData + +`TData` *extends* `RowData` + +### TValue + +`TValue` *extends* `CellData` + +### THeaderComponents + +`THeaderComponents` *extends* `Record`\<`string`, `ComponentType`\<`any`\>\> + +### TSelected + +`TSelected` + +## Properties + +### children() + +```ts +children: (header, state) => ReactNode; +``` + +Defined in: [createTableHook.tsx:357](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L357) + +#### Parameters + +##### header + +`Header_Core`\<`TFeatures`, `TData`, `TValue`\> & `UnionToIntersection`\< + \| `"columnSizingFeature"` *extends* keyof `TFeatures` ? `Header_ColumnSizing` : `never` + \| `"columnResizingFeature"` *extends* keyof `TFeatures` ? `Header_ColumnResizing` : `never`\> & `UnionToIntersection`\<\{ \[K in string \| number \| symbol\]: TFeatures\[K\] extends TableFeature\ ? "Header" extends keyof FeatureConstructorOptions ? FeatureConstructorOptions\[keyof FeatureConstructorOptions & "Header"\] : never : any \}\[keyof `TFeatures`\]\> & `Header_Plugins`\<`TFeatures`, `TData`, `TValue`\> & `THeaderComponents` & `object` + +##### state + +`TSelected` + +#### Returns + +`ReactNode` + +*** + +### header + +```ts +header: Header; +``` + +Defined in: [createTableHook.tsx:356](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L356) + +*** + +### selector() + +```ts +selector: (state) => TSelected; +``` + +Defined in: [createTableHook.tsx:362](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L362) + +#### Parameters + +##### state + +`TableState`\<`TFeatures`\> + +#### Returns + +`TSelected` diff --git a/docs/framework/react/reference/index/interfaces/AppHeaderPropsWithoutSelector.md b/docs/framework/react/reference/index/interfaces/AppHeaderPropsWithoutSelector.md new file mode 100644 index 0000000000..63a9566390 --- /dev/null +++ b/docs/framework/react/reference/index/interfaces/AppHeaderPropsWithoutSelector.md @@ -0,0 +1,70 @@ +--- +id: AppHeaderPropsWithoutSelector +title: AppHeaderPropsWithoutSelector +--- + +# Interface: AppHeaderPropsWithoutSelector\ + +Defined in: [createTableHook.tsx:332](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L332) + +Props for AppHeader/AppFooter component - without selector + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TData + +`TData` *extends* `RowData` + +### TValue + +`TValue` *extends* `CellData` + +### THeaderComponents + +`THeaderComponents` *extends* `Record`\<`string`, `ComponentType`\<`any`\>\> + +## Properties + +### children() + +```ts +children: (header) => ReactNode; +``` + +Defined in: [createTableHook.tsx:339](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L339) + +#### Parameters + +##### header + +`Header_Core`\<`TFeatures`, `TData`, `TValue`\> & `UnionToIntersection`\< + \| `"columnSizingFeature"` *extends* keyof `TFeatures` ? `Header_ColumnSizing` : `never` + \| `"columnResizingFeature"` *extends* keyof `TFeatures` ? `Header_ColumnResizing` : `never`\> & `UnionToIntersection`\<\{ \[K in string \| number \| symbol\]: TFeatures\[K\] extends TableFeature\ ? "Header" extends keyof FeatureConstructorOptions ? FeatureConstructorOptions\[keyof FeatureConstructorOptions & "Header"\] : never : any \}\[keyof `TFeatures`\]\> & `Header_Plugins`\<`TFeatures`, `TData`, `TValue`\> & `THeaderComponents` & `object` + +#### Returns + +`ReactNode` + +*** + +### header + +```ts +header: Header; +``` + +Defined in: [createTableHook.tsx:338](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L338) + +*** + +### selector? + +```ts +optional selector: undefined; +``` + +Defined in: [createTableHook.tsx:343](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L343) diff --git a/docs/framework/react/reference/index/interfaces/AppTableComponent.md b/docs/framework/react/reference/index/interfaces/AppTableComponent.md new file mode 100644 index 0000000000..f23d4432ce --- /dev/null +++ b/docs/framework/react/reference/index/interfaces/AppTableComponent.md @@ -0,0 +1,62 @@ +--- +id: AppTableComponent +title: AppTableComponent +--- + +# Interface: AppTableComponent()\ + +Defined in: [createTableHook.tsx:422](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L422) + +Component type for AppTable - root wrapper with optional Subscribe + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +## Call Signature + +```ts +AppTableComponent(props): ReactNode; +``` + +Defined in: [createTableHook.tsx:423](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L423) + +Component type for AppTable - root wrapper with optional Subscribe + +### Parameters + +#### props + +[`AppTablePropsWithoutSelector`](AppTablePropsWithoutSelector.md) + +### Returns + +`ReactNode` + +## Call Signature + +```ts +AppTableComponent(props): ReactNode; +``` + +Defined in: [createTableHook.tsx:424](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L424) + +Component type for AppTable - root wrapper with optional Subscribe + +### Type Parameters + +#### TSelected + +`TSelected` + +### Parameters + +#### props + +[`AppTablePropsWithSelector`](AppTablePropsWithSelector.md)\<`TFeatures`, `TSelected`\> + +### Returns + +`ReactNode` diff --git a/docs/framework/react/reference/index/interfaces/AppTablePropsWithSelector.md b/docs/framework/react/reference/index/interfaces/AppTablePropsWithSelector.md new file mode 100644 index 0000000000..839cfd9710 --- /dev/null +++ b/docs/framework/react/reference/index/interfaces/AppTablePropsWithSelector.md @@ -0,0 +1,60 @@ +--- +id: AppTablePropsWithSelector +title: AppTablePropsWithSelector +--- + +# Interface: AppTablePropsWithSelector\ + +Defined in: [createTableHook.tsx:285](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L285) + +Props for AppTable component - with selector + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TSelected + +`TSelected` + +## Properties + +### children() + +```ts +children: (state) => ReactNode; +``` + +Defined in: [createTableHook.tsx:289](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L289) + +#### Parameters + +##### state + +`TSelected` + +#### Returns + +`ReactNode` + +*** + +### selector() + +```ts +selector: (state) => TSelected; +``` + +Defined in: [createTableHook.tsx:290](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L290) + +#### Parameters + +##### state + +`TableState`\<`TFeatures`\> + +#### Returns + +`TSelected` diff --git a/docs/framework/react/reference/index/interfaces/AppTablePropsWithoutSelector.md b/docs/framework/react/reference/index/interfaces/AppTablePropsWithoutSelector.md new file mode 100644 index 0000000000..76b4a54f99 --- /dev/null +++ b/docs/framework/react/reference/index/interfaces/AppTablePropsWithoutSelector.md @@ -0,0 +1,30 @@ +--- +id: AppTablePropsWithoutSelector +title: AppTablePropsWithoutSelector +--- + +# Interface: AppTablePropsWithoutSelector + +Defined in: [createTableHook.tsx:277](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L277) + +Props for AppTable component - without selector + +## Properties + +### children + +```ts +children: ReactNode; +``` + +Defined in: [createTableHook.tsx:278](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L278) + +*** + +### selector? + +```ts +optional selector: undefined; +``` + +Defined in: [createTableHook.tsx:279](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L279) diff --git a/docs/framework/react/reference/index/type-aliases/AppCellContext.md b/docs/framework/react/reference/index/type-aliases/AppCellContext.md new file mode 100644 index 0000000000..41efda8227 --- /dev/null +++ b/docs/framework/react/reference/index/type-aliases/AppCellContext.md @@ -0,0 +1,105 @@ +--- +id: AppCellContext +title: AppCellContext +--- + +# Type Alias: AppCellContext\ + +```ts +type AppCellContext = object; +``` + +Defined in: [createTableHook.tsx:41](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L41) + +Enhanced CellContext with pre-bound cell components. +The `cell` property includes the registered cellComponents. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TData + +`TData` *extends* `RowData` + +### TValue + +`TValue` *extends* `CellData` + +### TCellComponents + +`TCellComponents` *extends* `Record`\<`string`, `ComponentType`\<`any`\>\> + +## Properties + +### cell + +```ts +cell: Cell & TCellComponents & object; +``` + +Defined in: [createTableHook.tsx:47](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L47) + +#### Type Declaration + +##### FlexRender() + +```ts +FlexRender: () => ReactNode; +``` + +###### Returns + +`ReactNode` + +*** + +### column + +```ts +column: Column; +``` + +Defined in: [createTableHook.tsx:49](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L49) + +*** + +### getValue + +```ts +getValue: CellContext["getValue"]; +``` + +Defined in: [createTableHook.tsx:50](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L50) + +*** + +### renderValue + +```ts +renderValue: CellContext["renderValue"]; +``` + +Defined in: [createTableHook.tsx:51](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L51) + +*** + +### row + +```ts +row: Row; +``` + +Defined in: [createTableHook.tsx:52](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L52) + +*** + +### table + +```ts +table: Table; +``` + +Defined in: [createTableHook.tsx:53](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L53) diff --git a/docs/framework/react/reference/index/type-aliases/AppColumnHelper.md b/docs/framework/react/reference/index/type-aliases/AppColumnHelper.md new file mode 100644 index 0000000000..c2e0e17422 --- /dev/null +++ b/docs/framework/react/reference/index/type-aliases/AppColumnHelper.md @@ -0,0 +1,144 @@ +--- +id: AppColumnHelper +title: AppColumnHelper +--- + +# Type Alias: AppColumnHelper\ + +```ts +type AppColumnHelper = object; +``` + +Defined in: [createTableHook.tsx:162](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L162) + +Enhanced column helper with pre-bound components in cell/header/footer contexts. +This enables TypeScript to know about the registered components when defining columns. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TData + +`TData` *extends* `RowData` + +### TCellComponents + +`TCellComponents` *extends* `Record`\<`string`, `ComponentType`\<`any`\>\> + +### THeaderComponents + +`THeaderComponents` *extends* `Record`\<`string`, `ComponentType`\<`any`\>\> + +## Properties + +### accessor() + +```ts +accessor: (accessor, column) => TAccessor extends AccessorFn ? AccessorFnColumnDef : AccessorKeyColumnDef; +``` + +Defined in: [createTableHook.tsx:172](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L172) + +Creates a data column definition with an accessor key or function. +The cell, header, and footer contexts include pre-bound components. + +#### Type Parameters + +##### TAccessor + +`TAccessor` *extends* `AccessorFn`\<`TData`\> \| `DeepKeys`\<`TData`\> + +##### TValue + +`TValue` *extends* `TAccessor` *extends* `AccessorFn`\<`TData`, infer TReturn\> ? `TReturn` : `TAccessor` *extends* `DeepKeys`\<`TData`\> ? `DeepValue`\<`TData`, `TAccessor`\> : `never` + +#### Parameters + +##### accessor + +`TAccessor` + +##### column + +`TAccessor` *extends* `AccessorFn`\<`TData`\> ? `AppColumnDefBase`\<`TFeatures`, `TData`, `TValue`, `TCellComponents`, `THeaderComponents`\> & `object` : `AppColumnDefBase`\<`TFeatures`, `TData`, `TValue`, `TCellComponents`, `THeaderComponents`\> + +#### Returns + +`TAccessor` *extends* `AccessorFn`\<`TData`\> ? `AccessorFnColumnDef`\<`TFeatures`, `TData`, `TValue`\> : `AccessorKeyColumnDef`\<`TFeatures`, `TData`, `TValue`\> + +*** + +### columns() + +```ts +columns: (columns) => ColumnDef[] & [...TColumns]; +``` + +Defined in: [createTableHook.tsx:203](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L203) + +Wraps an array of column definitions to preserve each column's individual TValue type. + +#### Type Parameters + +##### TColumns + +`TColumns` *extends* `ReadonlyArray`\<`ColumnDef`\<`TFeatures`, `TData`, `any`\>\> + +#### Parameters + +##### columns + +\[`...TColumns`\] + +#### Returns + +`ColumnDef`\<`TFeatures`, `TData`, `any`\>[] & \[`...TColumns`\] + +*** + +### display() + +```ts +display: (column) => DisplayColumnDef; +``` + +Defined in: [createTableHook.tsx:211](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L211) + +Creates a display column definition for non-data columns. +The cell, header, and footer contexts include pre-bound components. + +#### Parameters + +##### column + +`AppDisplayColumnDef`\<`TFeatures`, `TData`, `TCellComponents`, `THeaderComponents`\> + +#### Returns + +`DisplayColumnDef`\<`TFeatures`, `TData`, `unknown`\> + +*** + +### group() + +```ts +group: (column) => GroupColumnDef; +``` + +Defined in: [createTableHook.tsx:224](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L224) + +Creates a group column definition with nested child columns. +The cell, header, and footer contexts include pre-bound components. + +#### Parameters + +##### column + +`AppGroupColumnDef`\<`TFeatures`, `TData`, `TCellComponents`, `THeaderComponents`\> + +#### Returns + +`GroupColumnDef`\<`TFeatures`, `TData`, `unknown`\> diff --git a/docs/framework/react/reference/index/type-aliases/AppHeaderContext.md b/docs/framework/react/reference/index/type-aliases/AppHeaderContext.md new file mode 100644 index 0000000000..976c52cbeb --- /dev/null +++ b/docs/framework/react/reference/index/type-aliases/AppHeaderContext.md @@ -0,0 +1,75 @@ +--- +id: AppHeaderContext +title: AppHeaderContext +--- + +# Type Alias: AppHeaderContext\ + +```ts +type AppHeaderContext = object; +``` + +Defined in: [createTableHook.tsx:60](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L60) + +Enhanced HeaderContext with pre-bound header components. +The `header` property includes the registered headerComponents. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TData + +`TData` *extends* `RowData` + +### TValue + +`TValue` *extends* `CellData` + +### THeaderComponents + +`THeaderComponents` *extends* `Record`\<`string`, `ComponentType`\<`any`\>\> + +## Properties + +### column + +```ts +column: Column; +``` + +Defined in: [createTableHook.tsx:66](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L66) + +*** + +### header + +```ts +header: Header & THeaderComponents & object; +``` + +Defined in: [createTableHook.tsx:67](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L67) + +#### Type Declaration + +##### FlexRender() + +```ts +FlexRender: () => ReactNode; +``` + +###### Returns + +`ReactNode` + +*** + +### table + +```ts +table: Table; +``` + +Defined in: [createTableHook.tsx:69](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L69) diff --git a/docs/framework/react/reference/index/type-aliases/AppReactTable.md b/docs/framework/react/reference/index/type-aliases/AppReactTable.md new file mode 100644 index 0000000000..670aff204b --- /dev/null +++ b/docs/framework/react/reference/index/type-aliases/AppReactTable.md @@ -0,0 +1,127 @@ +--- +id: AppReactTable +title: AppReactTable +--- + +# Type Alias: AppReactTable\ + +```ts +type AppReactTable = ReactTable & NoInfer & object; +``` + +Defined in: [createTableHook.tsx:430](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L430) + +Extended table API returned by useAppTable with all App wrapper components + +## Type Declaration + +### AppCell + +```ts +AppCell: AppCellComponent>; +``` + +Wraps a cell and provides cell context with pre-bound cellComponents. +Optionally accepts a selector for Subscribe functionality. + +#### Example + +```tsx +// Without selector + + {(c) =>
{filters.length}{sorting.length} sorted
...
+ + +// With selector - children receives selected state + s.pagination}> + {(pagination) =>
Page {pagination.pageIndex}
} +
+``` + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TData + +`TData` *extends* `RowData` + +### TSelected + +`TSelected` + +### TTableComponents + +`TTableComponents` *extends* `Record`\<`string`, `ComponentType`\<`any`\>\> + +### TCellComponents + +`TCellComponents` *extends* `Record`\<`string`, `ComponentType`\<`any`\>\> + +### THeaderComponents + +`THeaderComponents` *extends* `Record`\<`string`, `ComponentType`\<`any`\>\> diff --git a/docs/framework/react/reference/index/type-aliases/CreateTableHookOptions.md b/docs/framework/react/reference/index/type-aliases/CreateTableHookOptions.md new file mode 100644 index 0000000000..a1ddac5529 --- /dev/null +++ b/docs/framework/react/reference/index/type-aliases/CreateTableHookOptions.md @@ -0,0 +1,83 @@ +--- +id: CreateTableHookOptions +title: CreateTableHookOptions +--- + +# Type Alias: CreateTableHookOptions\ + +```ts +type CreateTableHookOptions = Omit, "columns" | "data" | "store" | "state" | "initialState"> & object; +``` + +Defined in: [createTableHook.tsx:242](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L242) + +Options for creating a table hook with pre-bound components and default table options. +Extends all TableOptions except 'columns' | 'data' | 'store' | 'state' | 'initialState'. + +## Type Declaration + +### cellComponents? + +```ts +optional cellComponents: TCellComponents; +``` + +Cell-level components that need access to the cell instance. +These are available on the cell object passed to AppCell's children. +Use `useCellContext()` inside these components. + +#### Example + +```ts +{ TextCell, NumberCell, DateCell, CurrencyCell } +``` + +### headerComponents? + +```ts +optional headerComponents: THeaderComponents; +``` + +Header-level components that need access to the header instance. +These are available on the header object passed to AppHeader/AppFooter's children. +Use `useHeaderContext()` inside these components. + +#### Example + +```ts +{ SortIndicator, ColumnFilter, ResizeHandle } +``` + +### tableComponents? + +```ts +optional tableComponents: TTableComponents; +``` + +Table-level components that need access to the table instance. +These are available directly on the table object returned by useAppTable. +Use `useTableContext()` inside these components. + +#### Example + +```ts +{ PaginationControls, GlobalFilter, RowCount } +``` + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TTableComponents + +`TTableComponents` *extends* `Record`\<`string`, `ComponentType`\<`any`\>\> + +### TCellComponents + +`TCellComponents` *extends* `Record`\<`string`, `ComponentType`\<`any`\>\> + +### THeaderComponents + +`THeaderComponents` *extends* `Record`\<`string`, `ComponentType`\<`any`\>\> diff --git a/docs/framework/react/reference/index/type-aliases/FlexRenderProps.md b/docs/framework/react/reference/index/type-aliases/FlexRenderProps.md new file mode 100644 index 0000000000..f4bdb1ca51 --- /dev/null +++ b/docs/framework/react/reference/index/type-aliases/FlexRenderProps.md @@ -0,0 +1,58 @@ +--- +id: FlexRenderProps +title: FlexRenderProps +--- + +# Type Alias: FlexRenderProps\ + +```ts +type FlexRenderProps = + | { + cell: Cell; + footer?: never; + header?: never; +} + | { + cell?: never; + footer?: never; + header: Header; +} + | { + cell?: never; + footer: Header; + header?: never; +}; +``` + +Defined in: [FlexRender.tsx:63](https://github.com/TanStack/table/blob/main/packages/react-table/src/FlexRender.tsx#L63) + +Simplified component wrapper of `flexRender`. Use this utility component to render headers, cells, or footers with custom markup. +Only one prop (`cell`, `header`, or `footer`) may be passed. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TData + +`TData` *extends* `RowData` + +### TValue + +`TValue` *extends* `CellData` = `CellData` + +## Examples + +```ts + +``` + +```ts + +``` + +```ts + +``` diff --git a/docs/framework/react/reference/index/type-aliases/ReactTable.md b/docs/framework/react/reference/index/type-aliases/ReactTable.md new file mode 100644 index 0000000000..cd59b530ef --- /dev/null +++ b/docs/framework/react/reference/index/type-aliases/ReactTable.md @@ -0,0 +1,129 @@ +--- +id: ReactTable +title: ReactTable +--- + +# Type Alias: ReactTable\ + +```ts +type ReactTable = Table & object; +``` + +Defined in: [useTable.ts:23](https://github.com/TanStack/table/blob/main/packages/react-table/src/useTable.ts#L23) + +## Type Declaration + +### FlexRender() + +```ts +FlexRender: (props) => ReactNode; +``` + +A React component that renders headers, cells, or footers with custom markup. +Use this utility component instead of manually calling flexRender. + +#### Type Parameters + +##### TValue + +`TValue` *extends* `CellData` = `CellData` + +#### Parameters + +##### props + +[`FlexRenderProps`](FlexRenderProps.md)\<`TFeatures`, `TData`, `TValue`\> + +#### Returns + +`ReactNode` + +#### Example + +```tsx + + + +``` + +This replaces calling `flexRender` directly like this: +```tsx +flexRender(cell.column.columnDef.cell, cell.getContext()) +flexRender(header.column.columnDef.header, header.getContext()) +flexRender(footer.column.columnDef.footer, footer.getContext()) +``` + +### state + +```ts +readonly state: Readonly; +``` + +The selected state of the table. This state may not match the structure of `table.store.state` because it is selected by the `selector` function that you pass as the 2nd argument to `useTable`. + +#### Example + +```ts +const table = useTable(options, (state) => ({ globalFilter: state.globalFilter })) // only globalFilter is part of the selected state + +console.log(table.state.globalFilter) +``` + +### Subscribe() + +```ts +Subscribe: (props) => ReturnType; +``` + +A React HOC (Higher Order Component) that allows you to subscribe to the table state. + +This is useful for opting into state re-renders for specific parts of the table state. + +#### Type Parameters + +##### TSelected + +`TSelected` + +#### Parameters + +##### props + +###### children + +(`state`) => `ReactNode` \| `ReactNode` + +###### selector + +(`state`) => `TSelected` + +#### Returns + +`ReturnType`\<`FunctionComponent`\> + +#### Example + +```ts + ({ rowSelection: state.rowSelection })}> + {({ rowSelection }) => ( // important to include `{() => {()}}` syntax + + // render the row + + ))} + +``` + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TData + +`TData` *extends* `RowData` + +### TSelected + +`TSelected` = \{ +\} diff --git a/docs/framework/react/reference/index/type-aliases/Renderable.md b/docs/framework/react/reference/index/type-aliases/Renderable.md new file mode 100644 index 0000000000..745a7f1b66 --- /dev/null +++ b/docs/framework/react/reference/index/type-aliases/Renderable.md @@ -0,0 +1,18 @@ +--- +id: Renderable +title: Renderable +--- + +# Type Alias: Renderable\ + +```ts +type Renderable = ReactNode | ComponentType; +``` + +Defined in: [FlexRender.tsx:11](https://github.com/TanStack/table/blob/main/packages/react-table/src/FlexRender.tsx#L11) + +## Type Parameters + +### TProps + +`TProps` diff --git a/docs/framework/react/reference/index/type-aliases/SubscribeProps.md b/docs/framework/react/reference/index/type-aliases/SubscribeProps.md new file mode 100644 index 0000000000..9c476278c9 --- /dev/null +++ b/docs/framework/react/reference/index/type-aliases/SubscribeProps.md @@ -0,0 +1,75 @@ +--- +id: SubscribeProps +title: SubscribeProps +--- + +# Type Alias: SubscribeProps\ + +```ts +type SubscribeProps = object; +``` + +Defined in: [Subscribe.ts:12](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L12) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TData + +`TData` *extends* `RowData` + +### TSelected + +`TSelected` = \{ +\} + +## Properties + +### children + +```ts +children: (state) => ReactNode | ReactNode; +``` + +Defined in: [Subscribe.ts:30](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L30) + +The children to render. Can be a function that receives the selected state, or a React node. + +*** + +### selector() + +```ts +selector: (state) => TSelected; +``` + +Defined in: [Subscribe.ts:26](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L26) + +A selector function that selects the part of the table state to subscribe to. +This allows for fine-grained reactivity by only re-rendering when the selected state changes. + +#### Parameters + +##### state + +`NoInfer`\<`TableState`\<`TFeatures`\>\> + +#### Returns + +`TSelected` + +*** + +### table + +```ts +table: Table; +``` + +Defined in: [Subscribe.ts:21](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L21) + +The table instance to subscribe to. Required when using as a standalone component. +Not needed when using as `table.Subscribe`. diff --git a/docs/framework/react/reference/legacy/functions/getCoreRowModel.md b/docs/framework/react/reference/legacy/functions/getCoreRowModel.md new file mode 100644 index 0000000000..ea52ec4ad1 --- /dev/null +++ b/docs/framework/react/reference/legacy/functions/getCoreRowModel.md @@ -0,0 +1,29 @@ +--- +id: getCoreRowModel +title: getCoreRowModel +--- + +# ~~Function: getCoreRowModel()~~ + +```ts +function getCoreRowModel(): RowModelFactory; +``` + +Defined in: [useLegacyTable.ts:147](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L147) + +## Type Parameters + +### TData + +`TData` *extends* `RowData` + +## Returns + +`RowModelFactory`\<`TData`\> + +## Deprecated + +The core row model is always created automatically in v9. + +This is a stub function for v8 API compatibility with `useLegacyTable`. +It does nothing - the core row model is always available. diff --git a/docs/framework/react/reference/legacy/functions/getExpandedRowModel.md b/docs/framework/react/reference/legacy/functions/getExpandedRowModel.md new file mode 100644 index 0000000000..1f3761b69c --- /dev/null +++ b/docs/framework/react/reference/legacy/functions/getExpandedRowModel.md @@ -0,0 +1,29 @@ +--- +id: getExpandedRowModel +title: getExpandedRowModel +--- + +# ~~Function: getExpandedRowModel()~~ + +```ts +function getExpandedRowModel(): RowModelFactory; +``` + +Defined in: [useLegacyTable.ts:87](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L87) + +## Type Parameters + +### TData + +`TData` *extends* `RowData` + +## Returns + +`RowModelFactory`\<`TData`\> + +## Deprecated + +Use `createExpandedRowModel()` with the new `useTable` hook instead. + +This is a stub function for v8 API compatibility with `useLegacyTable`. +It acts as a marker to enable the expanded row model. diff --git a/docs/framework/react/reference/legacy/functions/getFacetedMinMaxValues.md b/docs/framework/react/reference/legacy/functions/getFacetedMinMaxValues.md new file mode 100644 index 0000000000..9e96727929 --- /dev/null +++ b/docs/framework/react/reference/legacy/functions/getFacetedMinMaxValues.md @@ -0,0 +1,29 @@ +--- +id: getFacetedMinMaxValues +title: getFacetedMinMaxValues +--- + +# ~~Function: getFacetedMinMaxValues()~~ + +```ts +function getFacetedMinMaxValues(): FacetedMinMaxValuesFactory; +``` + +Defined in: [useLegacyTable.ts:123](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L123) + +## Type Parameters + +### TData + +`TData` *extends* `RowData` + +## Returns + +`FacetedMinMaxValuesFactory`\<`TData`\> + +## Deprecated + +Use `createFacetedMinMaxValues()` with the new `useTable` hook instead. + +This is a stub function for v8 API compatibility with `useLegacyTable`. +It acts as a marker to enable the faceted min/max values. diff --git a/docs/framework/react/reference/legacy/functions/getFacetedRowModel.md b/docs/framework/react/reference/legacy/functions/getFacetedRowModel.md new file mode 100644 index 0000000000..3c79b345fa --- /dev/null +++ b/docs/framework/react/reference/legacy/functions/getFacetedRowModel.md @@ -0,0 +1,29 @@ +--- +id: getFacetedRowModel +title: getFacetedRowModel +--- + +# ~~Function: getFacetedRowModel()~~ + +```ts +function getFacetedRowModel(): FacetedRowModelFactory; +``` + +Defined in: [useLegacyTable.ts:111](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L111) + +## Type Parameters + +### TData + +`TData` *extends* `RowData` + +## Returns + +`FacetedRowModelFactory`\<`TData`\> + +## Deprecated + +Use `createFacetedRowModel()` with the new `useTable` hook instead. + +This is a stub function for v8 API compatibility with `useLegacyTable`. +It acts as a marker to enable the faceted row model. diff --git a/docs/framework/react/reference/legacy/functions/getFacetedUniqueValues.md b/docs/framework/react/reference/legacy/functions/getFacetedUniqueValues.md new file mode 100644 index 0000000000..1f187eed74 --- /dev/null +++ b/docs/framework/react/reference/legacy/functions/getFacetedUniqueValues.md @@ -0,0 +1,29 @@ +--- +id: getFacetedUniqueValues +title: getFacetedUniqueValues +--- + +# ~~Function: getFacetedUniqueValues()~~ + +```ts +function getFacetedUniqueValues(): FacetedUniqueValuesFactory; +``` + +Defined in: [useLegacyTable.ts:135](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L135) + +## Type Parameters + +### TData + +`TData` *extends* `RowData` + +## Returns + +`FacetedUniqueValuesFactory`\<`TData`\> + +## Deprecated + +Use `createFacetedUniqueValues()` with the new `useTable` hook instead. + +This is a stub function for v8 API compatibility with `useLegacyTable`. +It acts as a marker to enable the faceted unique values. diff --git a/docs/framework/react/reference/legacy/functions/getFilteredRowModel.md b/docs/framework/react/reference/legacy/functions/getFilteredRowModel.md new file mode 100644 index 0000000000..5da0133d43 --- /dev/null +++ b/docs/framework/react/reference/legacy/functions/getFilteredRowModel.md @@ -0,0 +1,29 @@ +--- +id: getFilteredRowModel +title: getFilteredRowModel +--- + +# ~~Function: getFilteredRowModel()~~ + +```ts +function getFilteredRowModel(): RowModelFactory; +``` + +Defined in: [useLegacyTable.ts:51](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L51) + +## Type Parameters + +### TData + +`TData` *extends* `RowData` + +## Returns + +`RowModelFactory`\<`TData`\> + +## Deprecated + +Use `createFilteredRowModel(filterFns)` with the new `useTable` hook instead. + +This is a stub function for v8 API compatibility with `useLegacyTable`. +It acts as a marker to enable the filtered row model. diff --git a/docs/framework/react/reference/legacy/functions/getGroupedRowModel.md b/docs/framework/react/reference/legacy/functions/getGroupedRowModel.md new file mode 100644 index 0000000000..49caf695bd --- /dev/null +++ b/docs/framework/react/reference/legacy/functions/getGroupedRowModel.md @@ -0,0 +1,29 @@ +--- +id: getGroupedRowModel +title: getGroupedRowModel +--- + +# ~~Function: getGroupedRowModel()~~ + +```ts +function getGroupedRowModel(): RowModelFactory; +``` + +Defined in: [useLegacyTable.ts:99](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L99) + +## Type Parameters + +### TData + +`TData` *extends* `RowData` + +## Returns + +`RowModelFactory`\<`TData`\> + +## Deprecated + +Use `createGroupedRowModel(aggregationFns)` with the new `useTable` hook instead. + +This is a stub function for v8 API compatibility with `useLegacyTable`. +It acts as a marker to enable the grouped row model. diff --git a/docs/framework/react/reference/legacy/functions/getPaginationRowModel.md b/docs/framework/react/reference/legacy/functions/getPaginationRowModel.md new file mode 100644 index 0000000000..b81291156d --- /dev/null +++ b/docs/framework/react/reference/legacy/functions/getPaginationRowModel.md @@ -0,0 +1,29 @@ +--- +id: getPaginationRowModel +title: getPaginationRowModel +--- + +# ~~Function: getPaginationRowModel()~~ + +```ts +function getPaginationRowModel(): RowModelFactory; +``` + +Defined in: [useLegacyTable.ts:75](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L75) + +## Type Parameters + +### TData + +`TData` *extends* `RowData` + +## Returns + +`RowModelFactory`\<`TData`\> + +## Deprecated + +Use `createPaginatedRowModel()` with the new `useTable` hook instead. + +This is a stub function for v8 API compatibility with `useLegacyTable`. +It acts as a marker to enable the paginated row model. diff --git a/docs/framework/react/reference/legacy/functions/getSortedRowModel.md b/docs/framework/react/reference/legacy/functions/getSortedRowModel.md new file mode 100644 index 0000000000..e57413fe53 --- /dev/null +++ b/docs/framework/react/reference/legacy/functions/getSortedRowModel.md @@ -0,0 +1,29 @@ +--- +id: getSortedRowModel +title: getSortedRowModel +--- + +# ~~Function: getSortedRowModel()~~ + +```ts +function getSortedRowModel(): RowModelFactory; +``` + +Defined in: [useLegacyTable.ts:63](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L63) + +## Type Parameters + +### TData + +`TData` *extends* `RowData` + +## Returns + +`RowModelFactory`\<`TData`\> + +## Deprecated + +Use `createSortedRowModel(sortFns)` with the new `useTable` hook instead. + +This is a stub function for v8 API compatibility with `useLegacyTable`. +It acts as a marker to enable the sorted row model. diff --git a/docs/framework/react/reference/legacy/functions/legacyCreateColumnHelper.md b/docs/framework/react/reference/legacy/functions/legacyCreateColumnHelper.md new file mode 100644 index 0000000000..e6e59f0f74 --- /dev/null +++ b/docs/framework/react/reference/legacy/functions/legacyCreateColumnHelper.md @@ -0,0 +1,29 @@ +--- +id: legacyCreateColumnHelper +title: legacyCreateColumnHelper +--- + +# ~~Function: legacyCreateColumnHelper()~~ + +```ts +function legacyCreateColumnHelper(): ColumnHelper; +``` + +Defined in: [useLegacyTable.ts:321](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L321) + +## Type Parameters + +### TData + +`TData` *extends* `RowData` + +## Returns + +`ColumnHelper`\<`StockFeatures`, `TData`\> + +## Deprecated + +Use `createColumnHelper()` with useTable instead. + +A column helper with StockFeatures pre-bound for use with useLegacyTable. +Only requires TData—no need to specify TFeatures. diff --git a/docs/framework/react/reference/legacy/functions/useLegacyTable.md b/docs/framework/react/reference/legacy/functions/useLegacyTable.md new file mode 100644 index 0000000000..d78c897c86 --- /dev/null +++ b/docs/framework/react/reference/legacy/functions/useLegacyTable.md @@ -0,0 +1,64 @@ +--- +id: useLegacyTable +title: useLegacyTable +--- + +# ~~Function: useLegacyTable()~~ + +```ts +function useLegacyTable(options): LegacyReactTable; +``` + +Defined in: [useLegacyTable.ts:363](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L363) + +## Type Parameters + +### TData + +`TData` *extends* `RowData` + +## Parameters + +### options + +[`LegacyTableOptions`](../type-aliases/LegacyTableOptions.md)\<`TData`\> + +Legacy v8-style table options + +## Returns + +[`LegacyReactTable`](../type-aliases/LegacyReactTable.md)\<`TData`\> + +A table instance with the full state subscribed and a `getState()` method + +## Deprecated + +This hook is provided as a compatibility layer for migrating from TanStack Table v8. + +Use the new `useTable` hook instead with explicit `_features` and `_rowModels`: + +```tsx +// New v9 API +const _features = tableFeatures({ + columnFilteringFeature, + rowSortingFeature, + rowPaginationFeature, +}) + +const table = useTable({ + _features, + _rowModels: { + filteredRowModel: createFilteredRowModel(filterFns), + sortedRowModel: createSortedRowModel(sortFns), + paginatedRowModel: createPaginatedRowModel(), + }, + columns, + data, +}) +``` + +Key differences from v8: +- Features are tree-shakeable - only import what you use +- Row models are explicitly passed via `_rowModels` +- Use `table.Subscribe` for fine-grained re-renders +- State is accessed via `table.state` after selecting with the 2nd argument diff --git a/docs/framework/react/reference/legacy/index.md b/docs/framework/react/reference/legacy/index.md new file mode 100644 index 0000000000..c9cbb07be9 --- /dev/null +++ b/docs/framework/react/reference/legacy/index.md @@ -0,0 +1,36 @@ +--- +id: legacy +title: legacy +--- + +# legacy + +## Interfaces + +- [LegacyRowModelOptions](interfaces/LegacyRowModelOptions.md) + +## Type Aliases + +- [~~LegacyCell~~](type-aliases/LegacyCell.md) +- [~~LegacyColumn~~](type-aliases/LegacyColumn.md) +- [~~LegacyColumnDef~~](type-aliases/LegacyColumnDef.md) +- [~~LegacyHeader~~](type-aliases/LegacyHeader.md) +- [~~LegacyHeaderGroup~~](type-aliases/LegacyHeaderGroup.md) +- [~~LegacyReactTable~~](type-aliases/LegacyReactTable.md) +- [~~LegacyRow~~](type-aliases/LegacyRow.md) +- [~~LegacyTable~~](type-aliases/LegacyTable.md) +- [~~LegacyTableOptions~~](type-aliases/LegacyTableOptions.md) + +## Functions + +- [~~getCoreRowModel~~](functions/getCoreRowModel.md) +- [~~getExpandedRowModel~~](functions/getExpandedRowModel.md) +- [~~getFacetedMinMaxValues~~](functions/getFacetedMinMaxValues.md) +- [~~getFacetedRowModel~~](functions/getFacetedRowModel.md) +- [~~getFacetedUniqueValues~~](functions/getFacetedUniqueValues.md) +- [~~getFilteredRowModel~~](functions/getFilteredRowModel.md) +- [~~getGroupedRowModel~~](functions/getGroupedRowModel.md) +- [~~getPaginationRowModel~~](functions/getPaginationRowModel.md) +- [~~getSortedRowModel~~](functions/getSortedRowModel.md) +- [~~legacyCreateColumnHelper~~](functions/legacyCreateColumnHelper.md) +- [~~useLegacyTable~~](functions/useLegacyTable.md) diff --git a/docs/framework/react/reference/legacy/interfaces/LegacyRowModelOptions.md b/docs/framework/react/reference/legacy/interfaces/LegacyRowModelOptions.md new file mode 100644 index 0000000000..10be482269 --- /dev/null +++ b/docs/framework/react/reference/legacy/interfaces/LegacyRowModelOptions.md @@ -0,0 +1,160 @@ +--- +id: LegacyRowModelOptions +title: LegacyRowModelOptions +--- + +# Interface: LegacyRowModelOptions\ + +Defined in: [useLegacyTable.ts:191](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L191) + +Legacy v8-style row model options + +## Type Parameters + +### TData + +`TData` *extends* `RowData` + +## Properties + +### ~~getCoreRowModel?~~ + +```ts +optional getCoreRowModel: RowModelFactory; +``` + +Defined in: [useLegacyTable.ts:196](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L196) + +Returns the core row model for the table. + +#### Deprecated + +This option is no longer needed in v9. The core row model is always created automatically. + +*** + +### ~~getExpandedRowModel?~~ + +```ts +optional getExpandedRowModel: RowModelFactory; +``` + +Defined in: [useLegacyTable.ts:216](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L216) + +Returns the expanded row model for the table. + +#### Deprecated + +Use `_rowModels.expandedRowModel` with `createExpandedRowModel()` instead. + +*** + +### ~~getFacetedMinMaxValues?~~ + +```ts +optional getFacetedMinMaxValues: FacetedMinMaxValuesFactory; +``` + +Defined in: [useLegacyTable.ts:231](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L231) + +Returns the faceted min/max values for a column. + +#### Deprecated + +Use `_rowModels.facetedMinMaxValues` with `createFacetedMinMaxValues()` instead. + +*** + +### ~~getFacetedRowModel?~~ + +```ts +optional getFacetedRowModel: FacetedRowModelFactory; +``` + +Defined in: [useLegacyTable.ts:226](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L226) + +Returns the faceted row model for a column. + +#### Deprecated + +Use `_rowModels.facetedRowModel` with `createFacetedRowModel()` instead. + +*** + +### ~~getFacetedUniqueValues?~~ + +```ts +optional getFacetedUniqueValues: FacetedUniqueValuesFactory; +``` + +Defined in: [useLegacyTable.ts:236](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L236) + +Returns the faceted unique values for a column. + +#### Deprecated + +Use `_rowModels.facetedUniqueValues` with `createFacetedUniqueValues()` instead. + +*** + +### ~~getFilteredRowModel?~~ + +```ts +optional getFilteredRowModel: RowModelFactory; +``` + +Defined in: [useLegacyTable.ts:201](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L201) + +Returns the filtered row model for the table. + +#### Deprecated + +Use `_rowModels.filteredRowModel` with `createFilteredRowModel(filterFns)` instead. + +*** + +### ~~getGroupedRowModel?~~ + +```ts +optional getGroupedRowModel: RowModelFactory; +``` + +Defined in: [useLegacyTable.ts:221](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L221) + +Returns the grouped row model for the table. + +#### Deprecated + +Use `_rowModels.groupedRowModel` with `createGroupedRowModel(aggregationFns)` instead. + +*** + +### ~~getPaginationRowModel?~~ + +```ts +optional getPaginationRowModel: RowModelFactory; +``` + +Defined in: [useLegacyTable.ts:211](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L211) + +Returns the paginated row model for the table. + +#### Deprecated + +Use `_rowModels.paginatedRowModel` with `createPaginatedRowModel()` instead. + +*** + +### ~~getSortedRowModel?~~ + +```ts +optional getSortedRowModel: RowModelFactory; +``` + +Defined in: [useLegacyTable.ts:206](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L206) + +Returns the sorted row model for the table. + +#### Deprecated + +Use `_rowModels.sortedRowModel` with `createSortedRowModel(sortFns)` instead. diff --git a/docs/framework/react/reference/legacy/type-aliases/LegacyCell.md b/docs/framework/react/reference/legacy/type-aliases/LegacyCell.md new file mode 100644 index 0000000000..7c9ea96eeb --- /dev/null +++ b/docs/framework/react/reference/legacy/type-aliases/LegacyCell.md @@ -0,0 +1,26 @@ +--- +id: LegacyCell +title: LegacyCell +--- + +# ~~Type Alias: LegacyCell\~~ + +```ts +type LegacyCell = Cell; +``` + +Defined in: [useLegacyTable.ts:285](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L285) + +## Type Parameters + +### TData + +`TData` *extends* `RowData` + +### TValue + +`TValue` = `unknown` + +## Deprecated + +Use Cell with useTable instead. diff --git a/docs/framework/react/reference/legacy/type-aliases/LegacyColumn.md b/docs/framework/react/reference/legacy/type-aliases/LegacyColumn.md new file mode 100644 index 0000000000..ee2ae227d5 --- /dev/null +++ b/docs/framework/react/reference/legacy/type-aliases/LegacyColumn.md @@ -0,0 +1,26 @@ +--- +id: LegacyColumn +title: LegacyColumn +--- + +# ~~Type Alias: LegacyColumn\~~ + +```ts +type LegacyColumn = Column; +``` + +Defined in: [useLegacyTable.ts:275](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L275) + +## Type Parameters + +### TData + +`TData` *extends* `RowData` + +### TValue + +`TValue` = `unknown` + +## Deprecated + +Use Column with useTable instead. diff --git a/docs/framework/react/reference/legacy/type-aliases/LegacyColumnDef.md b/docs/framework/react/reference/legacy/type-aliases/LegacyColumnDef.md new file mode 100644 index 0000000000..8fc73806cc --- /dev/null +++ b/docs/framework/react/reference/legacy/type-aliases/LegacyColumnDef.md @@ -0,0 +1,26 @@ +--- +id: LegacyColumnDef +title: LegacyColumnDef +--- + +# ~~Type Alias: LegacyColumnDef\~~ + +```ts +type LegacyColumnDef = ColumnDef; +``` + +Defined in: [useLegacyTable.ts:305](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L305) + +## Type Parameters + +### TData + +`TData` *extends* `RowData` + +### TValue + +`TValue` = `unknown` + +## Deprecated + +Use ColumnDef with useTable instead. diff --git a/docs/framework/react/reference/legacy/type-aliases/LegacyHeader.md b/docs/framework/react/reference/legacy/type-aliases/LegacyHeader.md new file mode 100644 index 0000000000..f67e32690b --- /dev/null +++ b/docs/framework/react/reference/legacy/type-aliases/LegacyHeader.md @@ -0,0 +1,26 @@ +--- +id: LegacyHeader +title: LegacyHeader +--- + +# ~~Type Alias: LegacyHeader\~~ + +```ts +type LegacyHeader = Header; +``` + +Defined in: [useLegacyTable.ts:292](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L292) + +## Type Parameters + +### TData + +`TData` *extends* `RowData` + +### TValue + +`TValue` = `unknown` + +## Deprecated + +Use Header with useTable instead. diff --git a/docs/framework/react/reference/legacy/type-aliases/LegacyHeaderGroup.md b/docs/framework/react/reference/legacy/type-aliases/LegacyHeaderGroup.md new file mode 100644 index 0000000000..85d9def0b6 --- /dev/null +++ b/docs/framework/react/reference/legacy/type-aliases/LegacyHeaderGroup.md @@ -0,0 +1,22 @@ +--- +id: LegacyHeaderGroup +title: LegacyHeaderGroup +--- + +# ~~Type Alias: LegacyHeaderGroup\~~ + +```ts +type LegacyHeaderGroup = HeaderGroup; +``` + +Defined in: [useLegacyTable.ts:299](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L299) + +## Type Parameters + +### TData + +`TData` *extends* `RowData` + +## Deprecated + +Use HeaderGroup with useTable instead. diff --git a/docs/framework/react/reference/legacy/type-aliases/LegacyReactTable.md b/docs/framework/react/reference/legacy/type-aliases/LegacyReactTable.md new file mode 100644 index 0000000000..e17a04b06e --- /dev/null +++ b/docs/framework/react/reference/legacy/type-aliases/LegacyReactTable.md @@ -0,0 +1,42 @@ +--- +id: LegacyReactTable +title: LegacyReactTable +--- + +# ~~Type Alias: LegacyReactTable\~~ + +```ts +type LegacyReactTable = ReactTable> & object; +``` + +Defined in: [useLegacyTable.ts:258](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L258) + +Legacy table instance type that includes the v8-style `getState()` method. + +## Type Declaration + +### ~~getState()~~ + +```ts +getState: () => TableState; +``` + +Returns the current table state. + +#### Returns + +`TableState`\<`StockFeatures`\> + +#### Deprecated + +In v9, access state directly via `table.state` or use `table.store.state` for the full state. + +## Type Parameters + +### TData + +`TData` *extends* `RowData` + +## Deprecated + +Use `useTable` with explicit state selection instead. diff --git a/docs/framework/react/reference/legacy/type-aliases/LegacyRow.md b/docs/framework/react/reference/legacy/type-aliases/LegacyRow.md new file mode 100644 index 0000000000..c1f7ba39f2 --- /dev/null +++ b/docs/framework/react/reference/legacy/type-aliases/LegacyRow.md @@ -0,0 +1,22 @@ +--- +id: LegacyRow +title: LegacyRow +--- + +# ~~Type Alias: LegacyRow\~~ + +```ts +type LegacyRow = Row; +``` + +Defined in: [useLegacyTable.ts:282](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L282) + +## Type Parameters + +### TData + +`TData` *extends* `RowData` + +## Deprecated + +Use Row with useTable instead. diff --git a/docs/framework/react/reference/legacy/type-aliases/LegacyTable.md b/docs/framework/react/reference/legacy/type-aliases/LegacyTable.md new file mode 100644 index 0000000000..523d8e76cf --- /dev/null +++ b/docs/framework/react/reference/legacy/type-aliases/LegacyTable.md @@ -0,0 +1,22 @@ +--- +id: LegacyTable +title: LegacyTable +--- + +# ~~Type Alias: LegacyTable\~~ + +```ts +type LegacyTable = Table; +``` + +Defined in: [useLegacyTable.ts:309](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L309) + +## Type Parameters + +### TData + +`TData` *extends* `RowData` + +## Deprecated + +Use Table with useTable instead. diff --git a/docs/framework/react/reference/legacy/type-aliases/LegacyTableOptions.md b/docs/framework/react/reference/legacy/type-aliases/LegacyTableOptions.md new file mode 100644 index 0000000000..c520c5f649 --- /dev/null +++ b/docs/framework/react/reference/legacy/type-aliases/LegacyTableOptions.md @@ -0,0 +1,27 @@ +--- +id: LegacyTableOptions +title: LegacyTableOptions +--- + +# ~~Type Alias: LegacyTableOptions\~~ + +```ts +type LegacyTableOptions = Omit, "_features" | "_rowModels"> & LegacyRowModelOptions; +``` + +Defined in: [useLegacyTable.ts:247](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L247) + +Legacy v8-style table options that work with useLegacyTable. + +This type omits `_features` and `_rowModels` and instead accepts the v8-style +`get*RowModel` function options. + +## Type Parameters + +### TData + +`TData` *extends* `RowData` + +## Deprecated + +This is a compatibility layer for migrating from v8. Use `useTable` with explicit `_features` and `_rowModels` instead. diff --git a/docs/framework/solid/guide/table-state.md b/docs/framework/solid/guide/table-state.md new file mode 100644 index 0000000000..83a77d7f2f --- /dev/null +++ b/docs/framework/solid/guide/table-state.md @@ -0,0 +1,221 @@ +--- +title: Table State (Solid) Guide +--- + +## Table State (Solid) Guide + +TanStack Table has a simple underlying internal state management system to store and manage the state of the table. It also lets you selectively pull out any state that you need to manage in your own state management. This guide will walk you through the different ways in which you can interact with and manage the state of the table. + +### Accessing Table State + +You do not need to set up anything special in order for the table state to work. If you pass nothing into either `state`, `initialState`, or any of the `on[State]Change` table options, the table will manage its own state internally. You can access any part of this internal state by using the `table.store.state` table instance API. + +```jsx +const table = createTable({ + columns, + get data() { + return data() + }, + //... +}) + +console.log(table.store.state) //access the entire internal state +console.log(table.store.state.rowSelection) //access just the row selection state +``` + +### Custom Initial State + +If all you need to do for certain states is customize their initial default values, you still do not need to manage any of the state yourself. You can simply set values in the `initialState` option of the table instance. + +```jsx +const table = createTable({ + columns, + data, + initialState: { + columnOrder: ['age', 'firstName', 'lastName'], //customize the initial column order + columnVisibility: { + id: false //hide the id column by default + }, + expanded: true, //expand all rows by default + sorting: [ + { + id: 'age', + desc: true //sort by age in descending order by default + } + ] + }, + //... +}) +``` + +> **Note**: Only specify each particular state in either `initialState` or `state`, but not both. If you pass in a particular state value to both `initialState` and `state`, the initialized state in `state` will take overwrite any corresponding value in `initialState`. + +### Controlled State + +If you need easy access to the table state in other areas of your application, TanStack Table makes it easy to control and manage any or all of the table state in your own state management system. You can do this by passing in your own state and state management functions to the `state` and `on[State]Change` table options. + +#### Individual Controlled State + +You can control just the state that you need easy access to. You do NOT have to control all of the table state if you do not need to. It is recommended to only control the state that you need on a case-by-case basis. + +In order to control a particular state, you need to both pass in the corresponding `state` value and the `on[State]Change` function to the table instance. + +Let's take filtering, sorting, and pagination as an example in a "manual" server-side data fetching scenario. You can store the filtering, sorting, and pagination state in your own state management, but leave out any other state like column order, column visibility, etc. if your API does not care about those values. + +```jsx +const [columnFilters, setColumnFilters] = createSignal([]) //no default filters +const [sorting, setSorting] = createSignal([{ + id: 'age', + desc: true, //sort by age in descending order by default +}]) +const [pagination, setPagination] = createSignal({ pageIndex: 0, pageSize: 15 }) + +//Use our controlled state values to fetch data +const tableQuery = createQuery({ + queryKey: ['users', columnFilters, sorting, pagination], + queryFn: () => fetchUsers(columnFilters, sorting, pagination), + //... +}) + +const table = createTable({ + columns, + get data() { + return tableQuery.data() + }, + //... + state: { + get columnFilters() { + return columnFilters() //pass controlled state back to the table (overrides internal state) + }, + get sorting() { + return sorting() + }, + get pagination() { + return pagination() + }, + }, + onColumnFiltersChange: setColumnFilters, //hoist columnFilters state into our own state management + onSortingChange: setSorting, + onPaginationChange: setPagination, +}) +//... +``` + +#### Fully Controlled State + +Alternatively, you can control the entire table state with the `onStateChange` table option. It will hoist out the entire table state into your own state management system. Be careful with this approach, as you might find that raising some frequently changing state values up a solid tree, like `columnSizingInfo` state`, might cause bad performance issues. + +A couple of more tricks may be needed to make this work. If you use the `onStateChange` table option, the initial values of the `state` must be populated with all of the relevant state values for all of the features that you want to use. You can either manually type out all of the initial state values, or use the `table.setOptions` API in a special way as shown below. + +```jsx +//create a table instance with default state values +const table = createTable({ + columns, + get data() { + return data() + }, + //... Note: `state` values are NOT passed in yet +}) + + +const [state, setState] = createSignal({ + ...table.initialState, //populate the initial state with all of the default state values from the table instance + pagination: { + pageIndex: 0, + pageSize: 15 //optionally customize the initial pagination state. + } +}) + +//Use the table.setOptions API to merge our fully controlled state onto the table instance +table.setOptions(prev => ({ + ...prev, //preserve any other options that we have set up above + get state() { + return state() //our fully controlled state overrides the internal state + }, + onStateChange: setState //any state changes will be pushed up to our own state management +})) +``` + +### On State Change Callbacks + +So far, we have seen the `on[State]Change` and `onStateChange` table options work to "hoist" the table state changes into our own state management. However, there are a few things about these using these options that you should be aware of. + +#### 1. **State Change Callbacks MUST have their corresponding state value in the `state` option**. + +Specifying an `on[State]Change` callback tells the table instance that this will be a controlled state. If you do not specify the corresponding `state` value, that state will be "frozen" with its initial value. + +```jsx +const [sorting, setSorting] = createSignal([]) +//... +const table = createTable({ + columns, + data, + //... + state: { + get sorting() { + return sorting() //required because we are using `onSortingChange` + }, + }, + onSortingChange: setSorting, //makes the `state.sorting` controlled +}) +``` + +#### 2. **Updaters can either be raw values or callback functions**. + +The `on[State]Change` and `onStateChange` callbacks work exactly like the `setState` functions in React (Solid Setters). The updater values can either be a new state value or a callback function that takes the previous state value and returns the new state value. + +What implications does this have? It means that if you want to add in some extra logic in any of the `on[State]Change` callbacks, you can do so, but you need to check whether or not the new incoming updater value is a function or value. + +```jsx +const [sorting, setSorting] = createSignal([]) +const [pagination, setPagination] = createSignal({ pageIndex: 0, pageSize: 10 }) + +const table = createTable({ + get columns() { + return columns() + }, + get data() { + return data() + }, + //... + state: { + get pagination() { + return pagination() + }, + get sorting() { + return sorting() + }, + } + //syntax 1 + onPaginationChange: (updater) => { + setPagination(old => { + const newPaginationValue = updater instanceof Function ? updater(old) : updater + //do something with the new pagination value + //... + return newPaginationValue + }) + }, + //syntax 2 + onSortingChange: (updater) => { + const newSortingValue = updater instanceof Function ? updater(sorting) : updater + //do something with the new sorting value + //... + setSorting(updater) //normal state update + } +}) +``` + +### State Types + +All complex states in TanStack Table have their own TypeScript types that you can import and use. This can be handy for ensuring that you are using the correct data structures and properties for the state values that you are controlling. + +```tsx +import { createTable, type SortingState } from '@tanstack/solid-table' +//... +const [sorting, setSorting] = createSignal([ + { + id: 'age', //you should get autocomplete for the `id` and `desc` properties + desc: true, + } +]) +``` \ No newline at end of file diff --git a/docs/framework/solid/solid-table.md b/docs/framework/solid/solid-table.md new file mode 100644 index 0000000000..9afcd01f6a --- /dev/null +++ b/docs/framework/solid/solid-table.md @@ -0,0 +1,19 @@ +--- +title: Solid Table +--- + +The `@tanstack/solid-table` adapter is a wrapper around the core table logic. Most of it's job is related to managing state the "solid" way, providing types and the rendering implementation of cell/header/footer templates. + +## `createTable` + +Takes an `options` object and returns a table. + +```tsx +import { createTable } from '@tanstack/solid-table' + +function App() { + const table = createTable(options) + + // ...render your table +} +``` diff --git a/docs/framework/svelte/guide/table-state.md b/docs/framework/svelte/guide/table-state.md new file mode 100644 index 0000000000..a45cc3f675 --- /dev/null +++ b/docs/framework/svelte/guide/table-state.md @@ -0,0 +1,217 @@ +--- +title: Table State (Svelte) Guide +--- + +## Table State (Svelte) Guide + +TanStack Table has a simple underlying internal state management system to store and manage the state of the table. It also lets you selectively pull out any state that you need to manage in your own state management. This guide will walk you through the different ways in which you can interact with and manage the state of the table. + +### Accessing Table State + +You do not need to set up anything special in order for the table state to work. If you pass nothing into either `state`, `initialState`, or any of the `on[State]Change` table options, the table will manage its own state internally. You can access any part of this internal state by using the `table.store.state` table instance API. + +```ts +const table = createTable({ + columns, + get data() { + return data + }, + //... +}) + +console.log(table.store.state) //access the entire internal state +console.log(table.store.state.rowSelection) //access just the row selection state +``` + +### Custom Initial State + +If all you need to do for certain states is customize their initial default values, you still do not need to manage any of the state yourself. You can simply set values in the `initialState` option of the table instance. + +```ts +const table = createTable({ + columns, + data, + initialState: { + columnOrder: ['age', 'firstName', 'lastName'], //customize the initial column order + columnVisibility: { + id: false //hide the id column by default + }, + expanded: true, //expand all rows by default + sorting: [ + { + id: 'age', + desc: true //sort by age in descending order by default + } + ] + }, + //... +}) +``` + +> **Note**: Only specify each particular state in either `initialState` or `state`, but not both. If you pass in a particular state value to both `initialState` and `state`, the initialized state in `state` will overwrite any corresponding value in `initialState`. + +### Controlled State + +If you need easy access to the table state in other areas of your application, TanStack Table makes it easy to control and manage any or all of the table state in your own state management system. You can do this by passing in your own state and state management functions to the `state` and `on[State]Change` table options. + +#### Individual Controlled State + +You can control just the state that you need easy access to. You do NOT have to control all of the table state if you do not need to. It is recommended to only control the state that you need on a case-by-case basis. + +In order to control a particular state, you need to both pass in the corresponding `state` value and the `on[State]Change` function to the table instance. + +Let's take filtering, sorting, and pagination as an example in a "manual" server-side data fetching scenario. You can store the filtering, sorting, and pagination state in your own state management, but leave out any other state like column order, column visibility, etc. if your API does not care about those values. + +```ts +let sorting: SortingState = $state([ + { + id: 'age', + desc: true, //sort by age in descending order by default + }, +]) +function setSorting(updater: Updater) { + if (updater instanceof Function) { + sorting = updater(sorting) + } else sorting = updater +} + +let columnFilters: ColumnFiltersState = $state([]) //no default filters +function setColumnFilters(updater: Updater) { + if (updater instanceof Function) { + columnFilters = updater(columnFilters) + } else columnFilters = updater +} + +let pagination: PaginationState = $state( + { pageIndex: 0, pageSize: 15 } //default pagination +) +function setPagination(updater: Updater) { + if (updater instanceof Function) { + pagination = updater(pagination) + } else pagination = updater +} + +let data = $state(makeData(100_000)) + +const options = { + columns, + get data() { + return data + } + //... + state: { + get sorting() { + return sorting + }, + get columnFilters() { + return columnFilters + }, + get pagination() { + return pagination + } + }, + onColumnFiltersChange: setColumnFilters, //hoist columnFilters state into our own state management + onSortingChange: setSorting, + onPaginationChange: setPagination, +} + +const table = createTable(options) +//... +``` + +#### Fully Controlled State + +Alternatively, you can control the entire table state with the `onStateChange` table option. It will hoist out the entire table state into your own state management system. Be careful with this approach, as you might find that raising some frequently changing state values up a Svelte tree, like `columnSizingInfo` state, might cause bad performance issues. + +A couple of more tricks may be needed to make this work. If you use the `onStateChange` table option, the initial values of the `state` must be populated with all of the relevant state values for all of the features that you want to use. You can either manually type out all of the initial state values, or use the `table.setOptions` API in a special way as shown below. + +```ts +//create a table instance with default state values +const table = createTable({ + columns, + get data() { + return data + }, + //... Note: `state` values are NOT passed in yet +}) + +const state = $state({ + ...table.initialState, //populate the initial state with all of the default state values from the table instance + pagination: { + pageIndex: 0, + pageSize: 15 //optionally customize the initial pagination state. + } +}) + +const setState = updater => { + if (updater instanceof Function) { + state = updater(state) + } state = updater +} + +//Use the table.setOptions API to merge our fully controlled state onto the table instance +table.setOptions(prev => ({ + ...prev, //preserve any other options that we have set up above + get state() { + return state //our fully controlled state overrides the internal state + }, + onStateChange: setState //any state changes will be pushed up to our own state management +})) +``` + +### On State Change Callbacks + +So far, we have seen the `on[State]Change` and `onStateChange` table options work to "hoist" the table state changes into our own state management. However, there are a few things about using these options that you should be aware of. + +#### 1. **State Change Callbacks MUST have their corresponding state value in the `state` option**. + +Specifying an `on[State]Change` callback tells the table instance that this will be a controlled state. If you do not specify the corresponding `state` value, that state will be "frozen" with its initial value. + +```ts +let sorting = $state([]) +const setSorting = updater => { + if (updater instanceof Function) { + sorting = updater(sorting) + } else sorting = updater +} +// ... +const table = createTable({ + columns, + data, + //... + state: { + get sorting() { + return sorting //required because we are using `onSortingChange` + }, + }, + onSortingChange: setSorting, //makes the `state.sorting` controlled +}) +``` + +#### 2. **Updaters can either be raw values or callback functions**. + +The `on[State]Change` and `onStateChange` callbacks work exactly like the `setState` functions in React. The updater values can either be a new state value or a callback function that takes the previous state value and returns the new state value. + +What implications does this have? It means that if you want to add in some extra logic in any of the `on[State]Change` callbacks, you can do so, but you need to check whether or not the new incoming updater value is a function or value. + +This is why you see the `if (updater instanceof Function)` check in the `setState` functions in the examples above. + +### State Types + +All complex states in TanStack Table have their own TypeScript types that you can import and use. This can be handy for ensuring that you are using the correct data structures and properties for the state values that you are controlling. + +```ts +import { createTable, type SortingState, type Updater } from '@tanstack/svelte-table' +//... +let sorting: SortingState[] = [ + { + id: 'age', //you should get autocomplete for the `id` and `desc` properties + desc: true, + } +] +const setSorting = (updater: Updater) => { + if (updater instanceof Function) { + sorting = updater(sorting) + } else sorting = updater +} +``` diff --git a/docs/framework/svelte/svelte-table.md b/docs/framework/svelte/svelte-table.md new file mode 100644 index 0000000000..32345d2668 --- /dev/null +++ b/docs/framework/svelte/svelte-table.md @@ -0,0 +1,103 @@ +--- +title: Svelte Table +--- + +> **IMPORTANT:** This version of `@tanstack/svelte-table` only supports **Svelte 5 or newer**. For Svelte 3/4 support, use version 8 of `@tanstack/svelte-table`. +> Alternatively, you can still use `@tanstack/table-core` v9 with Svelte 3/4 by copying the source code from the [v8 `@tanstack/svelte-table`](https://github.com/TanStack/table/tree/v8/packages/svelte-table/src) as a custom adapter. + +The `@tanstack/svelte-table` adapter is a wrapper around the core table logic. Most of its job is related to managing state the "Svelte" way, providing types and the rendering implementation of cell/header/footer templates. + +## Exports + +`@tanstack/svelte-table` re-exports all of `@tanstack/table-core`'s APIs and the following: + +### `createTable` + +Takes an `options` object and returns a table. + +```svelte + + + +``` + +### FlexRender + +A Svelte component for rendering cell/header/footer templates with dynamic values. + +FlexRender supports any type of renderable content supported by Svelte: + +- Scalar data types such as numbers, strings, etc. +- Svelte components (when wrapped with `renderComponent`) +- Svelte snippets (when wrapped with `renderSnippet`) + +Example: + +```svelte + + +{#snippet mailtoLink(email: string)} + + {email} + +{/snippet} + + + + {#each table.getRowModel().rows as row} + + {#each row.getVisibleCells() as cell} + + {/each} + + {/each} + +
+ +
+``` diff --git a/docs/framework/vanilla/guide/table-state.md b/docs/framework/vanilla/guide/table-state.md new file mode 100644 index 0000000000..d43bd1d74d --- /dev/null +++ b/docs/framework/vanilla/guide/table-state.md @@ -0,0 +1,5 @@ +--- +title: Table State (Vanilla JS) Guide +--- + +## Table State (Vanilla JS) Guide diff --git a/docs/framework/vanilla/table-core.md b/docs/framework/vanilla/table-core.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/framework/vue/guide/table-state.md b/docs/framework/vue/guide/table-state.md new file mode 100644 index 0000000000..e58218e70e --- /dev/null +++ b/docs/framework/vue/guide/table-state.md @@ -0,0 +1,248 @@ +--- +title: Table State (Vue) Guide +--- + +## Table State (Vue) Guide + +TanStack Table has a simple underlying internal state management system to store and manage the state of the table. It also lets you selectively pull out any state that you need to manage in your own state management. This guide will walk you through the different ways in which you can interact with and manage the state of the table. + +### Accessing Table State + +You do not need to set up anything special in order for the table state to work. If you pass nothing into either `state`, `initialState`, or any of the `on[State]Change` table options, the table will manage its own state internally. You can access any part of this internal state by using the `table.store.state` table instance API. + +```ts +const table = useTable({ + columns, + data: dataRef, // Reactive data support + //... +}) + +console.log(table.store.state) //access the entire internal state +console.log(table.store.state.rowSelection) //access just the row selection state +``` + +### Using Reactive Data + +> **New in v8.20.0** + +The `useVueTable` hook now supports reactive data. This means you can pass a Vue `ref` or `computed` containing your data to the `data`-option. The table will automatically react to changes in the data. + +```ts +const columns = [ + { accessor: 'id', Header: 'ID' }, + { accessor: 'name', Header: 'Name' } +] + +const dataRef = ref([ + { id: 1, name: 'John' }, + { id: 2, name: 'Jane' } +]) + +const table = useVueTable({ + columns, + data: dataRef, // Pass the reactive data ref +}) + +// Later, updating dataRef will automatically update the table +dataRef.value = [ + { id: 1, name: 'John' }, + { id: 2, name: 'Jane' }, + { id: 3, name: 'Doe' } +] +``` + +> ⚠️ `shallowRef` is used under the hood for performance reasons, meaning that the data is not deeply reactive, only the `.value` is. To update the data you have to mutate the data directly. + +```ts +const dataRef = ref([ + { id: 1, name: 'John' }, + { id: 2, name: 'Jane' } +]) + +// This will NOT update the table ❌ +dataRef.value.push({ id: 4, name: 'John' }) + +// This will update the table ✅ +dataRef.value = [ + ...dataRef.value, + { id: 4, name: 'John' } +] +``` + +### Custom Initial State + +If all you need to do for certain states is customize their initial default values, you still do not need to manage any of the state yourself. You can simply set values in the `initialState` option of the table instance. + +```jsx +const table = useTable({ + columns, + data, + initialState: { + columnOrder: ['age', 'firstName', 'lastName'], //customize the initial column order + columnVisibility: { + id: false //hide the id column by default + }, + expanded: true, //expand all rows by default + sorting: [ + { + id: 'age', + desc: true //sort by age in descending order by default + } + ] + }, + //... +}) +``` + +> **Note**: Only specify each particular state in either `initialState` or `state`, but not both. If you pass in a particular state value to both `initialState` and `state`, the initialized state in `state` will take overwrite any corresponding value in `initialState`. + +### Controlled State + +If you need easy access to the table state in other areas of your application, TanStack Table makes it easy to control and manage any or all of the table state in your own state management system. You can do this by passing in your own state and state management functions to the `state` and `on[State]Change` table options. + +#### Individual Controlled State + +You can control just the state that you need easy access to. You do NOT have to control all of the table state if you do not need to. It is recommended to only control the state that you need on a case-by-case basis. + +In order to control a particular state, you need to both pass in the corresponding `state` value and the `on[State]Change` function to the table instance. + +Let's take filtering, sorting, and pagination as an example in a "manual" server-side data fetching scenario. You can store the filtering, sorting, and pagination state in your own state management, but leave out any other state like column order, column visibility, etc. if your API does not care about those values. + +```ts +const columnFilters = ref([]) //no default filters +const sorting = ref([{ + id: 'age', + desc: true, //sort by age in descending order by default +}]) +const pagination = ref({ pageIndex: 0, pageSize: 15 } + +//Use our controlled state values to fetch data +const tableQuery = useQuery({ + queryKey: ['users', columnFilters, sorting, pagination], + queryFn: () => fetchUsers(columnFilters, sorting, pagination), + //... +}) + +const table = useTable({ + columns, + data: tableQuery.data, + //... + state: { + get columnFilters() { + return columnFilters.value + }, + get sorting() { + return sorting.value + }, + get pagination() { + return pagination.value + } + }, + onColumnFiltersChange: updater => { + columnFilters.value = + updater instanceof Function + ? updater(columnFilters.value) + : updater + }, + onSortingChange: updater => { + sorting.value = + updater instanceof Function + ? updater(sorting.value) + : updater + }, + onPaginationChange: updater => { + pagination.value = + updater instanceof Function + ? updater(pagination.value) + : updater + }, +}) +//... +``` + +#### Fully Controlled State + +Alternatively, you can control the entire table state with the `onStateChange` table option. It will hoist out the entire table state into your own state management system. Be careful with this approach, as you might find that raising some frequently changing state values up a react tree, like `columnSizingInfo` state`, might cause bad performance issues. + +A couple of more tricks may be needed to make this work. If you use the `onStateChange` table option, the initial values of the `state` must be populated with all of the relevant state values for all of the features that you want to use. You can either manually type out all of the initial state values, or use the `table.setOptions` API in a special way as shown below. + +```jsx +//create a table instance with default state values +const table = useTable({ + get columns() { + return columns.value + }, + data, + //... Note: `state` values are NOT passed in yet +}) + +const state = ref({ + ...table.initialState, + pagination: { + pageIndex: 0, + pageSize: 15 + } +}) +const setState = updater => { + state.value = updater instanceof Function ? updater(state.value) : updater +} + +//Use the table.setOptions API to merge our fully controlled state onto the table instance +table.setOptions(prev => ({ + ...prev, //preserve any other options that we have set up above + get state() { + return state.value + }, + onStateChange: setState //any state changes will be pushed up to our own state management +})) +``` + +### On State Change Callbacks + +So far, we have seen the `on[State]Change` and `onStateChange` table options work to "hoist" the table state changes into our own state management. However, there are a few things about these using these options that you should be aware of. + +#### 1. **State Change Callbacks MUST have their corresponding state value in the `state` option**. + +Specifying an `on[State]Change` callback tells the table instance that this will be a controlled state. If you do not specify the corresponding `state` value, that state will be "frozen" with its initial value. + +```jsx +const sorting = ref([]) +const setSorting = updater => { + sorting.value = updater instanceof Function ? updater(sorting.value) : updater +} +//... +const table = useTable({ + columns, + data, + //... + state: { + get sorting() { + return sorting //required because we are using `onSortingChange` + }, + }, + onSortingChange: setSorting, //makes the `state.sorting` controlled +}) +``` + +#### 2. **Updaters can either be raw values or callback functions**. + +The `on[State]Change` and `onStateChange` callbacks work exactly like the `setState` functions in React. The updater values can either be a new state value or a callback function that takes the previous state value and returns the new state value. + +What implications does this have? It means that if you want to add in some extra logic in any of the `on[State]Change` callbacks, you can do so, but you need to check whether or not the new incoming updater value is a function or value. + +This is why we have the `updater instanceof Function` check in the `setState` functions above. This check allows us to handle both raw values and callback functions in the same function. + +### State Types + +All complex states in TanStack Table have their own TypeScript types that you can import and use. This can be handy for ensuring that you are using the correct data structures and properties for the state values that you are controlling. + +```tsx +import { useTable, type SortingState } from '@tanstack/vue-table' +//... +const sorting = ref([ + { + id: 'age', //you should get autocomplete for the `id` and `desc` properties + desc: true, + } +]) +``` diff --git a/docs/framework/vue/vue-table.md b/docs/framework/vue/vue-table.md new file mode 100644 index 0000000000..4e9ed8ffa1 --- /dev/null +++ b/docs/framework/vue/vue-table.md @@ -0,0 +1,44 @@ +--- +title: Vue Table +--- + +The `@tanstack/vue-table` adapter is a wrapper around the core table logic. Most of it's job is related to managing state the "vue" way, providing types and the rendering implementation of cell/header/footer templates. + +## Exports + +`@tanstack/vue-table` re-exports all of `@tanstack/table-core`'s APIs and the following: + +### `useTable` + +Takes an `options` object and returns a table. + +```ts +import { useTable } from '@tanstack/vue-table' + +const table = useTable(options) +// ...render your table + +``` + +### `FlexRender` + +A Vue component for rendering cell/header/footer templates with dynamic values. + +Example: + +```vue +import { FlexRender } from '@tanstack/vue-table' + + +``` diff --git a/docs/guide/cells.md b/docs/guide/cells.md new file mode 100644 index 0000000000..a6e9e443c4 --- /dev/null +++ b/docs/guide/cells.md @@ -0,0 +1,85 @@ +--- +title: Cells Guide +--- + +## API + +[Cell API](../api/core/cell) + +## Cells Guide + +This quick guide will discuss the different ways you can retrieve and interact with `cell` objects in TanStack Table. + +### Where to Get Cells From + +Cells come from [Rows](./rows). Enough said, right? + +There are multiple `row` instance APIs you can use to retrieve the appropriate cells from a row depending on which features you are using. Most commonly, you will use the `row.getAllCells` or `row.getVisibleCells` APIs (if you are using column visibility features), but there are a handful of other similar APIs that you can use. + +### Cell Objects + +Every cell object can be associated with a `` or similar cell element in your UI. There are a few properties and methods on `cell` objects that you can use to interact with the table state and extract cell values from the table based on the state of the table. + +#### Cell IDs + +Every cell object has an `id` property that makes it unique within the table instance. Each `cell.id` is constructed simply as a union of its parent row and column IDs separated by an underscore. + +```js +{ id: `${row.id}_${column.id}` } +``` + +During grouping or aggregation features, the `cell.id` will have additional string appended to it. + +#### Cell Parent Objects + +Every cell stores a reference to its parent [row](./rows) and [column](./columns) objects. + +#### Access Cell Values + +The recommended way to access data values from a cell is to use either the `cell.getValue` or `cell.renderValue` APIs. Using either of these APIs will cache the results of the accessor functions and keep rendering efficient. The only difference between the two is that `cell.renderValue` will return either the value or the `renderFallbackValue` if the value is undefined, whereas `cell.getValue` will return the value or `undefined` if the value is undefined. + +> Note: The `cell.getValue` and `cell.renderValue` APIs are shortcuts `row.getValue` and `row.renderValue` APIs, respectively. + +```js +// Access data from any of the columns +const firstName = cell.getValue('firstName') // read the cell value from the firstName column +const renderedLastName = cell.renderValue('lastName') // render the value from the lastName column +``` + +#### Access Other Row Data from Any Cell + +Since every cell object is associated with its parent row, you can access any data from the original row that you are using in your table using `cell.row.original`. + +```js +// Even if we are in the scope of a different cell, we can still access the original row data +const firstName = cell.row.original.firstName // { firstName: 'John', lastName: 'Doe' } +``` + +### More Cell APIs + +Depending on the features that you are using for your table, there are dozens more useful APIs for interacting with cells. See each features' respective API docs or guide for more information. + +### Cell Rendering + +You can just use the `cell.renderValue` or `cell.getValue` APIs to render the cells of your table. However, these APIs will only spit out the raw cell values (from accessor functions). If you are using the `cell: () => JSX` column definition options, you will want to use the `flexRender` API utility from your adapter. + +Using the `flexRender` API will allow the cell to be rendered correctly with any extra markup or JSX and it will call the callback function with the correct parameters. + +```jsx +import { flexRender } from '@tanstack/react-table' + +const columns = [ + { + accessorKey: 'fullName', + cell: ({ cell, row }) => { + return
{row.original.firstName} {row.original.lastName}
+ } + //... + } +] +//... + + {row.getVisibleCells().map(cell => { + return {flexRender(cell.column.columnDef.cell, cell.getContext())} + })} + \ No newline at end of file diff --git a/docs/guide/column-defs.md b/docs/guide/column-defs.md new file mode 100644 index 0000000000..da89bd818e --- /dev/null +++ b/docs/guide/column-defs.md @@ -0,0 +1,286 @@ +--- +title: Columns Definitions Guide +--- + +## API + +[Column Def](../api/core/column-def) + +## Column Definitions Guide + +> Note: This guide is about setting up column definitions for your table and NOT about the actual [`column`](./columns) objects that are generated within the table instance. + +Column defs are the single most important part of building a table. They are responsible for: + +- Building the underlying data model that will be used for everything including sorting, filtering, grouping, etc. +- Formatting the data model into what will be displayed in the table +- Creating [header groups](../api/core/header-group), [headers](../api/core/header) and [footers](../api/core/column-def#footer) +- Creating columns for display-only purposes, eg. action buttons, checkboxes, expanders, sparklines, etc. + +## Column Def Types + +The following "types" of column defs aren't actually TypeScript types, but more so a way to talk about and describe overall categories of column defs: + +- `Accessor Columns` + - Accessor columns have an underlying data model which means they can be sorted, filtered, grouped, etc. +- `Display Columns` + - Display columns do **not** have a data model which means they cannot be sorted, filtered, etc, but they can be used to display arbitrary content in the table, eg. a row actions button, checkbox, expander, etc. +- `Grouping Columns` + - Group columns do **not** have a data model so they too cannot be sorted, filtered, etc, and are used to group other columns together. It's common to define a header or footer for a column group. + +## Column Helpers + +While column defs are just plain objects at the end of the day, a `createColumnHelper` function is exposed from the table core which, when called with your features type and row type, returns a utility for creating different column definition types with the highest type-safety possible. + +In v9, `createColumnHelper` requires two type parameters: `TFeatures` (from your `_features` object) and `TData` (your row type). Use `typeof _features` to get the features type. + +Here's an example of creating and using a column helper: + +```tsx +// Define your row shape +type Person = { + firstName: string + lastName: string + age: number + visits: number + status: string + progress: number +} + +const _features = tableFeatures({}) // or tableFeatures({ rowSortingFeature, ... }) +const columnHelper = createColumnHelper() + +// Make some columns! Use columnHelper.columns([...]) for better type inference with nested groups +const defaultColumns = columnHelper.columns([ + // Display Column + columnHelper.display({ + id: 'actions', + cell: props => , + }), + // Grouping Column + columnHelper.group({ + header: 'Name', + footer: props => props.column.id, + columns: [ + // Accessor Column + columnHelper.accessor('firstName', { + cell: info => info.getValue(), + footer: props => props.column.id, + }), + // Accessor Column + columnHelper.accessor(row => row.lastName, { + id: 'lastName', + cell: info => info.getValue(), + header: () => Last Name, + footer: props => props.column.id, + }), + ], + }), + // Grouping Column + columnHelper.group({ + header: 'Info', + footer: props => props.column.id, + columns: [ + // Accessor Column + columnHelper.accessor('age', { + header: () => 'Age', + footer: props => props.column.id, + }), + // Grouping Column + columnHelper.group({ + header: 'More Info', + columns: [ + // Accessor Column + columnHelper.accessor('visits', { + header: () => Visits, + footer: props => props.column.id, + }), + // Accessor Column + columnHelper.accessor('status', { + header: 'Status', + footer: props => props.column.id, + }), + // Accessor Column + columnHelper.accessor('progress', { + header: 'Profile Progress', + footer: props => props.column.id, + }), + ], + }), + ], + }), +]) +``` + +## Creating Accessor Columns + +Data columns are unique in that they must be configured to extract primitive values for each item in your `data` array. + +There are 3 ways to do this: + +- If your items are `objects`, use an object-key that corresponds to the value you want to extract. +- If your items are nested `arrays`, use an array index that corresponds to the value you want to extract. +- Use an accessor function that returns the value you want to extract. + +## Object Keys + +If each of your items is an object with the following shape: + +```tsx +type Person = { + firstName: string + lastName: string + age: number + visits: number + status: string + progress: number +} +``` + +You could extract the `firstName` value like so: + +```tsx + +columnHelper.accessor('firstName') + +// OR + +{ + accessorKey: 'firstName', +} +``` + +## Deep Keys + +If each of your items is an object with the following shape: + +```tsx +type Person = { + name: { + first: string + last: string + } + info: { + age: number + visits: number + } +} +``` + +You could extract the `first` value like so: + +```tsx +columnHelper.accessor('name.first', { + id: 'firstName', +}) + +// OR + +{ + accessorKey: 'name.first', + id: 'firstName', +} +``` + +## Array Indices + +If each of your items is an array with the following shape: + +```tsx +type Sales = [Date, number] +``` + +You could extract the `number` value like so: + +```tsx +columnHelper.accessor(1) + +// OR + +{ + accessorKey: 1, +} +``` + +## Accessor Functions + +If each of your items is an object with the following shape: + +```tsx +type Person = { + firstName: string + lastName: string + age: number + visits: number + status: string + progress: number +} +``` + +You could extract a computed full-name value like so: + +```tsx +columnHelper.accessor(row => `${row.firstName} ${row.lastName}`, { + id: 'fullName', +}) + +// OR + +{ + id: 'fullName', + accessorFn: row => `${row.firstName} ${row.lastName}`, +} +``` + +> 🧠 Remember, the accessed value is what is used to sort, filter, etc. so you'll want to make sure your accessor function returns a primitive value that can be manipulated in a meaningful way. If you return a non-primitive value like an object or array, you will need the appropriate filter/sort/grouping functions to manipulate them, or even supply your own! 😬 + +## Unique Column IDs + +Columns are uniquely identified with 3 strategies: + +- If defining an accessor column with an object key or array index, the same will be used to uniquely identify the column. + - Any periods (`.`) in an object key will be replaced by underscores (`_`). +- If defining an accessor column with an accessor function + - The columns `id` property will be used to uniquely identify the column OR + - If a primitive `string` header is supplied, that header string will be used to uniquely identify the column + +> 🧠 An easy way to remember: If you define a column with an accessor function, either provide a string header or provide a unique `id` property. + +## Column Formatting & Rendering + +By default, columns cells will display their data model value as a string. You can override this behavior by providing custom rendering implementations. Each implementation is provided relevant information about the cell, header or footer and returns something your framework adapter can render eg. JSX/Components/strings/etc. This will depend on which adapter you are using. + +There are a couple of formatters available to you: + +- `cell`: Used for formatting cells. +- `aggregatedCell`: Used for formatting cells when aggregated. +- `header`: Used for formatting headers. +- `footer`: Used for formatting footers. + +## Cell Formatting + +You can provide a custom cell formatter by passing a function to the `cell` property and using the `props.getValue()` function to access your cell's value: + +```tsx +columnHelper.accessor('firstName', { + cell: props => {props.getValue().toUpperCase()}, +}) +``` + +Cell formatters are also provided the `row` and `table` objects, allowing you to customize the cell formatting beyond just the cell value. The example below provides `firstName` as the accessor, but also displays a prefixed user ID located on the original row object: + +```tsx +columnHelper.accessor('firstName', { + cell: props => ( + {`${props.row.original.id} - ${props.getValue()}`} + ), +}) +``` + +## Aggregated Cell Formatting + +For more info on aggregated cells, see [grouping](./grouping). + +## Header & Footer Formatting + +Headers and footers do not have access to row data, but still use the same concepts for displaying custom content. diff --git a/docs/guide/column-faceting.md b/docs/guide/column-faceting.md new file mode 100644 index 0000000000..b551d9dfc8 --- /dev/null +++ b/docs/guide/column-faceting.md @@ -0,0 +1,97 @@ +--- +title: Column Faceting Guide +--- + +## Examples + +Want to skip to the implementation? Check out these examples: + +- [filters-faceted](../framework/react/examples/filters-faceted) + +## API + +[Column Faceting API](../api/features/column-faceting) + +## Column Faceting Guide + +Column Faceting is a feature that allows you to generate lists of values for a given column from that column's data. For example, a list of unique values in a column can be generated from all rows in that column to be used as search suggestions in an autocomplete filter component. Or, a tuple of minimum and maximum values can be generated from a column of numbers to be used as a range for a range slider filter component. + +### Column Faceting Row Models + +In order to use any of the column faceting features, add the `columnFacetingFeature` to your features and the appropriate faceted row models to `_rowModels`. + +```ts +import { + useTable, + tableFeatures, + columnFacetingFeature, + createFacetedRowModel, + createFacetedMinMaxValues, + createFacetedUniqueValues, +} from '@tanstack/react-table' + +const _features = tableFeatures({ columnFacetingFeature }) + +const table = useTable({ + _features, + _rowModels: { + facetedRowModel: createFacetedRowModel(), // required for faceting (other faceted row models depend on this) + facetedMinMaxValues: createFacetedMinMaxValues(), // if you need min/max values + facetedUniqueValues: createFacetedUniqueValues(), // if you need a list of unique values + }, + columns, + data, +}) +``` + +First, you must include the `facetedRowModel`. This row model will generate a list of values for a given column. If you need a list of unique values, include the `facetedUniqueValues` row model. If you need a tuple of minimum and maximum values, include the `facetedMinMaxValues` row model. + +### Use Faceted Row Models + +Once you have included the appropriate row models in your table options, you will be able to use the faceting column instance APIs to access the lists of values generated by the faceted row models. + +```ts +// list of unique values for autocomplete filter +const autoCompleteSuggestions = + Array.from(column.getFacetedUniqueValues().keys()) + .sort() + .slice(0, 5000); +``` + +```ts +// tuple of min and max values for range filter +const [min, max] = column.getFacetedMinMaxValues() ?? [0, 1]; +``` + +### Custom (Server-Side) Faceting + +If instead of using the built-in client-side faceting features, you can implement your own faceting logic on the server-side and pass the faceted values to the client-side. You can use the `getFacetedUniqueValues` and `getFacetedMinMaxValues` table options to resolve the faceted values from the server-side. + +```ts +const facetingQuery = useQuery( + //... +) + +const table = useTable({ + _features, + _rowModels: { + facetedRowModel: createFacetedRowModel(), + facetedUniqueValues: createFacetedUniqueValues(), + facetedMinMaxValues: createFacetedMinMaxValues(), + }, + columns, + data, + getFacetedUniqueValues: (table, columnId) => { + const uniqueValueMap = new Map() + //... + return uniqueValueMap + }, + getFacetedMinMaxValues: (table, columnId) => { + //... + return [min, max] + }, + //... +}) +``` + +Alternatively, you don't have to put any of your faceting logic through the TanStack Table APIs at all. Just fetch your lists and pass them to your filter components directly. \ No newline at end of file diff --git a/docs/guide/column-filtering.md b/docs/guide/column-filtering.md new file mode 100644 index 0000000000..2ca3b9352c --- /dev/null +++ b/docs/guide/column-filtering.md @@ -0,0 +1,361 @@ +--- +title: Column Filtering Guide +--- + +## Examples + +Want to skip to the implementation? Check out these examples: + +- [Column Filters](../framework/react/examples/filters) +- [Faceted Filters](../framework/react/examples/filters-faceted) (Autocomplete and Range filters) +- [Fuzzy Search](../framework/react/examples/filters-fuzzy) (Match Sorter) +- [Editable Data](../framework/react/examples/editable-data) +- [Expanding](../framework/react/examples/expanding) (Filtering from Sub-Rows) +- [Grouping](../framework/react/examples/grouping) +- [Pagination](../framework/react/examples/pagination) +- [Row Selection](../framework/react/examples/row-selection) + +## API + +[Column Filtering API](../api/features/column-filtering) + +## Column Filtering Guide + +Filtering comes in 2 flavors: Column Filtering and Global Filtering. + +This guide will focus on column filtering, which is a filter that is applied to a single column's accessor value. + +TanStack table supports both client-side and manual server-side filtering. This guide will go over how to implement and customize both, and help you decide which one is best for your use-case. + +### Client-Side vs Server-Side Filtering + +If you have a large dataset, you may not want to load all of that data into the client's browser in order to filter it. In this case, you will most likely want to implement server-side filtering, sorting, pagination, etc. + +However, as also discussed in the [Pagination Guide](./pagination#should-you-use-client-side-pagination), a lot of developers underestimate how many rows can be loaded client-side without a performance hit. The TanStack table examples are often tested to handle up to 100,000 rows or more with decent performance for client-side filtering, sorting, pagination, and grouping. This doesn't necessarily mean that your app will be able to handle that many rows, but if your table is only going to have a few thousand rows at most, you might be able to take advantage of the client-side filtering, sorting, pagination, and grouping that TanStack table provides. + +> TanStack Table can handle thousands of client-side rows with good performance. Don't rule out client-side filtering, pagination, sorting, etc. without some thought first. + +Every use-case is different and will depend on the complexity of the table, how many columns you have, how large every piece of data is, etc. The main bottlenecks to pay attention to are: + +1. Can your server query all of the data in a reasonable amount of time (and cost)? +2. What is the total size of the fetch? (This might not scale as badly as you think if you don't have many columns.) +3. Is the client's browser using too much memory if all of the data is loaded at once? + +If you're not sure, you can always start with client-side filtering and pagination and then switch to server-side strategies in the future as your data grows. + +### Manual Server-Side Filtering + +If you have decided that you need to implement server-side filtering instead of using the built-in client-side filtering, here's how you do that. + +No `filteredRowModel` is needed for manual server-side filtering. Instead, the `data` that you pass to the table should already be filtered. However, if you have added a `filteredRowModel` to `_rowModels`, you can tell the table to skip it by setting the `manualFiltering` option to `true`. + +```jsx +const table = useTable({ + _features: tableFeatures({ columnFilteringFeature }), + _rowModels: {}, // no filteredRowModel needed for manual server-side filtering + data, + columns, + manualFiltering: true, +}) +``` + +> **Note:** When using manual filtering, many of the options that are discussed in the rest of this guide will have no effect. When `manualFiltering` is set to `true`, the table instance will not apply any filtering logic to the rows that are passed to it. Instead, it will assume that the rows are already filtered and will use the `data` that you pass to it as-is. + +### Client-Side Filtering + +If you are using the built-in client-side filtering features, add the `columnFilteringFeature` to your features and the `filteredRowModel` to your row models. Import `createFilteredRowModel` and `filterFns` from TanStack Table: + +```jsx +import { + useTable, + tableFeatures, + columnFilteringFeature, + createFilteredRowModel, + filterFns, +} from '@tanstack/react-table' + +const _features = tableFeatures({ columnFilteringFeature }) + +const table = useTable({ + _features, + _rowModels: { + filteredRowModel: createFilteredRowModel(filterFns), + }, + data, + columns, +}) +``` + +### Column Filter State + +Whether or not you use client-side or server-side filtering, you can take advantage of the built-in column filter state management that TanStack Table provides. There are many table and column APIs to mutate and interact with the filter state and retrieving the column filter state. + +The column filtering state is defined as an array of objects with the following shape: + +```ts +interface ColumnFilter { + id: string + value: unknown +} +type ColumnFiltersState = ColumnFilter[] +``` + +Since the column filter state is an array of objects, you can have multiple column filters applied at once. + +#### Accessing Column Filter State + +You can access the column filter state from the table instance just like any other table state using the `table.store.state` API. + +```jsx +const table = useTable({ + _features, + _rowModels: { filteredRowModel: createFilteredRowModel(filterFns) }, + columns, + data, + //... +}) + +console.log(table.store.state.columnFilters) // access the column filters state from the table instance +``` + +However, if you need to access the column filter state before the table is initialized, you can "control" the column filter state like down below. + +### Controlled Column Filter State + +If you need easy access to the column filter state, you can control/manage the column filter state in your own state management with the `state.columnFilters` and `onColumnFiltersChange` table options. + +```tsx +const [columnFilters, setColumnFilters] = useState([]) // can set initial column filter state here +//... +const table = useTable({ + _features, + _rowModels: { filteredRowModel: createFilteredRowModel(filterFns) }, + columns, + data, + //... + state: { + columnFilters, + }, + onColumnFiltersChange: setColumnFilters, +}) +``` + +#### Initial Column Filter State + +If you do not need to control the column filter state in your own state management or scope, but you still want to set an initial column filter state, you can use the `initialState` table option instead of `state`. + +```jsx +const table = useTable({ + _features, + _rowModels: { filteredRowModel: createFilteredRowModel(filterFns) }, + columns, + data, + //... + initialState: { + columnFilters: [ + { + id: 'name', + value: 'John', // filter the name column by 'John' by default + }, + ], + }, +}) +``` + +> **NOTE**: Do not use both `initialState.columnFilters` and `state.columnFilters` at the same time, as the initialized state in the `state.columnFilters` will override the `initialState.columnFilters`. + +### FilterFns + +Each column can have its own unique filtering logic. Choose from any of the filter functions that are provided by TanStack Table, or create your own. + +By default there are 10 built-in filter functions to choose from: + +- `includesString` - Case-insensitive string inclusion +- `includesStringSensitive` - Case-sensitive string inclusion +- `equalsString` - Case-insensitive string equality +- `equalsStringSensitive` - Case-sensitive string equality +- `arrIncludes` - Item inclusion within an array +- `arrIncludesAll` - All items included in an array +- `arrIncludesSome` - Some items included in an array +- `equals` - Object/referential equality `Object.is`/`===` +- `weakEquals` - Weak object/referential equality `==` +- `inNumberRange` - Number range inclusion + +You can also define your own custom filter functions either as the `filterFn` column option, or as a global filter function using the `filterFns` table option. + +#### Custom Filter Functions + +> **Note:** These filter functions only run during client-side filtering. + +When defining a custom filter function in either the `filterFn` column option or the `filterFns` table option, it should have the following signature: + +```ts +const myCustomFilterFn: FilterFn = (row: Row, columnId: string, filterValue: any, addMeta: (meta: any) => void) => boolean +``` + +Every filter function receives: + +- The row to filter +- The columnId to use to retrieve the row's value +- The filter value + +and should return `true` if the row should be included in the filtered rows, and `false` if it should be removed. + +```jsx +const columns = [ + { + header: () => 'Name', + accessorKey: 'name', + filterFn: 'includesString', // use built-in filter function + }, + { + header: () => 'Age', + accessorKey: 'age', + filterFn: 'inNumberRange', + }, + { + header: () => 'Birthday', + accessorKey: 'birthday', + filterFn: 'myCustomFilterFn', // use custom global filter function + }, + { + header: () => 'Profile', + accessorKey: 'profile', + // use custom filter function directly + filterFn: (row, columnId, filterValue) => { + return // true or false based on your custom logic + }, + } +] +//... +const table = useTable({ + _features, + _rowModels: { + filteredRowModel: createFilteredRowModel({ + ...filterFns, + myCustomFilterFn: (row, columnId, filterValue) => { + return // true or false based on your custom logic + }, + startsWith: startsWithFilterFn, // defined elsewhere + }), + }, + columns, + data, +}) +``` + +##### Customize Filter Function Behavior + +You can attach a few other properties to filter functions to customize their behavior: + +- `filterFn.resolveFilterValue` - This optional "hanging" method on any given `filterFn` allows the filter function to transform/sanitize/format the filter value before it is passed to the filter function. + +- `filterFn.autoRemove` - This optional "hanging" method on any given `filterFn` is passed a filter value and expected to return `true` if the filter value should be removed from the filter state. eg. Some boolean-style filters may want to remove the filter value from the table state if the filter value is set to `false`. + +```tsx +const startsWithFilterFn = ( + row: Row, + columnId: string, + filterValue: number | string, //resolveFilterValue will transform this to a string +) => + row + .getValue(columnId) + .toString() + .toLowerCase() + .trim() + .startsWith(filterValue); // toString, toLowerCase, and trim the filter value in `resolveFilterValue` + +// remove the filter value from filter state if it is falsy (empty string in this case) +startsWithFilterFn.autoRemove = (val: any) => !val; + +// transform/sanitize/format the filter value before it is passed to the filter function +startsWithFilterFn.resolveFilterValue = (val: any) => val.toString().toLowerCase().trim(); +``` + +### Customize Column Filtering + +There are a lot of table and column options that you can use to further customize the column filtering behavior. + +#### Disable Column Filtering + +By default, column filtering is enabled for all columns. You can disable the column filtering for all columns or for specific columns by using the `enableColumnFilters` table option or the `enableColumnFilter` column option. You can also turn off both column and global filtering by setting the `enableFilters` table option to `false`. + +Disabling column filtering for a column will cause the `column.getCanFilter` API to return `false` for that column. + +```jsx +const columns = [ + { + header: () => 'Id', + accessorKey: 'id', + enableColumnFilter: false, // disable column filtering for this column + }, + //... +] +//... +const table = useTable({ + _features, + _rowModels: { filteredRowModel: createFilteredRowModel(filterFns) }, + columns, + data, + enableColumnFilters: false, // disable column filtering for all columns +}) +``` + +#### Filtering Sub-Rows (Expanding) + +There are a few additional table options to customize the behavior of column filtering when using features like expanding, grouping, and aggregation. + +##### Filter From Leaf Rows + +By default, filtering is done from parent rows down, so if a parent row is filtered out, all of its child sub-rows will be filtered out as well. Depending on your use-case, this may be the desired behavior if you only want the user to be searching through the top-level rows, and not the sub-rows. This is also the most performant option. + +However, if you want to allow sub-rows to be filtered and searched through, regardless of whether the parent row is filtered out, you can set the `filterFromLeafRows` table option to `true`. Setting this option to `true` will cause filtering to be done from leaf rows up, which means parent rows will be included so long as one of their child or grand-child rows is also included. + +```jsx +const table = useTable({ + _features: tableFeatures({ columnFilteringFeature, rowExpandingFeature }), + _rowModels: { + filteredRowModel: createFilteredRowModel(filterFns), + expandedRowModel: createExpandedRowModel(), + }, + columns, + data, + filterFromLeafRows: true, // filter and search through sub-rows +}) +``` + +##### Max Leaf Row Filter Depth + +By default, filtering is done for all rows in a tree, no matter if they are root level parent rows or the child leaf rows of a parent row. Setting the `maxLeafRowFilterDepth` table option to `0` will cause filtering to only be applied to the root level parent rows, with all sub-rows remaining unfiltered. Similarly, setting this option to `1` will cause filtering to only be applied to child leaf rows 1 level deep, and so on. + +Use `maxLeafRowFilterDepth: 0` if you want to preserve a parent row's sub-rows from being filtered out while the parent row is passing the filter. + +```jsx +const table = useTable({ + _features: tableFeatures({ columnFilteringFeature, rowExpandingFeature }), + _rowModels: { + filteredRowModel: createFilteredRowModel(filterFns), + expandedRowModel: createExpandedRowModel(), + }, + columns, + data, + maxLeafRowFilterDepth: 0, // only filter root level parent rows out +}) +``` + +### Column Filter APIs + +There are a lot of Column and Table APIs that you can use to interact with the column filter state and hook up to your UI components. Here is a list of the available APIs and their most common use-cases: + +- `table.setColumnFilters` - Overwrite the entire column filter state with a new state. +- `table.resetColumnFilters` - Useful for a "clear all/reset filters" button. + +- **`column.getFilterValue`** - Useful for getting the default initial filter value for an input, or even directly providing the filter value to a filter input. +- **`column.setFilterValue`** - Useful for connecting filter inputs to their `onChange` or `onBlur` handlers. + +- `column.getCanFilter` - Useful for disabling/enabling filter inputs. +- `column.getIsFiltered` - Useful for displaying a visual indicator that a column is currently being filtered. +- `column.getFilterIndex` - Useful for displaying in what order the current filter is being applied. + +- `column.getAutoFilterFn` - Used internally to find the default filter function for a column if none is specified. +- `column.getFilterFn` - Useful for displaying which filter mode or function is currently being used. diff --git a/docs/guide/column-ordering.md b/docs/guide/column-ordering.md new file mode 100644 index 0000000000..9bd77a6f7d --- /dev/null +++ b/docs/guide/column-ordering.md @@ -0,0 +1,115 @@ +--- +title: Column Ordering Guide +--- + +## Examples + +Want to skip to the implementation? Check out these examples: + +- [column-ordering](../framework/react/examples/column-ordering) +- [column-dnd](../framework/react/examples/column-dnd) + +## API + +[Column Ordering API](../api/features/column-ordering) + +## Column Ordering Guide + +By default, columns are ordered in the order they are defined in the `columns` array. However, you can manually specify the column order using the `columnOrder` state. Other features like column pinning and grouping can also affect the column order. + +### What Affects Column Order + +There are 3 table features that can reorder columns, which happen in the following order: + +1. [Column Pinning](./column-pinning) - If pinning, columns are split into left, center (unpinned), and right pinned columns. +2. Manual **Column Ordering** - A manually specified column order is applied. +3. [Grouping](./grouping) - If grouping is enabled, a grouping state is active, and `tableOptions.groupedColumnMode` is set to `'reorder' | 'remove'`, then the grouped columns are reordered to the start of the column flow. + +> **Note:** `columnOrder` state will only affect unpinned columns if used in conjunction with column pinning. + +### Column Order State + +If you don't provide a `columnOrder` state, TanStack Table will just use the order of the columns in the `columns` array. However, you can provide an array of string column ids to the `columnOrder` state to specify the order of the columns. + +#### Default Column Order + +If all you need to do is specify the initial column order, you can just specify the `columnOrder` state in the `initialState` table option. + +```jsx +const table = useTable({ + _features: tableFeatures({ columnOrderingFeature }), + _rowModels: {}, + //... + initialState: { + columnOrder: ['columnId1', 'columnId2', 'columnId3'], + }, + //... +}) +``` + +> **Note:** If you are using the `state` table option to also specify the `columnOrder` state, the `initialState` will have no effect. Only specify particular states in either `initialState` or `state`, not both. + +#### Managing Column Order State + +If you need to dynamically change the column order, or set the column order after the table has been initialized, you can manage the `columnOrder` state just like any other table state. + +```jsx +const [columnOrder, setColumnOrder] = useState(['columnId1', 'columnId2', 'columnId3']) +//... +const table = useTable({ + _features: tableFeatures({ columnOrderingFeature }), + _rowModels: {}, + //... + state: { + columnOrder, + //... + } + onColumnOrderChange: setColumnOrder, + //... +}); +``` + +### Reordering Columns + +If the table has UI that allows the user to reorder columns, you can set up the logic something like this: + +```tsx +const [columnOrder, setColumnOrder] = useState(columns.map(c => c.id)); + +//depending on your dnd solution of choice, you may or may not need state like this +const [movingColumnId, setMovingColumnId] = useState(null); +const [targetColumnId, setTargetColumnId] = useState(null); + +//util function to splice and reorder the columnOrder array +const reorderColumn = ( + movingColumnId: Column, + targetColumnId: Column, +): string[] => { + const newColumnOrder = [...columnOrder]; + newColumnOrder.splice( + newColumnOrder.indexOf(targetColumnId), + 0, + newColumnOrder.splice(newColumnOrder.indexOf(movingColumnId), 1)[0], + ); + setColumnOrder(newColumnOrder); +}; + +const handleDragEnd = (e: DragEvent) => { + if(!movingColumnId || !targetColumnId) return; + setColumnOrder(reorderColumn(movingColumnId, targetColumnId)); +}; + +//use your dnd solution of choice +``` + +#### Drag and Drop Column Reordering Suggestions (React) + +There are undoubtedly many ways to implement drag and drop features along-side TanStack Table. Here are a few suggestions in order for you to not have a bad time: + +1. Do NOT try to use [`"react-dnd"`](https://react-dnd.github.io/react-dnd/docs/overview) _if you are using React 18 or newer_. React DnD was an important library for its time, but it now does not get updated very often, and it has incompatibilities with React 18, especially in React Strict Mode. It is still possible to get it to work, but there are newer alternatives that have better compatibility and are more actively maintained. React DnD's Provider may also interfere and conflict with any other DnD solutions you may want to try in your app. + +2. Use [`"@dnd-kit/core"`](https://dndkit.com/). DnD Kit is a modern, modular and lightweight drag and drop library that is highly compatible with the modern React ecosystem, and it works well with semantic `` markup. Both of the official TanStack DnD examples, [Column DnD](../framework/react/examples/column-dnd) and [Row DnD](../framework/react/examples/row-dnd), now use DnD Kit. + +3. Consider other DnD libraries like [`"react-beautiful-dnd"`](https://github.com/atlassian/react-beautiful-dnd), but be aware of their potentially large bundle sizes, maintenance status, and compatibility with `
` markup. + +4. Consider using native browser events and state management to implement lightweight drag and drop features. However, be aware that this approach may not be best for mobile users if you do not go the extra mile to implement proper touch events. [Material React Table V2](https://www.material-react-table.com/docs/examples/column-ordering) is an example of a library that implements TanStack Table with only browser drag and drop events such as `onDragStart`, `onDragEnd`, `onDragEnter` and no other dependencies. Browse its source code to see how it is done. \ No newline at end of file diff --git a/docs/guide/column-pinning.md b/docs/guide/column-pinning.md new file mode 100644 index 0000000000..228ed8de32 --- /dev/null +++ b/docs/guide/column-pinning.md @@ -0,0 +1,100 @@ +--- +title: Column Pinning Guide +--- + +## Examples + +Want to skip to the implementation? Check out these examples: + +- [column-pinning](../framework/react/examples/column-pinning) +- [sticky-column-pinning](../framework/react/examples/column-pinning-sticky) + + ### Other Examples + +- [Svelte column-pinning](../framework/svelte/examples/column-pinning) +- [Vue column-pinning](../framework/vue/examples/column-pinning) + +## API + +[Column Pinning API](../api/features/column-pinning) + +## Column Pinning Guide + +TanStack Table offers state and APIs helpful for implementing column pinning features in your table UI. You can implement column pinning in multiple ways. You can either split pinned columns into their own separate tables, or you can keep all columns in the same table, but use the pinning state to order the columns correctly and use sticky CSS to pin the columns to the left or right. + +### How Column Pinning Affects Column Order + +There are 3 table features that can reorder columns, which happen in the following order: + +1. **Column Pinning** - If pinning, columns are split into left, center (unpinned), and right pinned columns. +2. Manual [Column Ordering](./column-ordering) - A manually specified column order is applied. +3. [Grouping](./grouping) - If grouping is enabled, a grouping state is active, and `tableOptions.groupedColumnMode` is set to `'reorder' | 'remove'`, then the grouped columns are reordered to the start of the column flow. + +The only way to change the order of the pinned columns is in the `columnPinning.left` and `columnPinning.right` state itself. `columnOrder` state will only affect the order of the unpinned ("center") columns. + +### Column Pinning State + +Managing the `columnPinning` state is optional, and usually not necessary unless you are adding persistent state features. TanStack Table will already keep track of the column pinning state for you. Manage the `columnPinning` state just like any other table state if you need to. + +```jsx +import { useTable, tableFeatures, columnPinningFeature } from '@tanstack/react-table' + +const _features = tableFeatures({ columnPinningFeature }) + +const [columnPinning, setColumnPinning] = useState({ + left: [], + right: [], +}) + +const table = useTable({ + _features, + _rowModels: {}, + //... + state: { + columnPinning, + //... + }, + onColumnPinningChange: setColumnPinning, + //... +}) +``` + +### Pin Columns by Default + +A very common use case is to pin some columns by default. You can do this by either initializing the `columnPinning` state with the pinned columnIds, or by using the `initialState` table option + +```jsx +const table = useTable({ + _features, + _rowModels: {}, + //... + initialState: { + columnPinning: { + left: ['expand-column'], + right: ['actions-column'], + }, + //... + }, + //... +}) +``` + +### Useful Column Pinning APIs + +> Note: These APIs are available when using `columnPinningFeature`. + +There are a handful of useful Column API methods to help you implement column pinning features: + +- [`column.getCanPin`](../api/features/column-pinning#getcanpin): Use to determine if a column can be pinned. +- [`column.pin`](../api/features/column-pinning#pin): Use to pin a column to the left or right. Or use to unpin a column. +- [`column.getIsPinned`](../api/features/column-pinning#getispinned): Use to determine where a column is pinned. +- [`column.getStart`](../api/features/column-pinning#getstart): Use to provide the correct `left` CSS value for a pinned column. +- [`column.getAfter`](../api/features/column-pinning#getafter): Use to provide the correct `right` CSS value for a pinned column. +- [`column.getIsLastColumn`](../api/features/column-pinning#getislastcolumn): Use to determine if a column is the last column in its pinned group. Useful for adding a box-shadow +- [`column.getIsFirstColumn`](../api/features/column-pinning#getisfirstcolumn): Use to determine if a column is the first column in its pinned group. Useful for adding a box-shadow + +### Split Table Column Pinning + +If you are just using sticky CSS to pin columns, you can for the most part, just render the table as you normally would with the `table.getHeaderGroups` and `row.getVisibleCells` methods. + +However, if you are splitting up pinned columns into their own separate tables, you can make use of the `table.getLeftHeaderGroups`, `table.getCenterHeaderGroups`, `table.getRightHeaderGroups`, `row.getLeftVisibleCells`, `row.getCenterVisibleCells`, and `row.getRightVisibleCells` methods to only render the columns that are relevant to the current table. diff --git a/docs/guide/column-sizing.md b/docs/guide/column-sizing.md new file mode 100644 index 0000000000..106d76485d --- /dev/null +++ b/docs/guide/column-sizing.md @@ -0,0 +1,179 @@ +--- +title: Column Sizing Guide +--- + +## Examples + +Want to skip to the implementation? Check out these examples: + +- [column-sizing](../framework/react/examples/column-sizing) +- [column-resizing-performant](../framework/react/examples/column-resizing-performant) + +## API + +[Column Sizing API](../api/features/column-sizing) + +## Column Sizing Guide + +The column sizing feature allows you to optionally specify the width of each column including min and max widths. It also allows you and your users the ability to dynamically change the width of all columns at will, eg. by dragging the column headers. + +### Column Widths + +Columns by default are given the following measurement options: + +```tsx +export const defaultColumnSizing = { + size: 150, + minSize: 20, + maxSize: Number.MAX_SAFE_INTEGER, +} +``` + +These defaults can be overridden by both `tableOptions.defaultColumn` and individual column defs, in that order. + +```tsx +const columns = [ + { + accessorKey: 'col1', + size: 270, //set column size for this column + }, + //... +] + +const table = useTable({ + _features: tableFeatures({ columnSizingFeature, columnResizingFeature }), // columnResizingFeature for drag-to-resize + _rowModels: {}, + defaultColumn: { + size: 200, // starting column size + minSize: 50, // enforced during column resizing + maxSize: 500, // enforced during column resizing + }, + //... +}) +``` + +The column "sizes" are stored in the table state as numbers, and are usually interpreted as pixel unit values, but you can hook up these column sizing values to your css styles however you see fit. + +As a headless utility, table logic for column sizing is really only a collection of states that you can apply to your own layouts how you see fit (our example above implements 2 styles of this logic). You can apply these width measurements in a variety of ways: + +- semantic `table` elements or any elements being displayed in a table css mode +- `div/span` elements or any elements being displayed in a non-table css mode + - Block level elements with strict widths + - Absolutely positioned elements with strict widths + - Flexbox positioned elements with loose widths + - Grid positioned elements with loose widths +- Really any layout mechanism that can interpolate cell widths into a table structure. + +Each of these approaches has its own tradeoffs and limitations which are usually opinions held by a UI/component library or design system, luckily not you 😉. + +### Column Resizing + +TanStack Table provides built-in column resizing state and APIs that allow you to easily implement column resizing in your table UI with a variety of options for UX and performance. + +#### Enable Column Resizing + +By default, the `column.getCanResize()` API will return `true` by default for all columns, but you can either disable column resizing for all columns with the `enableColumnResizing` table option, or disable column resizing on a per-column basis with the `enableResizing` column option. + +```tsx +const columns = [ + { + accessorKey: 'id', + enableResizing: false, //disable resizing for just this column + size: 200, //starting column size + }, + //... +] +``` + +#### Column Resize Mode + +By default, the column resize mode is set to `"onEnd"`. This means that the `column.getSize()` API will not return the new column size until the user has finished resizing (dragging) the column. Usually a small UI indicator will be displayed while the user is resizing the column. + +In React TanStack Table adapter, where achieving 60 fps column resizing renders can be difficult, depending on the complexity of your table or web page, the `"onEnd"` column resize mode can be a good default option to avoid stuttering or lagging while the user resizes columns. That is not to say that you cannot achieve 60 fps column resizing renders while using TanStack React Table, but you may have to do some extra memoization or other performance optimizations in order to achieve this. + +> Advanced column resizing performance tips will be discussed [down below](#advanced-column-resizing-performance). + +If you want to change the column resize mode to `"onChange"` for immediate column resizing renders, you can do so with the `columnResizeMode` table option. + +```tsx +const table = useTable({ + //... + columnResizeMode: 'onChange', //change column resize mode to "onChange" +}) +``` + +#### Column Resize Direction + +By default, TanStack Table assumes that the table markup is laid out in a left-to-right direction. For right-to-left layouts, you may need to change the column resize direction to `"rtl"`. + +```tsx +const table = useTable({ + //... + columnResizeDirection: 'rtl', //change column resize direction to "rtl" for certain locales +}) +``` + +#### Connect Column Resizing APIs to UI + +There are a few really handy APIs that you can use to hook up your column resizing drag interactions to your UI. + +##### Column Size APIs + +To apply the size of a column to the column head cells, data cells, or footer cells, you can use the following APIs: + +```ts +header.getSize() +column.getSize() +cell.column.getSize() +``` + +How you apply these size styles to your markup is up to you, but it is pretty common to use either CSS variables or inline styles to apply the column sizes. + +```tsx + +) +``` + +#### Do We Have to Do It This Way? + +This is just a new way to integrate custom code along-side the built-in features in TanStack Table. In our example up above, we could have just as easily stored the `density` state in a `React.useState`, defined our own `toggleDensity` handler wherever, and just used it in our code separately from the table instance. Building table features along-side TanStack Table instead of deeply integrating them into the table instance is still a perfectly valid way to build custom features. Depending on your use case, this may or may not be the cleanest way to extend TanStack Table with custom features. diff --git a/docs/guide/data.md b/docs/guide/data.md new file mode 100644 index 0000000000..79081dbe20 --- /dev/null +++ b/docs/guide/data.md @@ -0,0 +1,255 @@ +--- +title: Data Guide +--- + +## Data Guide + +Tables start with your data. Your column definitions and rows will depend on the shape of your data. TanStack Table has some TypeScript features that will help you create the rest of your table code with a great type-safe experience. If you set up your data and types correctly, TanStack Table will be able to infer the shape of your data and enforce that your column definitions are made correctly. + +### TypeScript + +TypeScript is NOT required to use the TanStack Table packages... ***BUT*** TanStack Table is written and organized in such a way that makes the awesome TypeScript experience that you get feel like it is one of the main selling points of the library. If you are not using TypeScript, you will be missing out on a lot of great autocompletion and type-checking features that will both speed up your development time and reduce the number of bugs in your code. + +#### TypeScript Generics + +Having a basic understanding of what TypeScript Generics are and how they work will help you understand this guide better, but it should be easy enough to pick up as you go. The official [TypeScript Generics Docs](https://www.typescriptlang.org/docs/handbook/2/generics.html) may be helpful for those not yet familiar with TypeScript. + +### Defining Data Types + +`data` is an array of objects that will be turned into the rows of your table. Each object in the array represents a row of data (under normal circumstances). If you are using TypeScript, we usually define a type for the shape of our data. This type is used as a generic type for all of the other table, column, row, and cell instances. This Generic is usually referred to as `TData` throughout the rest of the TanStack Table types and APIs. + +For example, if we have a table that displays a list of users in an array like this: + +```json +[ + { + "firstName": "Tanner", + "lastName": "Linsley", + "age": 33, + "visits": 100, + "progress": 50, + "status": "Married" + }, + { + "firstName": "Kevin", + "lastName": "Vandy", + "age": 27, + "visits": 200, + "progress": 100, + "status": "Single" + } +] +``` + +Then we can define a User (TData) type like this: + +```ts +//TData +type User = { + firstName: string + lastName: string + age: number + visits: number + progress: number + status: string +} +``` + +We can then define our `data` array with this type, and then TanStack Table will be able to intelligently infer lots of types for us later on in our columns, rows, cells, etc. This is because the `data` type is literally defined as the `TData` generic type. Whatever you pass to the `data` table option will become the `TData` type for the rest of the table instance. Just make sure your column definitions use the same `TData` type as the `data` type when you define them later. + +```ts +//note: data needs a "stable" reference in order to prevent infinite re-renders +const data: User[] = [] +//or +const [data, setData] = React.useState([]) +//or +const data = ref([]) //vue +//etc... +``` + +#### Deep Keyed Data + +If your data is not a nice flat array of objects, that's okay! Once you get around to defining your columns, there are strategies for accessing deeply nested data in your accessors. + +If your `data` looks something like this: + +```json +[ + { + "name": { + "first": "Tanner", + "last": "Linsley" + }, + "info": { + "age": 33, + "visits": 100, + } + }, + { + "name": { + "first": "Kevin", + "last": "Vandy" + }, + "info": { + "age": 27, + "visits": 200, + } + } +] +``` + +You can define a type like this: + +```ts +type User = { + name: { + first: string + last: string + } + info: { + age: number + visits: number + } +} +``` + +And you will be able to access the data in your column definitions with either dot notation in an accessorKey or simply by using an accessorFn. + +```ts +const columns = [ + { + header: 'First Name', + accessorKey: 'name.first', + }, + { + header: 'Last Name', + accessorKey: 'name.last', + }, + { + header: 'Age', + accessorFn: info => info.age, + }, + //... +] +``` + +This is discussed in more detail in the [Column Def Guide](./column-defs). + +> NOTE: The "keys" in your json data can usually be anything, but any periods in the keys will be interpreted as a deep key and will cause errors. + +#### Nested Sub-Row Data + +If you are using expanding features, it can be common to have nested sub-rows in your data. This results in a recursive type that is a bit different. + +So if your data looks like this: + +```json +[ + { + "firstName": "Tanner", + "lastName": "Linsley", + "subRows": [ + { + "firstName": "Kevin", + "lastName": "Vandy", + }, + { + "firstName": "John", + "lastName": "Doe", + "subRows": [ + //... + ] + } + ] + }, + { + "firstName": "Jane", + "lastName": "Doe", + } +] +``` + +You can define a type like this: + +```ts +type User = { + firstName: string + lastName: string + subRows?: User[] //does not have to be called "subRows", can be called anything +} +``` + +Where `subRows` is an optional array of `User` objects. This is discussed in more detail in the [Expanding Guide](./expanding). + +### Give Data a "Stable" Reference + +The `data` array that you pass to the table instance ***MUST*** have a "stable" reference in order to prevent bugs that cause infinite re-renders (especially in React). + +This will depend on which framework adapter you are using, but in React, you should often use `React.useState`, `React.useMemo`, or similar to ensure that both the `data` and `columns` table options have stable references. + +```tsx +const fallbackData = [] +const _features = tableFeatures({}) // Define outside component for stable reference + +export default function MyComponent() { + //✅ GOOD: This will not cause an infinite loop of re-renders because `columns` is a stable reference + const columns = useMemo(() => [ + // ... + ], []); + + //✅ GOOD: This will not cause an infinite loop of re-renders because `data` is a stable reference + const [data, setData] = useState(() => [ + // ... + ]); + + // Columns and data are defined in a stable reference, will not cause infinite loop! + const table = useTable({ + _features, + _rowModels: {}, + columns, + data ?? fallbackData, //also good to use a fallback array that is defined outside of the component (stable reference) + }); + + return
+``` + +Though, as discussed in the [advanced column resizing performance section](#advanced-column-resizing-performance), you may want to consider using CSS variables to apply column sizes to your markup. + +##### Column Resize APIs + +TanStack Table provides a pre-built event handler to make your drag interactions easy to implement. These event handlers are just convenience functions that call other internal APIs to update the column sizing state and re-render the table. Use `header.getResizeHandler()` to connect to your column resize drag interactions, for both mouse and touch events. + +```tsx + +``` + +##### Column Resize Indicator with ColumnSizingInfoState + +TanStack Table keeps track of an state object called `columnSizingInfo` that you can use to render a column resize indicator UI. + +```jsx + +``` + +#### Advanced Column Resizing Performance + +If you are creating large or complex tables (and using React 😉), you may find that if you do not add proper memoization to your render logic, your users may experience degraded performance while resizing columns. + +We have created a [performant column resizing example](../framework/react/examples/column-resizing-performant) that demonstrates how to achieve 60 fps column resizing renders with a complex table that may otherwise have slow renders. It is recommended that you just look at that example to see how it is done, but these are the basic things to keep in mind: + +1. Don't use `column.getSize()` on every header and every data cell. Instead, calculate all column widths once upfront, **memoized**! +2. Memoize your Table Body while resizing is in progress. +3. Use CSS variables to communicate column widths to your table cells. + +If you follow these steps, you should see significant performance improvements while resizing columns. + +If you are not using React, and are using the Svelte, Vue, or Solid adapters instead, you may not need to worry about this as much, but similar principles apply. diff --git a/docs/guide/column-visibility.md b/docs/guide/column-visibility.md new file mode 100644 index 0000000000..864b76a7b5 --- /dev/null +++ b/docs/guide/column-visibility.md @@ -0,0 +1,137 @@ +--- +title: Column Visibility Guide +--- + +## Examples + +Want to skip to the implementation? Check out these examples: + +- [column-visibility](../framework/react/examples/column-visibility) +- [column-ordering](../framework/react/examples/column-ordering) +- [sticky-column-pinning](../framework/react/examples/column-pinning-sticky) + +### Other Examples + +- [SolidJS column-visibility](../framework/solid/examples/column-visibility) +- [Svelte column-visibility](../framework/svelte/examples/column-visibility) + +## API + +[Column Visibility API](../api/features/column-visibility) + +## Column Visibility Guide + +The column visibility feature allows table columns to be hidden or shown dynamically. In v9, add `columnVisibilityFeature` to your `_features` to enable this. There is a dedicated `columnVisibility` state and APIs for managing column visibility dynamically. + +### Column Visibility State + +The `columnVisibility` state is a map of column IDs to boolean values. A column will be hidden if its ID is present in the map and the value is `false`. If the column ID is not present in the map, or the value is `true`, the column will be shown. + +```jsx +import { useTable, tableFeatures, columnVisibilityFeature } from '@tanstack/react-table' + +const [columnVisibility, setColumnVisibility] = useState({ + columnId1: true, + columnId2: false, // hide this column by default + columnId3: true, +}) + +const table = useTable({ + _features: tableFeatures({ columnVisibilityFeature }), + _rowModels: {}, + //... + state: { + columnVisibility, + //... + }, + onColumnVisibilityChange: setColumnVisibility, +}) +``` + +Alternatively, if you don't need to manage the column visibility state outside of the table, you can still set the initial default column visibility state using the `initialState` option. + +> **Note**: If `columnVisibility` is provided to both `initialState` and `state`, the `state` initialization will take precedence and `initialState` will be ignored. Do not provide `columnVisibility` to both `initialState` and `state`, only one or the other. + +```jsx +const table = useTable({ + _features: tableFeatures({ columnVisibilityFeature }), + _rowModels: {}, + //... + initialState: { + columnVisibility: { + columnId1: true, + columnId2: false, // hide this column by default + columnId3: true, + }, + //... + }, +}) +``` + +### Disable Hiding Columns + +By default, all columns can be hidden or shown. If you want to prevent certain columns from being hidden, you set the `enableHiding` column option to `false` for those columns. + +```jsx +const columns = [ + { + header: 'ID', + accessorKey: 'id', + enableHiding: false, // disable hiding for this column + }, + { + header: 'Name', + accessor: 'name', // can be hidden + }, +]; +``` + +### Column Visibility Toggle APIs + +There are several column API methods that are useful for rendering column visibility toggles in the UI. + +- `column.getCanHide` - Useful for disabling the visibility toggle for a column that has `enableHiding` set to `false`. +- `column.getIsVisible` - Useful for setting the initial state of the visibility toggle. +- `column.toggleVisibility` - Useful for toggling the visibility of a column. +- `column.getToggleVisibilityHandler` - Shortcut for hooking up the `column.toggleVisibility` method to a UI event handler. + +```jsx +{table.getAllColumns().map((column) => ( + +))} +``` + +### Column Visibility Aware Table APIs + +When you render your header, body, and footer cells, there are a lot of API options available. You may see APIs like `table.getAllLeafColumns` and `row.getAllCells`, but if you use these APIs, they will not take column visibility into account. Instead, you need to use the "visible" variants of these APIs, such as `table.getVisibleLeafColumns` and `row.getVisibleCells`. + +```jsx + + + + {table.getVisibleLeafColumns().map((column) => ( // takes column visibility into account + // + ))} + + + + {table.getRowModel().rows.map((row) => ( + + {row.getVisibleCells().map((cell) => ( // takes column visibility into account + // + ))} + + ))} + +
+``` + +If you are using the Header Group APIs, they will already take column visibility into account. diff --git a/docs/guide/columns.md b/docs/guide/columns.md new file mode 100644 index 0000000000..d446c3dc27 --- /dev/null +++ b/docs/guide/columns.md @@ -0,0 +1,72 @@ +--- +title: Columns Guide +--- + +## API + +[Column API](../api/core/column) + +## Columns Guide + +> Note: This guide is about the actual `column` objects that are generated within the table instance and NOT about setting up the [column definitions](./column-defs) for your table. + +This quick guide will discuss the different ways you can retrieve and interact with `column` objects in TanStack Table. + +### Where to Get Columns From + +You can find the `column` objects in many places. They are often attached + +#### Header and Cell Objects + +Before you reach for one of the `table` instance APIs, consider if you actually need to retrieve either [headers](./headers) or [cells](./cells) instead of `columns`. If you are rending out the markup for your table, you will most likely want to reach for the APIs that return headers or cells instead of columns. The column objects themselves are not really meant to render out the headers or cells, but the `header` and `cell` objects will contain references to these `column` objects from which they can derive the necessary information to render their UI. + +```js +const column = cell.column; // get column from cell +const column = header.column; // get column from header +``` + +#### Column Table Instance APIs + +There are dozens of `table` instance APIs you can use to retrieve columns from the table instance. Which APIs you will use will depend entirely on which features you are using in your table and your use-case. + +##### Get Column + +If you need to just get a single column by its ID, you can use the `table.getColumn` API. + +```js +const column = table.getColumn('firstName'); +``` + +##### Get Columns + +The simplest column API is `table.getAllColumns`, which will return a list of all columns in the table. There are dozens of other column APIs that are affected by other features and the state of the table that come alongside this API though. `table.getAllFlatColumns`, `table.getAllLeafColumns`, `getCenterLeafColumns`, `table.getLeftVisibleLeafColumns` are just some examples of other column APIs that you might use in tandem with the column visibility or column pinning features. + +### Column Objects + +Column objects are not actually meant to be used to render out the table UI directly, so they are not associated 1-to-1 with any `
` or `` elements in your table, but they contain a lot of useful properties and methods that you can use to interact with the table state. + +#### Column IDs + +Every column must have a unique `id` defined in their associated [Column Definition](./column-defs). Usually, you define this `id` yourself, or it is derived from the `accessorKey` or `header` properties in the column definition. + +#### ColumnDef + +A reference to the original `columnDef` object that was used to created the column is always available on the column object. + +#### Nested Grouped Columns Properties + +There are a few properties on `column` objects that are only useful if the column is part of a nested or grouped column structure. These properties include: + +- `columns`: An array of child columns that belong to a group column. +- `depth`: The header group "row index" that the column group belongs to. +- `parent`: The parent column of the column. If the column is a top-level column, this will be `undefined`. + +### More Column APIs + +There are dozens of Column APIs that you can use to interact with the table state and extract cell values from the table based on the state of the table. See each features column API documentation for more information. + +### Column Rendering + +Don't necessarily use `column` objects to render `headers` or `cells` directly. Instead, use the [`header`](./headers) and [`cell`](./cells) objects, as discussed above. + +But if you are just rendering a list of columns somewhere else in your UI for something like a column visibility menu or something similar, you can just map over a columns array and render out the UI as you normally would. diff --git a/docs/guide/custom-features.md b/docs/guide/custom-features.md new file mode 100644 index 0000000000..5675bf0ea7 --- /dev/null +++ b/docs/guide/custom-features.md @@ -0,0 +1,286 @@ +--- +title: Custom Features Guide +--- + +## Examples + +Want to skip to the implementation? Check out these examples: + +- [custom-features](../framework/react/examples/custom-features) + +## Custom Features Guide + +In this guide, we'll cover how to extend TanStack Table with custom features, and along the way, we'll learn more about how the TanStack Table v9 codebase is structured and how it works. + +### TanStack Table Strives to be Lean + +TanStack Table has a core set of features that are built into the library such as sorting, filtering, pagination, etc. We've received a lot of requests and sometimes even some well thought out PRs to add even more features to the library. While we are always open to improving the library, we also want to make sure that TanStack Table remains a lean library that does not include too much bloat and code that is unlikely to be used in most use cases. Not every PR can, or should, be accepted into the core library, even if it does solve a real problem. This can be frustrating to developers where TanStack Table solves 90% of their use case, but they need a little bit more control. + +TanStack Table has always been built in a way that allows it to be highly extensible (at least since v7). The `table` instance that is returned from whichever framework adapter that you are using (`createTable`, `useTable`, etc) is a plain JavaScript object that can have extra properties or APIs added to it. It has always been possible to use composition to add custom logic, state, and APIs to the table instance. Libraries like [Material React Table](https://github.com/KevinVandy/material-react-table/blob/v2/packages/material-react-table/src/hooks/useMRT_TableInstance.ts) have simply created custom wrapper hooks around the `useTable` hook to extend the table instance with custom functionality. + +In v9, TanStack Table uses the `_features` option (via `tableFeatures()`) to declare which features your table uses. This enables tree-shaking—you only bundle the code for the features you need. You can add custom features to the table instance in exactly the same way as the built-in features. + +> In v9, features are opt-in. Use `tableFeatures({ ... })` to declare which features your table uses, including custom features. + +### How TanStack Table Features Work + +TanStack Table's source code is arguably somewhat simple (at least we think so). All code for each feature is split up into its own object/file with instantiation methods to create initial state, default table and column options, and API methods that can be added to the `table`, `header`, `column`, `row`, and `cell` instances. + +All of the functionality of a feature object can be described with the `TableFeature` type that is exported from TanStack Table. This type is a TypeScript interface that describes the shape of a feature object needed to create a feature. + +```ts +export interface TableFeature { + constructCell?: ( + cell: Cell, + column: Column, + row: Row, + table: Table + ) => void + constructColumn?: (column: Column, table: Table) => void + constructHeader?: (header: Header, table: Table) => void + constructRow?: (row: Row, table: Table) => void + constructTable?: (table: Table) => void + getDefaultColumnDef?: () => Partial> + getDefaultTableOptions?: ( + table: Table + ) => Partial> + getInitialState?: (initialState?: InitialTableState) => Partial +} +``` + +This might be a bit confusing, so let's break down what each of these methods do: + +#### Default Options and Initial State + +
+ +##### getDefaultTableOptions + +The `getDefaultTableOptions` method in a table feature is responsible for setting the default table options for that feature. For example, in the [Column Sizing](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/columnSizingFeature.ts) feature, the `getDefaultTableOptions` method sets the default `columnResizeMode` option with a default value of `"onEnd"`. + +
+ +##### getDefaultColumnDef + +The `getDefaultColumnDef` method in a table feature is responsible for setting the default column options for that feature. For example, in the [Sorting](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/rowSortingFeature.ts) feature, the `getDefaultColumnDef` method sets the default `sortUndefined` column option with a default value of `1`. + +
+ +##### getInitialState + +The `getInitialState` method in a table feature is responsible for setting the default state for that feature. For example, in the [Pagination](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/rowPaginationFeature.ts) feature, the `getInitialState` method sets the default `pageSize` state with a value of `10` and the default `pageIndex` state with a value of `0`. + +#### API Creators + +
+ +##### constructTable + +The `constructTable` method in a table feature is responsible for adding methods to the `table` instance. For example, in the [Row Selection](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/rowSelectionFeature.ts) feature, the `constructTable` method adds many table instance API methods such as `toggleAllRowsSelected`, `getIsAllRowsSelected`, `getIsSomeRowsSelected`, etc. So then, when you call `table.toggleAllRowsSelected()`, you are calling a method that was added to the table instance by the `rowSelectionFeature` feature. + +
+ +##### constructHeader + +The `constructHeader` method in a table feature is responsible for adding methods to the `header` instance. For example, in the [Column Sizing](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/columnSizingFeature.ts) feature, the `constructHeader` method adds many header instance API methods such as `getStart`, and many others. So then, when you call `header.getStart()`, you are calling a method that was added to the header instance by the `columnSizingFeature` feature. + +
+ +##### constructColumn + +The `constructColumn` method in a table feature is responsible for adding methods to the `column` instance. For example, in the [Sorting](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/rowSortingFeature.ts) feature, the `constructColumn` method adds many column instance API methods such as `getNextSortingOrder`, `toggleSorting`, etc. So then, when you call `column.toggleSorting()`, you are calling a method that was added to the column instance by the `rowSortingFeature` feature. + +
+ +##### constructRow + +The `constructRow` method in a table feature is responsible for adding methods to the `row` instance. For example, in the [Row Selection](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/rowSelectionFeature.ts) feature, the `constructRow` method adds many row instance API methods such as `toggleSelected`, `getIsSelected`, etc. So then, when you call `row.toggleSelected()`, you are calling a method that was added to the row instance by the `rowSelectionFeature` feature. + +
+ +##### constructCell + +The `constructCell` method in a table feature is responsible for adding methods to the `cell` instance. For example, in the [Column Grouping](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/columnGroupingFeature.ts) feature, the `constructCell` method adds many cell instance API methods such as `getIsGrouped`, `getIsAggregated`, etc. So then, when you call `cell.getIsGrouped()`, you are calling a method that was added to the cell instance by the `columnGroupingFeature` feature. + +### Adding a Custom Feature + +Let's walk through making a custom table feature for a hypothetical use case. Let's say we want to add a feature to the table instance that allows the user to change the "density" (padding of cells) of the table. + +Check out the full [custom-features](../framework/react/examples/custom-features) example to see the full implementation, but here's an in-depth look at the steps to create a custom feature. + +#### Step 1: Set up TypeScript Types + +Assuming you want the same full type-safety that the built-in features in TanStack Table have, let's set up all of the TypeScript types for our new feature. We'll create types for new table options, state, and table instance API methods. + +These types are following the naming convention used internally within TanStack Table, but you can name them whatever you want. We are not adding these types to TanStack Table yet, but we'll do that in the next step. + +```ts +// define types for our new feature's custom state +export type DensityState = 'sm' | 'md' | 'lg' +export interface DensityTableState { + density: DensityState +} + +// define types for our new feature's table options +export interface DensityOptions { + enableDensity?: boolean + onDensityChange?: OnChangeFn +} + +// Define types for our new feature's table APIs +export interface DensityInstance { + setDensity: (updater: Updater) => void + toggleDensity: (value?: DensityState) => void +} +``` + +#### Step 2: Use Declaration Merging to Add New Types to TanStack Table + +We can tell TypeScript to modify the exported types from TanStack Table to include our new feature's types. This is called "declaration merging" and it's a powerful feature of TypeScript. This way, we should not have to use any TypeScript hacks such as `as unknown as CustomTable` or `// @ts-ignore` in our new feature's code or in our application code. + +```ts +// Use declaration merging to add our new feature APIs and state types to TanStack Table's existing types. +declare module '@tanstack/react-table' { // or whatever framework adapter you are using + //merge our new feature's state with the existing table state + interface TableState extends DensityTableState {} + //merge our new feature's options with the existing table options + interface TableOptions + extends DensityOptions {} + //merge our new feature's instance APIs with the existing table instance APIs + interface Table extends DensityInstance {} + // if you need to add cell instance APIs... + // interface Cell extends DensityCell + // if you need to add row instance APIs... + // interface Row extends DensityRow + // if you need to add column instance APIs... + // interface Column extends DensityColumn + // if you need to add header instance APIs... + // interface Header extends DensityHeader + + // Note: declaration merging on `ColumnDef` is not possible because it is a complex type, not an interface. + // But you can still use declaration merging on `ColumnDef.meta` +} +``` + +Once we do this correctly, we should have no TypeScript errors when we try to both create our new feature's code and use it in our application. + +##### Caveats of Using Declaration Merging + +One caveat of using declaration merging is that it will affect the TanStack Table types for every table across your codebase. This is not a problem if you plan on loading the same feature set for every table in your application, but it could be a problem if some of your tables load extra features and some do not. Alternatively, you can just make a bunch of custom types that extend off of the TanStack Table types with your new features added. This is what [Material React Table](https://github.com/KevinVandy/material-react-table/blob/v2/packages/material-react-table/src/types.ts) does in order to avoid affecting the types of vanilla TanStack Table tables, but it's a bit more tedious, and requires a lot of type casting at certain points. + +#### Step 3: Create the Feature Object + +With all of that TypeScript setup out of the way, we can now create the feature object for our new feature. This is where we define all of the methods that will be added to the table instance. + +Use the `TableFeature` type to ensure that you are creating the feature object correctly. If the TypeScript types are set up correctly, you should have no TypeScript errors when you create the feature object with the new state, options, and instance APIs. + +```ts +export const DensityFeature: TableFeature = { //Use the TableFeature type!! + // define the new feature's initial state + getInitialState: (state): DensityTableState => { + return { + density: 'md', + ...state, + } + }, + + // define the new feature's default options + getDefaultTableOptions: ( + table: Partial> + ): DensityOptions => { + return { + enableDensity: true, + onDensityChange: makeStateUpdater('density', table), + } as DensityOptions + }, + // if you need to add a default column definition... + // getDefaultColumnDef: (): Partial> => { + // return { meta: {} } //use meta instead of directly adding to the columnDef to avoid typescript stuff that's hard to workaround + // }, + + // define the new feature's table instance methods + constructTable: (table: Table): void => { + table.setDensity = updater => { + const safeUpdater: Updater = old => { + let newState = functionalUpdate(updater, old) + return newState + } + return table.options.onDensityChange?.(safeUpdater) + } + table.toggleDensity = value => { + table.setDensity(old => { + if (value) return value + return old === 'lg' ? 'md' : old === 'md' ? 'sm' : 'lg' //cycle through the 3 options + }) + } + }, + + // if you need to add row instance APIs... + // constructRow: (row, table): void => {}, + // if you need to add cell instance APIs... + // constructCell: (cell, column, row, table): void => {}, + // if you need to add column instance APIs... + // constructColumn: (column, table): void => {}, + // if you need to add header instance APIs... + // constructHeader: (header, table): void => {}, +} +``` + +#### Step 4: Add the Feature to the Table + +Now that we have our feature object, we can add it to the table instance by including it in the `tableFeatures()` call and passing the result to the `_features` option when we create the table instance. + +```ts +const _features = tableFeatures({ DensityFeature }) + +const table = useTable({ + _features, + _rowModels: {}, + columns, + data, + //.. +}) +``` + +#### Step 5: Use the Feature in Your Application + +Now that the feature is added to the table instance, you can use the new instance APIs options, and state in your application. + +```tsx +const _features = tableFeatures({ DensityFeature }) + +const table = useTable({ + _features, + _rowModels: {}, + columns, + data, + //... + state: { + density, + }, + onDensityChange: setDensity, +}) +//... +const { density } = table.store.state +return( +
+ {flexRender(cell.column.columnDef.cell, cell.getContext())} +
...
; +} +``` + +`React.useState` and `React.useMemo` are not the only ways to give your data a stable reference. You can also define your data outside of the component or use a 3rd party state management library like Redux, Zustand, or TanStack Query. + +The main thing to avoid is defining the `data` array inside the same scope as the `useTable` call. That will cause the `data` array to be redefined on every render, which will cause an infinite loop of re-renders. + +```tsx +export default function MyComponent() { + //😵 BAD: This will cause an infinite loop of re-renders because `columns` is redefined as a new array on every render! + const columns = [ + // ... + ]; + + //😵 BAD: This will cause an infinite loop of re-renders because `data` is redefined as a new array on every render! + const data = [ + // ... + ]; + + //❌ Columns and data are defined in the same scope as `useTable` without a stable reference, will cause infinite loop! + const table = useTable({ + _features: tableFeatures({}), //❌ Also re-created on every render + _rowModels: {}, + columns, + data ?? [], //❌ Also bad because the fallback array is re-created on every render + }); + + return ...
; +} +``` + +### How TanStack Table Transforms Data + +Later, in other parts of these docs, you will see how TanStack Table processes the `data` that you pass to the table and generates the row and cell objects that are used to create the table. The `data` that you pass to the table is never mutated by TanStack Table, but the actual values in the rows and cells may be transformed by the accessors in your column definitions, or by other features performed by [row models](./row-models) like grouping or aggregation. + +### How Much Data Can TanStack Table Handle? + +Believe it or not, TanStack Table was actually built to scale up to handle potentially hundreds of thousands of rows of data in the client. This is obviously not always possible, depending on the size of each column's data and the number of columns. However, the sorting, filtering, pagination, and grouping features are all built with performance in mind for large datasets. + +The default mindset of a developer building a data grid is to implement server-side pagination, sorting, and filtering for large datasets. This is still usually a good idea, but a lot of developers underestimate how much data can actually be handled in the client with modern browsers and the right optimizations. If your table will never have more than a few thousand rows, you can probably take advantage of the client-side features in TanStack Table instead of implementing them yourself on the server. Before committing to letting TanStack Table's client-side features handle your large dataset, you should test it with your actual data to see if it performs well enough for your needs, of course. + +This is discussed in more detail in the [Pagination Guide](./pagination#should-you-use-client-side-pagination). diff --git a/docs/guide/expanding.md b/docs/guide/expanding.md new file mode 100644 index 0000000000..3d932f5be9 --- /dev/null +++ b/docs/guide/expanding.md @@ -0,0 +1,250 @@ +--- +title: Expanding Guide +--- + +## Examples + +Want to skip to the implementation? Check out these examples: + +- [expanding](../framework/react/examples/expanding) +- [grouping](../framework/react/examples/grouping) +- [sub-components](../framework/react/examples/sub-components) + +## API + +[Expanding API](../api/features/expanding) + +## Expanding Feature Guide + +Expanding is a feature that allows you to show and hide additional rows of data related to a specific row. This can be useful in cases where you have hierarchical data and you want to allow users to drill down into the data from a higher level. Or it can be useful for showing additional information related to a row. + +### Different use cases for Expanding Features + +There are multiple use cases for expanding features in TanStack Table that will be discussed below. + +1. Expanding sub-rows (child rows, aggregate rows, etc.) +2. Expanding custom UI (detail panels, sub-tables, etc.) + +### Enable Client-Side Expanding + +To use the client-side expanding features, add the `rowExpandingFeature` to your features and the `expandedRowModel` to your row models: + +```ts +import { + useTable, + tableFeatures, + rowExpandingFeature, + createExpandedRowModel, +} from '@tanstack/react-table' + +const _features = tableFeatures({ rowExpandingFeature }) + +const table = useTable({ + _features, + _rowModels: { + expandedRowModel: createExpandedRowModel(), + }, + // other options... +}) +``` + +Expanded data can either contain table rows or any other data you want to display. We will discuss how to handle both cases in this guide. + +### Table rows as expanded data + +Expanded rows are essentially child rows that inherit the same column structure as their parent rows. If your data object already includes these expanded rows data, you can utilize the `getSubRows` function to specify these child rows. However, if your data object does not contain the expanded rows data, they can be treated as custom expanded data, which is discussed in next section. + +For example, if you have a data object like this: + +```ts +type Person = { + id: number + name: string + age: number + children?: Person[] | undefined +} + +const data: Person[] = [ + { id: 1, + name: 'John', + age: 30, + children: [ + { id: 2, name: 'Jane', age: 5 }, + { id: 5, name: 'Jim', age: 10 } + ] + }, + { id: 3, + name: 'Doe', + age: 40, + children: [ + { id: 4, name: 'Alice', age: 10 } + ] + }, +] +``` + +Then you can use the getSubRows function to return the children array in each row as expanded rows. The table instance will now understand where to look for the sub rows on each row. + +```ts +const table = useTable({ + _features, + _rowModels: { + expandedRowModel: createExpandedRowModel(), + }, + getSubRows: (row) => row.children, // return the children array as sub-rows + // other options... +}) +``` + +> **Note:** You can have a complicated `getSubRows` function, but keep in mind that it will run for every row and every sub-row. This can be expensive if the function is not optimized. Async functions are not supported. + +### Custom Expanding UI + +In some cases, you may wish to show extra details or information, which may or may not be part of your table data object, such as expanded data for rows. This kind of expanding row UI has gone by many names over the years including "expandable rows", "detail panels", "sub-components", etc. + +By default, the `row.getCanExpand()` row instance API will return false unless it finds `subRows` on a row. This can be overridden by implementing your own `getRowCanExpand` function in the table instance options. + +```ts +//... +const table = useTable({ + _features, + _rowModels: { + expandedRowModel: createExpandedRowModel(), + }, + getRowCanExpand: (row) => true, // Add your logic to determine if a row can be expanded. True means all rows include expanded data + // other options... +}) +//... + + {table.getRowModel().rows.map((row) => ( + + {/* Normal row UI */} + + {row.getVisibleCells().map((cell) => ( + + {flexRender(cell.column.columnDef.cell, cell.getContext())} + + ))} + + {/* If the row is expanded, render the expanded UI as a separate row with a single cell that spans the width of the table */} + {row.getIsExpanded() && ( + + // The number of columns you wish to span for the expanded data if it is not a row that shares the same columns as the parent row + // Your custom UI goes here + + + )} + + ))} + +//... +``` + +### Expanded rows state + +If you need to control the expanded state of the rows in your table, you can do so by using the expanded state and the `onExpandedChange` option. This allows you to manage the expanded state according to your requirements. + +```ts +const [expanded, setExpanded] = useState({}) + +const table = useTable({ + _features, + _rowModels: { expandedRowModel: createExpandedRowModel() }, + // other options... + state: { + expanded, + }, + onExpandedChange: setExpanded, +}) +``` + +The ExpandedState type is defined as follows: + +```ts +type ExpandedState = true | Record +``` + +If the ExpandedState is true, it means all rows are expanded. If it's a record, only the rows with IDs present as keys in the record and have their value set to true are expanded. For example, if the expanded state is { row1: true, row2: false }, it means the row with ID row1 is expanded and the row with ID row2 is not expanded. This state is used by the table to determine which rows are expanded and should display their subRows, if any. + +### UI toggling handler for expanded rows + +TanStack table will not add a toggling handler UI for expanded data to your table. You should manually add it within each row's UI to allow users to expand and collapse the row. For example, you can add a button UI within the columns definition. + +```ts +const columns = [ + { + accessorKey: 'name', + header: 'Name', + }, + { + accessorKey: 'age', + header: 'Age', + }, + { + header: 'Children', + cell: ({ row }) => { + return row.getCanExpand() ? + + : ''; + }, + }, +] +``` + +### Filtering Expanded Rows + +By default, the filtering process starts from the parent rows and moves downwards. This means if a parent row is excluded by the filter, all its child rows will also be excluded. However, you can change this behavior by using the `filterFromLeafRows` option. When this option is enabled, the filtering process starts from the leaf (child) rows and moves upwards. This ensures that a parent row will be included in the filtered results as long as at least one of its child or grandchild rows meets the filter criteria. Additionally, you can control how deep into the child hierarchy the filter process goes by using the `maxLeafRowFilterDepth` option. This option allows you to specify the maximum depth of child rows that the filter should consider. + +```ts +//... +const table = useTable({ + _features: tableFeatures({ columnFilteringFeature, rowExpandingFeature }), + _rowModels: { + filteredRowModel: createFilteredRowModel(filterFns), + expandedRowModel: createExpandedRowModel(), + }, + getSubRows: (row) => row.subRows, + filterFromLeafRows: true, // search through the expanded rows + maxLeafRowFilterDepth: 1, // limit the depth of the expanded rows that are searched + // other options... +}) +``` + +### Paginating Expanded Rows + +By default, expanded rows are paginated along with the rest of the table (which means expanded rows may span multiple pages). If you want to disable this behavior (which means expanded rows will always render on their parents page. This also means more rows will be rendered than the set page size) you can use the `paginateExpandedRows` option. + +```ts +const table = useTable({ + _features, + _rowModels: { expandedRowModel: createExpandedRowModel() }, + // other options... + paginateExpandedRows: false, +}) +``` + +### Pinning Expanded Rows + +Pinning expanded rows works the same way as pinning regular rows. You can pin expanded rows to the top or bottom of the table. Please refer to the [Pinning Guide](./pinning.md) for more information on row pinning. + +### Sorting Expanded Rows + +By default, expanded rows are sorted along with the rest of the table. + +### Manual Expanding (server-side) + +If you are doing server-side expansion, you can enable manual row expansion by setting the manualExpanding option to true. This means that the `getExpandedRowModel` will not be used to expand rows and you would be expected to perform the expansion in your own data model. + +```ts +const table = useTable({ + _features: tableFeatures({ rowExpandingFeature }), + _rowModels: {}, // no expandedRowModel needed for manual expanding + // other options... + manualExpanding: true, +}) +``` diff --git a/docs/guide/features.md b/docs/guide/features.md new file mode 100644 index 0000000000..97d850b690 --- /dev/null +++ b/docs/guide/features.md @@ -0,0 +1,23 @@ +--- +title: Features Guide +--- + +TanStack Table comes with many features, each with their own associated options and API. + +> **v9 note:** In v9, features are opt-in. You declare which features your table uses via the `_features` option (using `tableFeatures()`). This enables tree-shaking—you only bundle the code for the features you need. See the [Table Instance Guide](./tables) and [Row Models Guide](./row-models) for setup. To include all features (v8-style), use `stockFeatures`. + +- [Column Ordering](./column-ordering) +- [Column Pinning](./column-pinning) +- [Column Sizing](./column-sizing) +- [Column Visibility](./column-visibility) +- [Expanding](./expanding) +- [Column Faceting](./column-faceting) +- [Column Filtering](./column-filtering) +- [Global Faceting](./global-faceting) +- [Global Filtering](./global-filtering) +- [Grouping](./grouping) +- [Pagination](./pagination) +- [Row Pinning](./row-pinning) +- [Row Selection](./row-selection) +- [Sorting](./sorting) +- [Virtualization](./virtualization) \ No newline at end of file diff --git a/docs/guide/filters.md b/docs/guide/filters.md new file mode 100644 index 0000000000..8d10bda84e --- /dev/null +++ b/docs/guide/filters.md @@ -0,0 +1,13 @@ +--- +title: Filters Guide +--- + + + +The filter guides are now split into multiple guides: + +- [Column Filtering](./column-filtering) +- [Global Filtering](./global-filtering) +- [Fuzzy Filtering](./fuzzy-filtering) +- [Column Faceting](./column-faceting) +- [Global Faceting](./global-faceting) \ No newline at end of file diff --git a/docs/guide/fuzzy-filtering.md b/docs/guide/fuzzy-filtering.md new file mode 100644 index 0000000000..46f9277897 --- /dev/null +++ b/docs/guide/fuzzy-filtering.md @@ -0,0 +1,139 @@ +--- +title: Fuzzy Filtering Guide +--- + +## Examples + +Want to skip to the implementation? Check out these examples: + +- [filters-fuzzy](../framework/react/examples/filters-fuzzy) + +## API + +[Filters API](../api/features/filters) + +## Fuzzy Filtering Guide + +Fuzzy filtering is a technique that allows you to filter data based on approximate matches. This can be useful when you want to search for data that is similar to a given value, rather than an exact match. + +You can implement a client side fuzzy filtering by defining a custom filter function. This function should take in the row, columnId, and filter value, and return a boolean indicating whether the row should be included in the filtered data. + +Fuzzy filtering is mostly used with global filtering, but you can also apply it to individual columns. We will discuss how to implement fuzzy filtering for both cases. + +> **Note:** You will need to install the `@tanstack/match-sorter-utils` library to use fuzzy filtering. +> TanStack Match Sorter Utils is a fork of [match-sorter](https://github.com/kentcdodds/match-sorter) by Kent C. Dodds. It was forked in order to work better with TanStack Table's row by row filtering approach. + +Using the match-sorter libraries is optional, but the TanStack Match Sorter Utils library provides a great way to both fuzzy filter and sort by the rank information it returns, so that rows can be sorted by their closest matches to the search query. + +### Defining a Custom Fuzzy Filter Function + +Here's an example of a custom fuzzy filter function: + +```typescript +import { rankItem } from '@tanstack/match-sorter-utils'; +import { FilterFn } from '@tanstack/table'; + +const fuzzyFilter: FilterFn = (row, columnId, value, addMeta) => { + // Rank the item + const itemRank = rankItem(row.getValue(columnId), value) + + // Store the itemRank info + addMeta({ itemRank }) + + // Return if the item should be filtered in/out + return itemRank.passed +} +``` + +In this function, we're using the rankItem function from the @tanstack/match-sorter-utils library to rank the item. We then store the ranking information in the meta data of the row, and return whether the item passed the ranking criteria. + +### Using Fuzzy Filtering with Global Filtering + +To use fuzzy filtering with global filtering, you can specify the fuzzy filter function in the globalFilterFn option of the table instance: + +```typescript +import { + useTable, + tableFeatures, + globalFilteringFeature, + rowSortingFeature, + createFilteredRowModel, + createSortedRowModel, + filterFns, + sortFns, +} from '@tanstack/react-table' + +const _features = tableFeatures({ globalFilteringFeature, rowSortingFeature }) + +const table = useTable({ + _features, + _rowModels: { + filteredRowModel: createFilteredRowModel({ + ...filterFns, + fuzzy: fuzzyFilter, + }), + sortedRowModel: createSortedRowModel(sortFns), // needed if you want sorting with fuzzy rank + }, + columns, + data, + globalFilterFn: 'fuzzy', +}) +``` + +### Using Fuzzy Filtering with Column Filtering + +To use fuzzy filtering with column filtering, pass your fuzzy filter function to `createFilteredRowModel` (merging it with the built-in `filterFns`). You can then specify the fuzzy filter by name in the `filterFn` option of the column definition: + +```typescript +const column = [ + { + accessorFn: row => `${row.firstName} ${row.lastName}`, + id: 'fullName', + header: 'Full Name', + cell: info => info.getValue(), + filterFn: 'fuzzy', //using our custom fuzzy filter function + }, + // other columns... +]; +``` + +In this example, we're applying the fuzzy filter to a column that combines the firstName and lastName fields of the data. + +#### Sorting with Fuzzy Filtering + +When using fuzzy filtering with column filtering, you might also want to sort the data based on the ranking information. You can do this by defining a custom sorting function: + +```typescript +import { compareItems } from '@tanstack/match-sorter-utils' +import { sortFns } from '@tanstack/table' + +const fuzzySort: SortFn = (rowA, rowB, columnId) => { + let dir = 0 + + // Only sort by rank if the column has ranking information + if (rowA.columnFiltersMeta[columnId]) { + dir = compareItems( + rowA.columnFiltersMeta[columnId]?.itemRank!, + rowB.columnFiltersMeta[columnId]?.itemRank! + ) + } + + // Provide an alphanumeric fallback for when the item ranks are equal + return dir === 0 ? sortFns.alphanumeric(rowA, rowB, columnId) : dir +} +``` + +In this function, we're comparing the ranking information of the two rows. If the ranks are equal, we fall back to alphanumeric sorting. + +You can then specify this sorting function in the sortFn option of the column definition: + +```typescript +{ + accessorFn: row => `${row.firstName} ${row.lastName}`, + id: 'fullName', + header: 'Full Name', + cell: info => info.getValue(), + filterFn: 'fuzzy', //using our custom fuzzy filter function + sortFn: 'fuzzySort', //using our custom fuzzy sort function +} +``` diff --git a/docs/guide/global-faceting.md b/docs/guide/global-faceting.md new file mode 100644 index 0000000000..caac1de6d4 --- /dev/null +++ b/docs/guide/global-faceting.md @@ -0,0 +1,82 @@ +--- +title: Global Faceting Guide +--- + +## Examples + +Want to skip to the implementation? Check out these examples: + +- [filters-faceted](../framework/react/examples/filters) + +## API + +[Global Faceting API](../api/features/global-faceting) + +## Global Faceting Guide + +Global Faceting allows you to generate lists of values for all columns from the table's data. For example, a list of unique values in a table can be generated from all rows in all columns to be used as search suggestions in an autocomplete filter component. Or, a tuple of minimum and maximum values can be generated from a table of numbers to be used as a range for a range slider filter component. + +### Global Faceting Row Models + +In order to use any of the global faceting features, add the appropriate faceted row models to your `_rowModels`: + +```ts +import { + useTable, + tableFeatures, + createFacetedRowModel, + createFacetedMinMaxValues, + createFacetedUniqueValues, +} from '@tanstack/react-table' + +const _features = tableFeatures({}) // add globalFilteringFeature if using global filtering + +const table = useTable({ + _features, + _rowModels: { + facetedRowModel: createFacetedRowModel(), // required (other faceting methods depend on this) + facetedMinMaxValues: createFacetedMinMaxValues(), // if you need min/max values + facetedUniqueValues: createFacetedUniqueValues(), // if you need a list of unique values + }, + // other options... +}) +``` + +### Use Global Faceted Row Models + +Once you have included the appropriate row models in your table options, you will be able to use the faceting table instance APIs to access the lists of values generated by the faceted row models. + +```ts +// list of unique values for autocomplete filter +const autoCompleteSuggestions = + Array.from(table.getGlobalFacetedUniqueValues().keys()) + .sort() + .slice(0, 5000); +``` + +```ts +// tuple of min and max values for range filter +const [min, max] = table.getGlobalFacetedMinMaxValues() ?? [0, 1]; +``` + +### Custom Global (Server-Side) Faceting + +If instead of using the built-in client-side faceting features, you can implement your own faceting logic on the server-side and pass the faceted values to the client-side. You can use the getGlobalFacetedUniqueValues and getGlobalFacetedMinMaxValues table options to resolve the faceted values from the server-side. + +```ts +const facetingQuery = useQuery( + 'faceting', + async () => { + const response = await fetch('/api/faceting'); + return response.json(); + }, + { + onSuccess: (data) => { + table.getGlobalFacetedUniqueValues = () => data.uniqueValues; + table.getGlobalFacetedMinMaxValues = () => data.minMaxValues; + }, + } +); +``` + +In this example, we use the `useQuery` hook from `react-query` to fetch faceting data from the server. Once the data is fetched, we set the `getGlobalFacetedUniqueValues` and `getGlobalFacetedMinMaxValues` table options to return the faceted values from the server response. This will allow the table to use the server-side faceting data for generating autocomplete suggestions and range filters. diff --git a/docs/guide/global-filtering.md b/docs/guide/global-filtering.md new file mode 100644 index 0000000000..89cadec111 --- /dev/null +++ b/docs/guide/global-filtering.md @@ -0,0 +1,226 @@ +--- +title: Global Filtering Guide +--- + +## Examples + +Want to skip to the implementation? Check out these examples: + +- [Global Filters](../framework/react/examples/filters-global) + +## API + +[Global Filtering API](../api/features/global-filtering) + +## Global Filtering Guide + +Filtering comes in 2 flavors: Column Filtering and Global Filtering. + +This guide will focus on global filtering, which is a filter that is applied across all columns. + +### Client-Side vs Server-Side Filtering + +If you have a large dataset, you may not want to load all of that data into the client's browser in order to filter it. In this case, you will most likely want to implement server-side filtering, sorting, pagination, etc. + +However, as also discussed in the [Pagination Guide](./pagination#should-you-use-client-side-pagination), a lot of developers underestimate how many rows can be loaded client-side without a performance hit. The TanStack table examples are often tested to handle up to 100,000 rows or more with decent performance for client-side filtering, sorting, pagination, and grouping. This doesn't necessarily mean that your app will be able to handle that many rows, but if your table is only going to have a few thousand rows at most, you might be able to take advantage of the client-side filtering, sorting, pagination, and grouping that TanStack table provides. + +> TanStack Table can handle thousands of client-side rows with good performance. Don't rule out client-side filtering, pagination, sorting, etc. without some thought first. + +Every use-case is different and will depend on the complexity of the table, how many columns you have, how large every piece of data is, etc. The main bottlenecks to pay attention to are: + +1. Can your server query all of the data in a reasonable amount of time (and cost)? +2. What is the total size of the fetch? (This might not scale as badly as you think if you don't have many columns.) +3. Is the client's browser using too much memory if all of the data is loaded at once? + +If you're not sure, you can always start with client-side filtering and pagination and then switch to server-side strategies in the future as your data grows. + +### Manual Server-Side Global Filtering + +If you have decided that you need to implement server-side global filtering instead of using the built-in client-side global filtering, here's how you do that. + +No `filteredRowModel` is needed for manual server-side global filtering. Instead, the `data` that you pass to the table should already be filtered. However, if you have added a `filteredRowModel` to `_rowModels`, you can tell the table to skip it by setting the `manualFiltering` option to `true`. + +```jsx +import { + useTable, + tableFeatures, + globalFilteringFeature, +} from '@tanstack/react-table' + +const _features = tableFeatures({ globalFilteringFeature }) + +const table = useTable({ + _features, + _rowModels: {}, // no filteredRowModel needed for manual server-side global filtering + data, + columns, + manualFiltering: true, +}) +``` + +Note: When using manual global filtering, many of the options that are discussed in the rest of this guide will have no effect. When manualFiltering is set to true, the table instance will not apply any global filtering logic to the rows that are passed to it. Instead, it will assume that the rows are already filtered and will use the data that you pass to it as-is. + +### Client-Side Global Filtering + +If you are using the built-in client-side global filtering, add the `globalFilteringFeature` to your features and the `filteredRowModel` to your row models: + +```jsx +import { + useTable, + tableFeatures, + globalFilteringFeature, + createFilteredRowModel, + filterFns, +} from '@tanstack/react-table' + +const _features = tableFeatures({ globalFilteringFeature }) + +const table = useTable({ + _features, + _rowModels: { + filteredRowModel: createFilteredRowModel(filterFns), + }, + // other options... +}) +``` + +### Global Filter Function + +The globalFilterFn option allows you to specify the filter function that will be used for global filtering. The filter function can be a string that references a built-in filter function, a string that references a custom filter function provided via the tableOptions.filterFns option, or a custom filter function. + +```jsx +const table = useTable({ + _features, + _rowModels: { + filteredRowModel: createFilteredRowModel(filterFns), + }, + data, + columns, + globalFilterFn: 'text', // built-in filter function +}) +``` + +By default there are 10 built-in filter functions to choose from: + +- includesString - Case-insensitive string inclusion +- includesStringSensitive - Case-sensitive string inclusion +- equalsString - Case-insensitive string equality +- equalsStringSensitive - Case-sensitive string equality +- arrIncludes - Item inclusion within an array +- arrIncludesAll - All items included in an array +- arrIncludesSome - Some items included in an array +- equals - Object/referential equality Object.is/=== +- weakEquals - Weak object/referential equality == +- inNumberRange - Number range inclusion + +You can also define your own custom filter functions either as the globalFilterFn table option. + +### Global Filter State + +The global filter state is stored in the table's internal state and can be accessed via the table.store.state.globalFilter property. If you want to persist the global filter state outside of the table, you can use the onGlobalFilterChange option to provide a callback function that will be called whenever the global filter state changes. + +```jsx +const [globalFilter, setGlobalFilter] = useState([]) + +const table = useTable({ + _features, + _rowModels: { filteredRowModel: createFilteredRowModel(filterFns) }, + // other options... + state: { + globalFilter, + }, + onGlobalFilterChange: setGlobalFilter, +}) +``` + +The global filtering state is defined as an object with the following shape: + +```jsx +interface GlobalFilter { + globalFilter: any +} +``` + +### Adding global filter input to UI + +TanStack table will not add a global filter input UI to your table. You should manually add it to your UI to allow users to filter the table. For example, you can add an input UI above the table to allow users to enter a search term. + +```jsx +return ( +
+ table.setGlobalFilter(String(e.target.value))} + placeholder="Search..." + /> +
+) +``` + +### Custom Global Filter Function + +If you want to use a custom global filter function, you can define the function and pass it to the globalFilterFn option. + +> **Note:** It is often a popular idea to use fuzzy filtering functions for global filtering. This is discussed in the [Fuzzy Filtering Guide](./fuzzy-filtering.md). + +```jsx +const customFilterFn = (rows, columnId, filterValue) => { + // custom filter logic +} + +const table = useTable({ + _features, + _rowModels: { filteredRowModel: createFilteredRowModel(filterFns) }, + // other options... + globalFilterFn: customFilterFn, +}) +``` + +### Initial Global Filter State + +If you want to set an initial global filter state when the table is initialized, you can pass the global filter state as part of the table initialState option. + +However, you can also just specify the initial global filter state in the state.globalFilter option. + +```jsx +const [globalFilter, setGlobalFilter] = useState("search term") //recommended to initialize globalFilter state here + +const table = useTable({ + _features, + _rowModels: { filteredRowModel: createFilteredRowModel(filterFns) }, + // other options... + initialState: { + globalFilter: 'search term', // if not managing globalFilter state, set initial state here + }, + state: { + globalFilter, // pass our managed globalFilter state to the table + }, +}) +``` + +> NOTE: Do not use both initialState.globalFilter and state.globalFilter at the same time, as the initialized state in the state.globalFilter will override the initialState.globalFilter. + +### Disable Global Filtering + +By default, global filtering is enabled for all columns. You can disable the global filtering for all columns by using the enableGlobalFilter table option. You can also turn off both column and global filtering by setting the enableFilters table option to false. + +Disabling global filtering will cause the column.getCanGlobalFilter API to return false for that column. + +```jsx +const columns = [ + { + header: () => 'Id', + accessorKey: 'id', + enableGlobalFilter: false, // disable global filtering for this column + }, + //... +] +//... +const table = useTable({ + _features, + _rowModels: { filteredRowModel: createFilteredRowModel(filterFns) }, + // other options... + columns, + enableGlobalFilter: false, // disable global filtering for all columns +}) +``` diff --git a/docs/guide/grouping.md b/docs/guide/grouping.md new file mode 100644 index 0000000000..23287ed112 --- /dev/null +++ b/docs/guide/grouping.md @@ -0,0 +1,171 @@ +--- +title: Grouping Guide +--- + +## Examples + +Want to skip to the implementation? Check out these examples: + +- [grouping](../framework/react/examples/grouping) + +## API + +[Grouping API](../api/features/grouping) + +## Grouping Guide + +There are 3 table features that can reorder columns, which happen in the following order: + +1. [Column Pinning](./column-pinning) - If pinning, columns are split into left, center (unpinned), and right pinned columns. +2. Manual [Column Ordering](./column-ordering) - A manually specified column order is applied. +3. **Grouping** - If grouping is enabled, a grouping state is active, and `tableOptions.groupedColumnMode` is set to `'reorder' | 'remove'`, then the grouped columns are reordered to the start of the column flow. + +Grouping in TanStack table is a feature that applies to columns and allows you to categorize and organize the table rows based on specific columns. This can be useful in cases where you have a large amount of data and you want to group them together based on certain criteria. + +To use the grouping feature, add the `columnGroupingFeature` to your features and the `groupedRowModel` to your row models. The grouped row model is responsible for grouping the rows based on the grouping state. + +```tsx +import { + useTable, + tableFeatures, + columnGroupingFeature, + createGroupedRowModel, + aggregationFns, +} from '@tanstack/react-table' + +const _features = tableFeatures({ columnGroupingFeature }) + +const table = useTable({ + _features, + _rowModels: { + groupedRowModel: createGroupedRowModel(aggregationFns), + }, + // other options... +}) +``` + +When grouping state is active, the table will add matching rows as subRows to the grouped row. The grouped row will be added to the table rows at the same index as the first matching row. The matching rows will be removed from the table rows. +To allow the user to expand and collapse the grouped rows, you can use the expanding feature. + +```tsx +const _features = tableFeatures({ columnGroupingFeature, rowExpandingFeature }) + +const table = useTable({ + _features, + _rowModels: { + groupedRowModel: createGroupedRowModel(aggregationFns), + expandedRowModel: createExpandedRowModel(), + }, + // other options... +}) +``` + +### Grouping state + +The grouping state is an array of strings, where each string is the ID of a column to group by. The order of the strings in the array determines the order of the grouping. For example, if the grouping state is ['column1', 'column2'], then the table will first group by column1, and then within each group, it will group by column2. You can control the grouping state using the setGrouping function: + +```tsx +table.setGrouping(['column1', 'column2']); +``` + +You can also reset the grouping state to its initial state using the resetGrouping function: + +```tsx +table.resetGrouping(); +``` + +By default, when a column is grouped, it is moved to the start of the table. You can control this behavior using the groupedColumnMode option. If you set it to 'reorder', then the grouped columns will be moved to the start of the table. If you set it to 'remove', then the grouped columns will be removed from the table. If you set it to false, then the grouped columns will not be moved or removed. + +```tsx +const table = useTable({ + _features, + _rowModels: { groupedRowModel: createGroupedRowModel(aggregationFns) }, + // other options... + groupedColumnMode: 'reorder', +}) +``` + +### Aggregations + +When rows are grouped, you can aggregate the data in the grouped rows by columns using the aggregationFn option. This is a string that is the ID of the aggregation function. You can define the aggregation functions using the aggregationFns option. + +```tsx +const column = columnHelper.accessor('key', { + aggregationFn: 'sum', +}) +``` + +In the above example, the sum aggregation function will be used to aggregate the data in the grouped rows. +By default, numeric columns will use the sum aggregation function, and non-numeric columns will use the count aggregation function. You can override this behavior by specifying the aggregationFn option in the column definition. + +There are several built-in aggregation functions that you can use: + +- sum - Sums the values in the grouped rows. +- count - Counts the number of rows in the grouped rows. +- min - Finds the minimum value in the grouped rows. +- max - Finds the maximum value in the grouped rows. +- extent - Finds the extent (min and max) of the values in the grouped rows. +- mean - Finds the mean of the values in the grouped rows. +- median - Finds the median of the values in the grouped rows. +- unique - Returns an array of unique values in the grouped rows. +- uniqueCount - Counts the number of unique values in the grouped rows. + +#### Custom Aggregations + +When rows are grouped, you can aggregate the data in the grouped rows using the aggregationFns option. This is a record where the keys are the IDs of the aggregation functions, and the values are the aggregation functions themselves. You can then reference these aggregation functions in a column's aggregationFn option. + +```tsx +const table = useTable({ + _features, + _rowModels: { + groupedRowModel: createGroupedRowModel({ + ...aggregationFns, + myCustomAggregation: (columnId, leafRows, childRows) => { + // return the aggregated value + }, + }), + }, + // other options... +}) +``` + +In the above example, myCustomAggregation is a custom aggregation function that takes the column ID, the leaf rows, and the child rows, and returns the aggregated value. You can then use this aggregation function in a column's aggregationFn option: + +```tsx +const column = columnHelper.accessor('key', { + aggregationFn: 'myCustomAggregation', +}) +``` + +### Manual Grouping + +If you are doing server-side grouping and aggregation, you can enable manual grouping using the manualGrouping option. When this option is set to true, the table will not automatically group rows using getGroupedRowModel() and instead will expect you to manually group the rows before passing them to the table. + +```tsx +const table = useTable({ + _features: tableFeatures({ columnGroupingFeature }), + _rowModels: {}, // no groupedRowModel needed for manual grouping + // other options... + manualGrouping: true, +}) +``` + +> **Note:** There are not currently many known easy ways to do server-side grouping with TanStack Table. You will need to do lots of custom cell rendering to make this work. + +### Grouping Change Handler + +If you want to manage the grouping state yourself, you can use the onGroupingChange option. This option is a function that is called when the grouping state changes. You can pass the managed state back to the table via the tableOptions.state.grouping option. + +```tsx +const [grouping, setGrouping] = useState([]) + +const table = useTable({ + _features, + _rowModels: { groupedRowModel: createGroupedRowModel(aggregationFns) }, + // other options... + state: { + grouping, + }, + onGroupingChange: setGrouping, +}) +``` diff --git a/docs/guide/header-groups.md b/docs/guide/header-groups.md new file mode 100644 index 0000000000..f98a0ff0d0 --- /dev/null +++ b/docs/guide/header-groups.md @@ -0,0 +1,49 @@ +--- +title: Header Groups Guide +--- + +## API + +[Header Group API](../api/core/header-group) + +## Header Groups Guide + +This quick guide will discuss the different ways you can retrieve and interact with header group objects in TanStack Table. + +### What are Header Groups? + +Header Groups are simply "rows" of headers. Don't let the name confuse you, it's just that simple. The large majority of tables will only have one row of headers (a single header group), but if you define your column structure with nested columns as with the [Column Groups example](../framework/react/examples/column-groups), you can have multiple rows of headers (multiple header groups). + +### Where to Get Header Groups From + +There are multiple `table` instance APIs you can use to retrieve header groups from the table instance. `table.getHeaderGroups` is the most common API to use, but depending on the features that you are using, you may need to use other APIs, such as `table.get[Left/Center/Right]HeaderGroups` if you are using column pinning features. + +### Header Group Objects + +Header Group objects are similar to [Row](./rows) objects, though simpler since there is not as much going on in header rows as there are in the body rows. + +By default, header groups only have three properties: + +- `id`: The unique identifier for the header group that is generated from its depth (index). This is useful as a key for React components. +- `depth`: The depth of the header group, zero-indexed based. Think of this as the row index amongst all header rows. +- `headers`: An array of [Header](./headers) cell objects that belong to this header group (row). + +### Access Header Cells + +To render the header cells in a header group, you just map over the `headers` array from the header group object. + +```jsx + + {table.getHeaderGroups().map(headerGroup => { + return ( + + {headerGroup.headers.map(header => ( // map over the headerGroup headers array + + {/* */} + + ))} + + ) + })} + +``` \ No newline at end of file diff --git a/docs/guide/headers.md b/docs/guide/headers.md new file mode 100644 index 0000000000..9760568865 --- /dev/null +++ b/docs/guide/headers.md @@ -0,0 +1,84 @@ +--- +title: Headers Guide +--- + +## API + +[Header API](../api/core/header) + +## Headers Guide + +This quick guide will discuss the different ways you can retrieve and interact with `header` objects in TanStack Table. + +Headers are the equivalent of cells, but meant for the `` section of the table instead of the `` section. + +### Where to Get Headers From + +Headers come from [Header Groups](./header-groups), which are the equivalent of rows, but meant for the `` section of the table instead of the `` section. + +#### HeaderGroup Headers + +If you are in a header group, the headers are stored as an array in the `headerGroup.headers` property. Usually you will just map over this array to render your headers. + +```jsx + + {table.getHeaderGroups().map(headerGroup => { + return ( + + {headerGroup.headers.map(header => ( // map over the headerGroup headers array + + {/* */} + + ))} + + ) + })} + +``` + +#### Header Table Instance APIs + +There are multiple `table` instance APIs that you can use to retrieve a list of headers depending on the features that you are using. The most common API you might use is `table.getFlatHeaders`, which will return a flat list of all headers in the table, but there are at least a dozen other headers that are useful in tandem with the column visibility and column pinning features. APIs like `table.getLeftLeafHeaders` or `table.getRightFlatHeaders` could be useful depending on your use case. + +### Header Objects + +Header objects are similar to [Cell](./cells) objects, but meant for the `` section of the table instead of the `` section. Every header object can be associated with a `` or similar cell element in your UI. There are a few properties and methods on `header` objects that you can use to interact with the table state and extract cell values from the table based on the state of the table. + +#### Header IDs + +Every header object has an `id` property that makes it unique within the table instance. Usually you only need this `id` as a unique identifier for React keys or if you are following the [performant column resizing example](../framework/react/examples/column-resizing-performant). + +For simple headers with no advanced nested or grouped headers logic, the `header.id` will be the same as it's parent `column.id`. However, if the header is part group column or a placeholder cell, it will have a more complicated id that is constructed from the header family, depth/header row index, column id, and header group id. + +#### Nested Grouped Headers Properties + +There are a few properties on `header` objects that are only useful if the header is part of a nested or grouped header structure. These properties include: + +- `colspan`: The number of columns that the header should span. This is useful for rendering the `colSpan` attribute on the `` element. +- `rowSpan`: The number of rows that the header should span. This is useful for rendering the `rowSpan` attribute on the `` element. (Currently not implemented in default TanStack Table) +- `depth`: The header group "row index" that the header group belongs to. +- `isPlaceholder`: A boolean flag that is true if the header is a placeholder header. Placeholder headers are used to fill in the gaps when a column is hidden or when a column is part of a group column. +- `placeholderId`: The unique identifier for the placeholder header. +- `subHeaders`: The array of sub/child headers that belong to this header. Will be empty if the header is a leaf header. + +> Note: `header.index` refers to its index within the header group (row of headers), i.e. its position from left to right. It is not the same as `header.depth`, which refers to the header group "row index". + +#### Header Parent Objects + +Every header stores a reference to its parent [column](./columns) object and its parent [header group](./header-groups) object. + +### More Header APIs + +Headers have a few more useful APIs attached to them that are useful for interacting with the table state. Most of them relate to the Column sizing and resizing features. See the [Column Resizing Guide](./column-resizing) for more information. + +### Header Rendering + +Since the `header` column option you defined can be either a string, jsx, or a function returning either of those, the best way to render the headers is to use the `flexRender` utility from your adapter, which will handle all of those cases for you. + +```jsx +{headerGroup.headers.map(header => ( + + {/* Handles all possible header column def scenarios for `header` */} + {flexRender(header.column.columnDef.header, header.getContext())} + +))} \ No newline at end of file diff --git a/docs/guide/pagination.md b/docs/guide/pagination.md new file mode 100644 index 0000000000..9c90e302ad --- /dev/null +++ b/docs/guide/pagination.md @@ -0,0 +1,251 @@ +--- +title: Pagination Guide +--- + +## Examples + +Want to skip to the implementation? Check out these examples: + +- [pagination](../framework/react/examples/pagination) +- [pagination-controlled (React Query)](../framework/react/examples/pagination-controlled) +- [editable-data](../framework/react/examples/editable-data) +- [expanding](../framework/react/examples/expanding) +- [filters](../framework/react/examples/filters) +- [fully-controlled](../framework/react/examples/fully-controlled) +- [row-selection](../framework/react/examples/row-selection) + +## API + +[Pagination API](../api/features/pagination) + +## Pagination Guide + +TanStack Table has great support for both client-side and server-side pagination. This guide will walk you through the different ways to implement pagination in your table. + +### Client-Side Pagination + +Using client-side pagination means that the `data` that you fetch will contain ***ALL*** of the rows for the table, and the table instance will handle pagination logic in the front-end. + +#### Should You Use Client-Side Pagination? + +Client-side pagination is usually the simplest way to implement pagination when using TanStack Table, but it might not be practical for very large datasets. + +However, a lot of people underestimate just how much data can be handled client-side. If your table will only ever have a few thousand rows or less, client-side pagination can still be a viable option. TanStack Table is designed to scale up to 10s of thousands of rows with decent performance for pagination, filtering, sorting, and grouping. The [official pagination example](../framework/react/examples/pagination) loads 100,000 rows and still performs well, albeit with only handful of columns. + +Every use-case is different and will depend on the complexity of the table, how many columns you have, how large every piece of data is, etc. The main bottlenecks to pay attention to are: + +1. Can your server query all of the data in a reasonable amount of time (and cost)? +2. What is the total size of the fetch? (This might not scale as badly as you think if you don't have many columns.) +3. Is the client's browser using too much memory if all of the data is loaded at once? + +If you're not sure, you can always start with client-side pagination and then switch to server-side pagination in the future as your data grows. + +#### Should You Use Virtualization Instead? + +Alternatively, instead of paginating the data, you can render all rows of a large dataset on the same page, but only use the browser's resources to render the rows that are visible in the viewport. This strategy is often called "virtualization" or "windowing". TanStack offers a virtualization library called [TanStack Virtual](https://tanstack.com/virtual/latest) that can work well with TanStack Table. The UI/UX of both virtualization and pagination have their own trade-offs, so see which one works best for your use-case. + +#### Pagination Row Model + +If you want to take advantage of the built-in client-side pagination in TanStack Table, add the `rowPaginationFeature` to your features and the `paginatedRowModel` to your row models: + +```jsx +import { + useTable, + tableFeatures, + rowPaginationFeature, + createPaginatedRowModel, +} from '@tanstack/react-table' + +const _features = tableFeatures({ rowPaginationFeature }) + +const table = useTable({ + _features, + _rowModels: { + paginatedRowModel: createPaginatedRowModel(), + }, + columns, + data, +}) +``` + +> **Migrating from v8?** See [useLegacyTable](../framework/react/guide/use-legacy-table) for incremental migration. + +### Manual Server-Side Pagination + +If you decide that you need to use server-side pagination, here is how you can implement it. + +No pagination row model is needed for server-side pagination, but if you have provided it for other tables that do need it in a shared component, you can still turn off the client-side pagination by setting the `manualPagination` option to `true`. Setting the `manualPagination` option to `true` will tell the table instance to use the `table.getPrePaginatedRowModel` row model under the hood, and it will make the table instance assume that the `data` that you pass in is already paginated. + +#### Page Count and Row Count + +The table instance will have no way of knowing how many rows/pages there are in total in your back-end unless you tell it. Provide either the `rowCount` or `pageCount` table option to let the table instance know how many pages there are in total. If you provide a `rowCount`, the table instance will calculate the `pageCount` internally from `rowCount` and `pageSize`. Otherwise, you can directly provide the `pageCount` if you already have it. If you don't know the page count, you can just pass in `-1` for the `pageCount`, but the `getCanNextPage` and `getCanPreviousPage` row model functions will always return `true` in this case. + +```jsx +import { + useTable, + tableFeatures, + rowPaginationFeature, +} from '@tanstack/react-table' + +const _features = tableFeatures({ rowPaginationFeature }) + +const table = useTable({ + _features, + _rowModels: {}, // no paginatedRowModel needed for server-side pagination + columns, + data, + manualPagination: true, // turn off client-side pagination + rowCount: dataQuery.data?.rowCount, // pass in the total row count so the table knows how many pages there are (pageCount calculated internally if not provided) + // pageCount: dataQuery.data?.pageCount, // alternatively directly pass in pageCount instead of rowCount +}) +``` + +> **Note**: Setting the `manualPagination` option to `true` will make the table instance assume that the `data` that you pass in is already paginated. + +### Pagination State + +Whether or not you are using client-side or manual server-side pagination, you can use the built-in `pagination` state and APIs. + +The `pagination` state is an object that contains the following properties: + +- `pageIndex`: The current page index (zero-based). +- `pageSize`: The current page size. + +You can manage the `pagination` state just like any other state in the table instance. + +```jsx +import { + useTable, + tableFeatures, + rowPaginationFeature, + createPaginatedRowModel, +} from '@tanstack/react-table' + +const _features = tableFeatures({ rowPaginationFeature }) + +const [pagination, setPagination] = useState({ + pageIndex: 0, // initial page index + pageSize: 10, // default page size +}) + +const table = useTable({ + _features, + _rowModels: { + paginatedRowModel: createPaginatedRowModel(), + }, + columns, + data, + onPaginationChange: setPagination, + state: { + pagination, + }, +}) +``` + +Alternatively, if you have no need for managing the `pagination` state in your own scope, but you need to set different initial values for the `pageIndex` and `pageSize`, you can use the `initialState` option. + +```jsx +const table = useTable({ + _features, + _rowModels: { + paginatedRowModel: createPaginatedRowModel(), + }, + columns, + data, + initialState: { + pagination: { + pageIndex: 2, // custom initial page index + pageSize: 25, // custom default page size + }, + }, +}) +``` + +> **Note**: Do NOT pass the `pagination` state to both the `state` and `initialState` options. `state` will overwrite `initialState`. Only use one or the other. + +### Pagination Options + +Besides the `manualPagination`, `pageCount`, and `rowCount` options which are useful for manual server-side pagination (and discussed [above](#manual-server-side-pagination)), there is one other table option that is useful to understand. + +#### Auto Reset Page Index + +By default, `pageIndex` is reset to `0` when page-altering state changes occur, such as when the `data` is updated, filters change, grouping changes, etc. This behavior is automatically disabled when `manualPagination` is true but it can be overridden by explicitly assigning a boolean value to the `autoResetPageIndex` table option. + +```jsx +const table = useTable({ + _features, + _rowModels: { + paginatedRowModel: createPaginatedRowModel(), + }, + columns, + data, + autoResetPageIndex: false, // turn off auto reset of pageIndex +}) +``` + +Be aware, however, that if you turn off `autoResetPageIndex`, you may need to add some logic to handle resetting the `pageIndex` yourself to avoid showing empty pages. + +### Pagination APIs + +There are several pagination table instance APIs that are useful for hooking up your pagination UI components. + +#### Pagination Button APIs + +- `getCanPreviousPage`: Useful for disabling the "previous page" button when on the first page. +- `getCanNextPage`: Useful for disabling the "next page" button when there are no more pages. +- `previousPage`: Useful for going to the previous page. (Button click handler) +- `nextPage`: Useful for going to the next page. (Button click handler) +- `firstPage`: Useful for going to the first page. (Button click handler) +- `lastPage`: Useful for going to the last page. (Button click handler) +- `setPageIndex`: Useful for a "go to page" input. +- `resetPageIndex`: Useful for resetting the table state to the original page index. +- `setPageSize`: Useful for a "page size" input/select. +- `resetPageSize`: Useful for resetting the table state to the original page size. +- `setPagination`: Useful for setting all of the pagination state at once. +- `resetPagination`: Useful for resetting the table state to the original pagination state. + +> **Note**: These pagination APIs are available when using `rowPaginationFeature`. + +```jsx + + + + + +``` + +#### Pagination Info APIs + +- `getPageCount`: Useful for showing the total number of pages. +- `getRowCount`: Useful for showing the total number of rows. diff --git a/docs/guide/pinning.md b/docs/guide/pinning.md new file mode 100644 index 0000000000..aa8c116291 --- /dev/null +++ b/docs/guide/pinning.md @@ -0,0 +1,10 @@ +--- +title: Pinning Guide +--- + + + +Pinning is split into 2 different feature guides: + +- [Column Pinning](./column-pinning) +- [Row Pinning](./row-pinning) \ No newline at end of file diff --git a/docs/guide/row-models.md b/docs/guide/row-models.md new file mode 100644 index 0000000000..798332d2aa --- /dev/null +++ b/docs/guide/row-models.md @@ -0,0 +1,142 @@ +--- +title: Row Models Guide +--- + +## Row Models Guide + +If you take a look at the most basic example of TanStack Table, you'll see a code snippet like this: + +```ts +import { tableFeatures, useTable } from '@tanstack/react-table' + +const _features = tableFeatures({}) // Core features only + +function Component() { + const table = useTable({ + _features, + _rowModels: {}, // Core row model is automatic; add others as needed + columns, + data, + }) +} +``` + +In v9, row models are configured via the `_rowModels` option. The core row model is always included automatically. You only add the row models you need for filtering, sorting, pagination, etc. This keeps your bundle small—you only import and use the code for the features you enable. + +### What are Row Models? + +Row models run under the hood of TanStack Table to transform your original data in useful ways that are needed for data grid features like filtering, sorting, grouping, expanding, and pagination. The rows that get generated and render on screen won't necessarily be a 1:1 mapping of the original data that you passed to the table. They may be sorted, filtered, paginated, etc. + +### Configuring Row Models + +You should only add the row models that you need. Here are all of the row models that are available via `_rowModels`: + +| `_rowModels` Key | Factory Function | Purpose | +|------------------|------------------|---------| +| (automatic) | — | Core row model (always included) | +| `filteredRowModel` | `createFilteredRowModel(filterFns)` | Filtering (column + global) | +| `sortedRowModel` | `createSortedRowModel(sortFns)` | Sorting | +| `paginatedRowModel` | `createPaginatedRowModel()` | Pagination | +| `expandedRowModel` | `createExpandedRowModel()` | Row expanding | +| `groupedRowModel` | `createGroupedRowModel(aggregationFns)` | Grouping and aggregation | +| `facetedRowModel` | `createFacetedRowModel()` | Faceted filtering | +| `facetedMinMaxValues` | `createFacetedMinMaxValues()` | Min/max for faceted filters | +| `facetedUniqueValues` | `createFacetedUniqueValues()` | Unique values for faceted filters | + +You must also add the corresponding features to `_features` for each row model you use. For example: + +```ts +import { + tableFeatures, + useTable, + columnFilteringFeature, + rowSortingFeature, + rowPaginationFeature, + createFilteredRowModel, + createSortedRowModel, + createPaginatedRowModel, + filterFns, + sortFns, +} from '@tanstack/react-table' + +const _features = tableFeatures({ + columnFilteringFeature, + rowSortingFeature, + rowPaginationFeature, +}) + +const table = useTable({ + _features, + _rowModels: { + filteredRowModel: createFilteredRowModel(filterFns), + sortedRowModel: createSortedRowModel(sortFns), + paginatedRowModel: createPaginatedRowModel(), + }, + columns, + data, +}) +``` + +Note that `createFilteredRowModel`, `createSortedRowModel`, and `createGroupedRowModel` accept their processing functions (`filterFns`, `sortFns`, `aggregationFns`) as parameters. This enables tree-shaking—if you use a custom filter, you don't pay for built-in filters you never use. + +### Customize/Fork Row Models + +You don't have to use the exact row models that are provided by TanStack Table. If you need some advanced customization for certain row models, feel free to copy the [source code](https://github.com/TanStack/table/tree/main/packages/table-core/src/utils) for the row model you want to customize and modify it to your needs. + +### Using Row Models + +Once your table instance has been created, you can access all of the row models that you may need directly from the table instance. There are even more derived row models available apart from the ones that you may have imported. + +For normal rendering use cases, you will probably only need to use the `table.getRowModel()` method, as this row model will use all/any of the other row models depending on which features you have enabled or disabled. All of the other row models are available for you to "dig into" some of the underlying data transformations that are happening in the table. + +### Available Row Models on Table Instance + +- **`getRowModel`** - This is the main row model that you should use for rendering your table rows markup. It will use all of the other row models to generate the final row model that you will use to render your table rows. + +- `getCoreRowModel` - returns a basic row model that is just a 1:1 mapping of the original data passed to the table. + +- `getFilteredRowModel` - returns a row model that accounts for column filtering and global filtering. +- `getPreFilteredRowModel` - returns a row model before column filtering and global filtering are applied. + +- `getGroupedRowModel` - returns a row model that applies grouping and aggregation to the data and creates sub-rows. +- `getPreGroupedRowModel` - returns a row model before grouping and aggregation are applied. + +- `getSortedRowModel` - returns a row model that has had sorting applied to it. +- `getPreSortedRowModel` - returns a row model before sorting is applied (rows are in original order). + +- `getExpandedRowModel` - returns a row model that accounts for expanded/hidden sub-rows. +- `getPreExpandedRowModel` - returns a row model that only includes root level rows with no expanded sub-rows included. Still includes sorting. + +- `getPaginatedRowModel` - returns a row model that only includes the rows that should be displayed on the current page based on the pagination state. +- `getPrePaginatedRowModel` - returns a row model without pagination applied (includes all rows). + +- `getSelectedRowModel` - returns a row model of all selected rows (but only based on the data that was passed to the table). Runs after getCoreRowModel. +- `getPreSelectedRowModel` - returns a row model before row selection is applied (Just returns getCoreRowModel). +- `getGroupedSelectedRowModel` - returns a row model of selected rows after grouping. Runs after getSortedRowModel, which runs after getGroupedRowModel, which runs after getFilteredRowModel. +- `getFilteredSelectedRowModel` - returns a row model of selected rows after column filtering and global filtering. Runs after getFilteredRowModel. + +### The Order of Row Model Execution + +Knowing how TanStack Table processes rows internally can help you gain a better understanding of what is happening under the hood, and help you debug any issues you may encounter. + +Internally, this is the order in which each of the row models are applied to the data, if their respective features are enabled: + +`getCoreRowModel` -> `getFilteredRowModel` -> `getGroupedRowModel` -> `getSortedRowModel` -> `getExpandedRowModel` -> `getPaginatedRowModel` -> `getRowModel` + +If in any case the respective feature is disabled or turned off with a `"manual*"` table option, the `getPre*RowModel` will be used instead in that step of the process. + +As you can see above, first the data is filtered, then grouped, then sorted, then expanded, and then finally paginated as the final step. + +### Row Model Data Structure + +Each row model will provide you the rows in 3 different useful formats: + +1. `rows` - An array of rows. +2. `flatRows` - An array of rows, but all sub-rows are flattened into the top level. +3. `rowsById` - An object of rows, where each row is keyed by its `id`. This is useful for quickly looking up rows by their `id` with better performance. + +```ts +console.log(table.getRowModel().rows) // array of rows +console.log(table.getRowModel().flatRows) // array of rows, but all sub-rows are flattened into the top level +console.log(table.getRowModel().rowsById['row-id']) // object of rows, where each row is keyed by its `id` +``` \ No newline at end of file diff --git a/docs/guide/row-pinning.md b/docs/guide/row-pinning.md new file mode 100644 index 0000000000..bc497a3abb --- /dev/null +++ b/docs/guide/row-pinning.md @@ -0,0 +1,20 @@ +--- +title: Row Pinning Guide +--- + +## Examples + +Want to skip to the implementation? Check out these examples: + +- [row-pinning](../framework/react/examples/row-pinning) + +## API + +[Row Pinning API](../api/features/row-pinning) + +## Row Pinning Guide + +There are 2 table features that can reorder rows, which happen in the following order: + +1. **Row Pinning** - If pinning, rows are split into top, center (unpinned), and bottom pinned rows. +2. [Sorting](./sorting) \ No newline at end of file diff --git a/docs/guide/row-selection.md b/docs/guide/row-selection.md new file mode 100644 index 0000000000..bde86c7972 --- /dev/null +++ b/docs/guide/row-selection.md @@ -0,0 +1,192 @@ +--- +title: Row Selection Guide +--- + +## Examples + +Want to skip to the implementation? Check out these examples: + +- [React row-selection](../framework/react/examples/row-selection) +- [Vue row-selection](../framework/vue/row-selection) +- [React expanding](../framework/react/examples/expanding) + +## API + +[Row Selection API](../api/features/row-selection) + +## Row Selection Guide + +The row selection feature keeps track of which rows are selected and allows you to toggle the selection of rows in a myriad of ways. Let's take a look at some common use cases. + +### Access Row Selection State + +The table instance already manages the row selection state for you (though as seen down below, it may be more convenient to manage the row selection state in your own scope). You can access the internal row selection state or the selected rows from a few APIs. + +- `table.store.state.rowSelection` - returns the internal row selection state +- `getSelectedRowModel()` - returns selected rows +- `getFilteredSelectedRowModel()` - returns selected rows after filtering +- `getGroupedSelectedRowModel()` - returns selected rows after grouping and sorting + +```ts +console.log(table.store.state.rowSelection) //get the row selection state - { 1: true, 2: false, etc... } +console.log(table.getSelectedRowModel().rows) //get full client-side selected rows +console.log(table.getFilteredSelectedRowModel().rows) //get filtered client-side selected rows +console.log(table.getGroupedSelectedRowModel().rows) //get grouped client-side selected rows +``` + +> Note: If you are using `manualPagination`, be aware that the `getSelectedRowModel` API will only return selected rows on the current page because table row models can only generate rows based on the `data` that is passed in. Row selection state, however, can contain row ids that are not present in the `data` array just fine. + +### Manage Row Selection State + +Even though the table instance will already manage the row selection state for you, it is usually more convenient to manage the state yourself in order to have easy access to the selected row ids that you can use to make API calls or other actions. + +Use the `onRowSelectionChange` table option to hoist up the row selection state to your own scope. Then pass the row selection state back to the table instance using in the `state` table option. + +```ts +import { useTable, tableFeatures, rowSelectionFeature } from '@tanstack/react-table' + +const _features = tableFeatures({ rowSelectionFeature }) + +const [rowSelection, setRowSelection] = useState({}) + +const table = useTable({ + _features, + _rowModels: {}, + //... + onRowSelectionChange: setRowSelection, + state: { + rowSelection, + }, +}) +``` + +### Useful Row Ids + +By default, the row id for each row is simply the `row.index`. If you are using row selection features, you most likely want to use a more useful row identifier, since the row selection state is keyed by row id. You can use the `getRowId` table option to specify a function that returns a unique row id for each row. + +```ts +const table = useTable({ + _features, + _rowModels: {}, + //... + getRowId: (row) => row.uuid, // use the row's uuid from your database as the row id +}) +``` + +Now as rows are selected, the row selection state will look something like this: + +```json +{ + "13e79140-62a8-4f9c-b087-5da737903b76": true, + "f3e2a5c0-5b7a-4d8a-9a5c-9c9b8a8e5f7e": false + //... +} +``` + +instead of this: + +```json +{ + "0": true, + "1": false + //... +} +``` + +### Enable Row Selection Conditionally + +Row selection is enabled by default for all rows. To either enable row selection conditionally for certain rows or disable row selection for all rows, you can use the `enableRowSelection` table option which accepts either a boolean or a function for more granular control. + +```ts +const table = useTable({ + //... + enableRowSelection: row => row.original.age > 18, //only enable row selection for adults +}) +``` + +To enforce whether a row is selectable or not in your UI, you can use the `row.getCanSelect()` API for your checkboxes or other selection UI. + +### Single Row Selection + +By default, the table allows multiple rows to be selected at once. If, however, you only want to allow a single row to be selected at once, you can set the `enableMultiRowSelection` table option to `false` to disable multi-row selection, or pass in a function to disable multi-row selection conditionally for a row's sub-rows. + +This is useful for making tables that have radio buttons instead of checkboxes. + +```ts +const table = useTable({ + //... + enableMultiRowSelection: false, //only allow a single row to be selected at once + // enableMultiRowSelection: row => row.original.age > 18, //only allow a single row to be selected at once for adults +}) +``` + +### Sub-Row Selection + +By default, selecting a parent row will select all of its sub-rows. If you want to disable auto sub-row selection, you can set the `enableSubRowSelection` table option to `false` to disable sub-row selection, or pass in a function to disable sub-row selection conditionally for a row's sub-rows. + +```ts +const table = useTable({ + //... + enableSubRowSelection: false, //disable sub-row selection + // enableSubRowSelection: row => row.original.age > 18, //disable sub-row selection for adults +}) +``` + +### Render Row Selection UI + +TanStack table does not dictate how you should render your row selection UI. You can use checkboxes, radio buttons, or simply hook up click events to the row itself. The table instance provides a few APIs to help you render your row selection UI. + +#### Connect Row Selection APIs to Checkbox Inputs + +TanStack Table provides some handler functions that you can connect directly to your checkbox inputs to make it easy to toggle row selection. These function automatically call other internal APIs to update the row selection state and re-render the table. + +Use the `row.getToggleSelectedHandler()` API to connect to your checkbox inputs to toggle the selection of a row. + +Use the `table.getToggleAllRowsSelectedHandler()` or `table.getToggleAllPageRowsSelectedHandler` APIs to connect to your "select all" checkbox input to toggle the selection of all rows. + +If you need more granular control over these function handlers, you can always just use the `row.toggleSelected()` or `table.toggleAllRowsSelected()` APIs directly. Or you can even just call the `table.setRowSelection()` API to directly set the row selection state just as you would with any other state updater. These handler functions are just a convenience. + +```tsx +const columns = [ + { + id: 'select-col', + header: ({ table }) => ( + + ), + cell: ({ row }) => ( + + ), + }, + //... more column definitions... +] +``` + +#### Connect Row Selection APIs to UI + +If you want a simpler row selection UI, you can just hook up click events to the row itself. The `row.getToggleSelectedHandler()` API is also useful for this use case. + +```tsx + + {table.getRowModel().rows.map(row => { + return ( + + {row.getVisibleCells().map(cell => { + return {/* */} + })} + + ) + })} + +``` diff --git a/docs/guide/rows.md b/docs/guide/rows.md new file mode 100644 index 0000000000..86bf702610 --- /dev/null +++ b/docs/guide/rows.md @@ -0,0 +1,99 @@ +--- +title: Rows Guide +--- + +## API + +[Row API](../api/core/row) + +## Rows Guide + +This quick guide will discuss the different ways you can retrieve and interact with row objects in TanStack Table. + +### Where to Get Rows From + +There are multiple `table` instance APIs you can use to retrieve rows from the table instance. + +#### table.getRow + +If you need to access a specific row by its `id`, you can use the `table.getRow` table instance API. + +```js +const row = table.getRow(rowId) +``` + +#### Row Models + +The `table` instance generates `row` objects and stores them in useful arrays called ["Row Models"](./row-models). This is discussed in much more detail in the [Row Models Guide](./row-models), but here are the most common ways you may access the row models. + +##### Render Rows + +```jsx + + {table.getRowModel().rows.map(row => ( + + {/* ... */} + + ))} + +``` + +##### Get Selected Rows + +```js +const selectedRows = table.getSelectedRowModel().rows +``` + +### Row Objects + +Every row object contains row data and many APIs to either interact with the table state or extract cells from the row based on the state of the table. + +#### Row IDs + +Every row object has an `id` property that makes it unique within the table instance. By default the `row.id` is the same as the `row.index` that is created in the row model. However, it can be useful to override each row's `id` with a unique identifier from the row's data. You can use the `getRowId` table option to do this. + +```js +const table = useTable({ + _features, + _rowModels: {}, + columns, + data, + getRowId: (originalRow) => originalRow.uuid, // override the row.id with the uuid from the original row's data +}) +``` + +> Note: In some features like grouping and expanding, the `row.id` will have additional string appended to it. + +#### Access Row Values + +The recommended way to access data values from a row is to use either the `row.getValue` or `row.renderValue` APIs. Using either of these APIs will cache the results of the accessor functions and keep rendering efficient. The only difference between the two is that `row.renderValue` will return either the value or the `renderFallbackValue` if the value is undefined, whereas `row.getValue` will return the value or `undefined` if the value is undefined. + +```js +// Access data from any of the columns +const firstName = row.getValue('firstName') // read the row value from the firstName column +const renderedLastName = row.renderValue('lastName') // render the value from the lastName column +``` + +> Note: `cell.getValue` and `cell.renderValue` are shortcuts for the `row.getValue` and `row.renderValue` APIs, respectively. + +#### Access Original Row Data + +For every row object, you can access the original corresponding `data` that was passed to the table instance via the `row.original` property. None of the data in the `row.original` will have been modified by the accessors in your column definitions, so if you were doing any sort of data transformations in your accessors, those will not be reflected in the `row.original` object. + +```js +// Access any data from the original row +const firstName = row.original.firstName // { firstName: 'John', lastName: 'Doe' } +``` + +### Sub Rows + +If you are using either grouping or expanding features, your rows may contain sub-rows or parent row references. This is discussed in much more detail in the [Expanding Guide](./expanding), but here is a quick overview of useful properties and methods for working with sub-rows. + +- `row.subRows`: An array of sub-rows for the row. +- `row.depth`: The depth of the row (if nested or grouped) relative to the root row array. 0 for root level rows, 1 for child rows, 2 for grandchild rows, etc. +- `row.parentId`: The unique ID of the parent row for the row (The row that contains this row in its subRows array). +- `row.getParentRow`: Returns the parent row for the row, if it exists. + +### More Row APIs + +Depending on the features that you are using for your table, there are dozens more useful APIs for interacting with rows. See each features' respective API docs or guide for more information. \ No newline at end of file diff --git a/docs/guide/sorting.md b/docs/guide/sorting.md new file mode 100644 index 0000000000..9a8c8421e7 --- /dev/null +++ b/docs/guide/sorting.md @@ -0,0 +1,450 @@ +--- +title: Sorting Guide +--- + +## Examples + +Want to skip to the implementation? Check out these examples: + +- [sorting](../framework/react/examples/sorting) +- [filters](../framework/react/examples/filters) + +## API + +[Sorting API](../api/features/sorting) + +## Sorting Guide + +TanStack Table provides solutions for just about any sorting use-case you might have. This guide will walk you through the various options that you can use to customize the built-in client-side sorting functionality, as well as how to opt out of client-side sorting in favor of manual server-side sorting. + +### Sorting State + +The sorting state is defined as an array of objects with the following shape: + +```tsx +type ColumnSort = { + id: string + desc: boolean +} +type SortingState = ColumnSort[] +``` + +Since the sorting state is an array, it is possible to sort by multiple columns at once. Read more about the multi-sorting customizations down [below](#multi-sorting). + +#### Accessing Sorting State + +You can access the sorting state directly from the table instance just like any other state using the `table.store.state` API. + +```tsx +const table = useTable({ + _features, + _rowModels: { sortedRowModel: createSortedRowModel(sortFns) }, + columns, + data, + //... +}) + +console.log(table.store.state.sorting) // access the sorting state from the table instance +``` + +However, if you need to access the sorting state before the table is initialized, you can "control" the sorting state like down below. + +#### Controlled Sorting State + +If you need easy access to the sorting state, you can control/manage the sorting state in your own state management with the `state.sorting` and `onSortingChange` table options. + +```tsx +const [sorting, setSorting] = useState([]) // can set initial sorting state here +//... +// use sorting state to fetch data from your server or something... +//... +const table = useTable({ + _features, + _rowModels: { sortedRowModel: createSortedRowModel(sortFns) }, + columns, + data, + //... + state: { + sorting, + }, + onSortingChange: setSorting, +}) +``` + +#### Initial Sorting State + +If you do not need to control the sorting state in your own state management or scope, but you still want to set an initial sorting state, you can use the `initialState` table option instead of `state`. + +```jsx +const table = useTable({ + _features, + _rowModels: { sortedRowModel: createSortedRowModel(sortFns) }, + columns, + data, + //... + initialState: { + sorting: [ + { + id: 'name', + desc: true, // sort by name in descending order by default + }, + ], + }, +}) +``` + +> **NOTE**: Do not use both `initialState.sorting` and `state.sorting` at the same time, as the initialized state in the `state.sorting` will override the `initialState.sorting`. + +### Client-Side vs Server-Side Sorting + +Whether or not you should use client-side or server-side sorting depends entirely on whether you are also using client-side or server-side pagination or filtering. Be consistent, because using client-side sorting with server-side pagination or filtering will only sort the data that is currently loaded, and not the entire dataset. + +### Manual Server-Side Sorting + +If you plan to just use your own server-side sorting in your back-end logic, you do not need to provide a sorted row model. But if you have provided a sorting row model, but you want to disable it, you can use the `manualSorting` table option. + +```jsx +const [sorting, setSorting] = useState([]) +//... +const table = useTable({ + _features: tableFeatures({ rowSortingFeature }), // feature needed for sorting state/APIs + _rowModels: {}, // no sortedRowModel needed for manual sorting + columns, + data, + manualSorting: true, // use pre-sorted row model instead of sorted row model + state: { + sorting, + }, + onSortingChange: setSorting, +}) +``` + +> **NOTE**: When `manualSorting` is set to `true`, the table will assume that the data that you provide is already sorted, and will not apply any sorting to it. + +### Client-Side Sorting + +To implement client-side sorting, add the `rowSortingFeature` to your features and the `sortedRowModel` to your row models. Import `createSortedRowModel` and `sortFns` from TanStack Table: + +```jsx +import { + useTable, + tableFeatures, + rowSortingFeature, + createSortedRowModel, + sortFns, +} from '@tanstack/react-table' + +const _features = tableFeatures({ rowSortingFeature }) + +const table = useTable({ + _features, + _rowModels: { + sortedRowModel: createSortedRowModel(sortFns), + }, + columns, + data, +}) +``` + +### Sorting RowModelFns + +The default sorting function for all columns is inferred from the data type of the column. However, it can be useful to define the exact sorting function that you want to use for a specific column, especially if any of your data is nullable or not a standard data type. + +You can determine a custom sorting function on a per-column basis using the `sortFn` column option. + +By default, there are 6 built-in sorting functions to choose from: + +- `alphanumeric` - Sorts by mixed alphanumeric values without case-sensitivity. Slower, but more accurate if your strings contain numbers that need to be naturally sorted. +- `alphanumericCaseSensitive` - Sorts by mixed alphanumeric values with case-sensitivity. Slower, but more accurate if your strings contain numbers that need to be naturally sorted. +- `text` - Sorts by text/string values without case-sensitivity. Faster, but less accurate if your strings contain numbers that need to be naturally sorted. +- `textCaseSensitive` - Sorts by text/string values with case-sensitivity. Faster, but less accurate if your strings contain numbers that need to be naturally sorted. +- `datetime` - Sorts by time, use this if your values are `Date` objects. +- `basic` - Sorts using a basic/standard `a > b ? 1 : a < b ? -1 : 0` comparison. This is the fastest sorting function, but may not be the most accurate. + +You can also define your own custom sorting functions either as the `sortFn` column option, or as a global sorting function using the `sortFns` table option. + +#### Custom Sorting Functions + +When defining a custom sorting function in either the `sortFns` table option or as a `sortFn` column option, it should have the following signature: + +```tsx +//optionally use the SortFn to infer the parameter types +const myCustomSortFn: SortFn = (rowA: Row, rowB: Row, columnId: string) => { + return //-1, 0, or 1 - access any row data using rowA.original and rowB.original +} +``` + +> Note: The comparison function does not need to take whether or not the column is in descending or ascending order into account. The row models will take of that logic. `sortFn` functions only need to provide a consistent comparison. + +Every sorting function receives 2 rows and a column ID and are expected to compare the two rows using the column ID to return `-1`, `0`, or `1` in ascending order. Here's a cheat sheet: + +| Return | Ascending Order | +| ------ | --------------- | +| `-1` | `a < b` | +| `0` | `a === b` | +| `1` | `a > b` | + +```jsx +const columns = [ + { + header: () => 'Name', + accessorKey: 'name', + sortFn: 'alphanumeric', // use built-in sorting function by name + }, + { + header: () => 'Age', + accessorKey: 'age', + sortFn: 'myCustomSortFn', // use custom global sorting function + }, + { + header: () => 'Birthday', + accessorKey: 'birthday', + sortFn: 'datetime', // recommended for date columns + }, + { + header: () => 'Profile', + accessorKey: 'profile', + // use custom sorting function directly + sortFn: (rowA, rowB, columnId) => { + return rowA.original.someProperty - rowB.original.someProperty + }, + } +] +//... +const table = useTable({ + _features, + _rowModels: { + sortedRowModel: createSortedRowModel({ + ...sortFns, + myCustomSortFn: (rowA, rowB, columnId) => + rowA.original[columnId] > rowB.original[columnId] + ? 1 + : rowA.original[columnId] < rowB.original[columnId] + ? -1 + : 0, + }), + }, + columns, + data, +}) +``` + +### Customize Sorting + +There are a lot of table and column options that you can use to further customize the sorting UX and behavior. + +#### Disable Sorting + +You can disable sorting for either a specific column or the entire table using the `enableSorting` column option or table option. + +```jsx +const columns = [ + { + header: () => 'ID', + accessorKey: 'id', + enableSorting: false, // disable sorting for this column + }, + { + header: () => 'Name', + accessorKey: 'name', + }, + //... +] +//... +const table = useTable({ + _features, + _rowModels: { sortedRowModel: createSortedRowModel(sortFns) }, + columns, + data, + enableSorting: false, // disable sorting for the entire table +}) +``` + +#### Sorting Direction + +By default, the first sorting direction when cycling through the sorting for a column using the `toggleSorting` APIs is ascending for string columns and descending for number columns. You can change this behavior with the `sortDescFirst` column option or table option. + +```jsx +const columns = [ + { + header: () => 'Name', + accessorKey: 'name', + sortDescFirst: true, //sort by name in descending order first (default is ascending for string columns) + }, + { + header: () => 'Age', + accessorKey: 'age', + sortDescFirst: false, //sort by age in ascending order first (default is descending for number columns) + }, + //... +] +//... +const table = useTable({ + _features, + _rowModels: { sortedRowModel: createSortedRowModel(sortFns) }, + columns, + data, + sortDescFirst: true, //sort by all columns in descending order first (default is ascending for string columns and descending for number columns) +}) +``` + +> **NOTE**: You may want to explicitly set the `sortDescFirst` column option on any columns that have nullable values. The table may not be able to properly determine if a column is a number or a string if it contains nullable values. + +#### Invert Sorting + +Inverting sorting is not the same as changing the default sorting direction. If `invertSorting` column option is `true` for a column, then the "desc/asc" sorting states will still cycle like normal, but the actual sorting of the rows will be inverted. This is useful for values that have an inverted best/worst scale where lower numbers are better, eg. a ranking (1st, 2nd, 3rd) or golf-like scoring. + +```jsx +const columns = [ + { + header: () => 'Rank', + accessorKey: 'rank', + invertSorting: true, // invert the sorting for this column. 1st -> 2nd -> 3rd -> ... even if "desc" sorting is applied + }, + //... +] +``` + +#### Sort Undefined Values + +Any undefined values will be sorted to the beginning or end of the list based on the `sortUndefined` column option or table option. You can customize this behavior for your specific use-case. + +In not specified, the default value for `sortUndefined` is `1`, and undefined values will be sorted with lower priority (descending), if ascending, undefined will appear on the end of the list. + +- `'first'` - Undefined values will be pushed to the beginning of the list +- `'last'` - Undefined values will be pushed to the end of the list +- `false` - Undefined values will be considered tied and need to be sorted by the next column filter or original index (whichever applies) +- `-1` - Undefined values will be sorted with higher priority (ascending) (if ascending, undefined will appear on the beginning of the list) +- `1` - Undefined values will be sorted with lower priority (descending) (if ascending, undefined will appear on the end of the list) + +> NOTE: `'first'` and `'last'` options are available in v9. + +```jsx +const columns = [ + { + header: () => 'Rank', + accessorKey: 'rank', + sortUndefined: -1, // 'first' | 'last' | 1 | -1 | false + }, +] +``` + +#### Sorting Removal + +By default, the ability to remove sorting while cycling through the sorting states for a column is enabled. You can disable this behavior using the `enableSortingRemoval` table option. This behavior is useful if you want to ensure that at least one column is always sorted. + +The default behavior when using either the `getToggleSortingHandler` or `toggleSorting` APIs is to cycle through the sorting states like this: + +`'none' -> 'desc' -> 'asc' -> 'none' -> 'desc' -> 'asc' -> ...` + +If you disable sorting removal, the behavior will be like this: + +`'none' -> 'desc' -> 'asc' -> 'desc' -> 'asc' -> ...` + +Once a column is sorted and `enableSortingRemoval` is `false`, toggling the sorting on that column will never remove the sorting. However, if the user sorts by another column and it is not a multi-sort event, then the sorting will be removed from the previous column and just applied to the new column. + +> Set `enableSortingRemoval` to `false` if you want to ensure that at least one column is always sorted. + +```jsx +const table = useTable({ + _features, + _rowModels: { sortedRowModel: createSortedRowModel(sortFns) }, + columns, + data, + enableSortingRemoval: false, // disable the ability to remove sorting on columns (always none -> asc -> desc -> asc) +}) +``` + +#### Multi-Sorting + +Sorting by multiple columns at once is enabled by default if using the `column.getToggleSortingHandler` API. If the user holds the `Shift` key while clicking on a column header, the table will sort by that column in addition to the columns that are already sorted. If you use the `column.toggleSorting` API, you have to manually pass in whether or not to use multi-sorting. (`column.toggleSorting(desc, multi)`). + +##### Disable Multi-Sorting + +You can disable multi-sorting for either a specific column or the entire table using the `enableMultiSort` column option or table option. Disabling multi-sorting for a specific column will replace all existing sorting with the new column's sorting. + +```jsx +const columns = [ + { + header: () => 'Created At', + accessorKey: 'createdAt', + enableMultiSort: false, // always sort by just this column if sorting by this column + }, + //... +] +//... +const table = useTable({ + _features, + _rowModels: { sortedRowModel: createSortedRowModel(sortFns) }, + columns, + data, + enableMultiSort: false, // disable multi-sorting for the entire table +}) +``` + +##### Customize Multi-Sorting Trigger + +By default, the `Shift` key is used to trigger multi-sorting. You can change this behavior with the `isMultiSortEvent` table option. You can even specify that all sorting events should trigger multi-sorting by returning `true` from the custom function. + +```jsx +const table = useTable({ + _features, + _rowModels: { sortedRowModel: createSortedRowModel(sortFns) }, + columns, + data, + isMultiSortEvent: (e) => true, // normal click triggers multi-sorting + //or + isMultiSortEvent: (e) => e.ctrlKey || e.shiftKey, // also use the `Ctrl` key to trigger multi-sorting +}) +``` + +##### Multi-Sorting Limit + +By default, there is no limit to the number of columns that can be sorted at once. You can set a limit using the `maxMultiSortColCount` table option. + +```jsx +const table = useTable({ + _features, + _rowModels: { sortedRowModel: createSortedRowModel(sortFns) }, + columns, + data, + maxMultiSortColCount: 3, // only allow 3 columns to be sorted at once +}) +``` + +##### Multi-Sorting Removal + +By default, the ability to remove multi-sorts is enabled. You can disable this behavior using the `enableMultiRemove` table option. + +```jsx +const table = useTable({ + _features, + _rowModels: { sortedRowModel: createSortedRowModel(sortFns) }, + columns, + data, + enableMultiRemove: false, // disable the ability to remove multi-sorts +}) +``` + +### Sorting APIs + +There are a lot of sorting related APIs that you can use to hook up to your UI or other logic. Here is a list of all of the sorting APIs and some of their use-cases. + +- `table.setSorting` - Set the sorting state directly. +- `table.resetSorting` - Reset the sorting state to the initial state or clear it. + +- `column.getCanSort` - Useful for enabling/disabling the sorting UI for a column. +- `column.getIsSorted` - Useful for showing a visual sorting indicator for a column. + +- `column.getToggleSortingHandler` - Useful for hooking up the sorting UI for a column. Add to a sort arrow (icon button), menu item, or simply the entire column header cell. This handler will call `column.toggleSorting` with the correct parameters. +- `column.toggleSorting` - Useful for hooking up the sorting UI for a column. If using instead of `column.getToggleSortingHandler`, you have to manually pass in whether or not to use multi-sorting. (`column.toggleSorting(desc, multi)`) +- `column.clearSorting` - Useful for a "clear sorting" button or menu item for a specific column. + +- `column.getNextSortingOrder` - Useful for showing which direction the column will sort by next. (asc/desc/clear in a tooltip/menu item/aria-label or something) +- `column.getFirstSortDir` - Useful for showing which direction the column will sort by first. (asc/desc in a tooltip/menu item/aria-label or something) +- `column.getAutoSortDir` - Determines whether the first sorting direction will be ascending or descending for a column. +- `column.getAutoSortFn` - Used internally to find the default sorting function for a column if none is specified. +- `column.getSortFn` - Returns the exact sorting function being used for a column. + +- `column.getCanMultiSort` - Useful for enabling/disabling the multi-sorting UI for a column. +- `column.getSortIndex` - Useful for showing a badge or indicator of the column's sort order in a multi-sort scenario. i.e. whether or not it is the first, second, third, etc. column to be sorted. diff --git a/docs/guide/tables.md b/docs/guide/tables.md new file mode 100644 index 0000000000..f3d4af7046 --- /dev/null +++ b/docs/guide/tables.md @@ -0,0 +1,108 @@ +--- +title: Table Instance Guide +--- + +## API + +[Table API](../api/core/table) + +## Table Instance Guide + +TanStack Table is a headless UI library. When we talk about the `table` or "table instance", we're not talking about a literal `` element. Instead, we're referring to the core table object that contains the table state and APIs. The `table` instance is created by calling your adapter's `_createTable` function (e.g. `useTable`, `createTable`, or `injectTable`). + +The `table` instance that is returned from the `_createTable` function (from the framework adapter) is the main object that you will interact with to read and mutate the table state. It is the one place where everything happens in TanStack Table. When you get to the point where you are rendering your UI, you will use APIs from this `table` instance. + +### Creating a Table Instance + +To create a table instance, 3 `options` are required: `columns`, `data`, and `_features`. The `_features` option declares which table features your table uses (enabling tree-shaking—you only bundle what you use). The core row model is included automatically; add additional row models via `_rowModels` when you need filtering, sorting, pagination, etc. There are dozens of other table options to configure features and behavior. + +#### Defining Data + +Define your data as an array of objects with a stable reference. `data` can come from anywhere like an API response or defined statically in your code, but it must have a stable reference to prevent infinite re-renders. If using TypeScript, the type that you give your data will be used as a `TData` generic. See the [Data Guide](./data) for more info. + +#### Defining Columns + +Column definitions are covered in detail in the previous section in the [Column Def Guide](./column-defs). We'll note here, however, that when you define the type of your columns, you should use the same `TData` type that you used for your data. + +```ts +const _features = tableFeatures({}) // Define which features your table uses +const columns: ColumnDef[] = [] // Pass User type as TData; use typeof _features for TFeatures +//or +const columnHelper = createColumnHelper() // Pass both TFeatures and TData in v9 +``` + +The column definitions are where we will tell TanStack Table how each column should access and/or transform row data with either an `accessorKey` or `accessorFn`. See the [Column Def Guide](./column-defs#creating-accessor-columns) for more info. + +#### Defining Features and Row Models + +This is explained in much more detail in the [Row Models Guide](./row-models). In v9, you declare which features your table uses via `_features` (using `tableFeatures()`), and which row models to apply via `_rowModels`. The core row model is always included automatically. For a basic table with no filtering, sorting, or pagination, pass an empty features object and empty row models: + +```ts +import { tableFeatures } from '@tanstack/[framework]-table' + +const _features = tableFeatures({}) // Core features only; add columnFilteringFeature, rowSortingFeature, etc. as needed + +const table = _createTable({ + _features, + _rowModels: {}, // Core row model is automatic; add filteredRowModel, sortedRowModel, etc. as needed + columns, + data, +}) +``` + +#### Initializing the Table Instance + +With our `_features`, `columns`, `data`, and `_rowModels` defined, we can now create our basic table instance, along side any other table options that we want to pass in. + +> **Framework note:** This guide uses React examples. Other frameworks (Angular, Lit, Solid, Svelte, Vue) use `createTable`, `injectTable`, or similar with the same options. + +```ts +//vanilla js +const table = _createTable({ _features, _rowModels: {}, columns, data }) + +//angular +this.table = injectTable({ _features, _rowModels: {}, columns: this.columns, data: this.data() }) + +//lit +const table = this.tableController.table({ _features, _rowModels: {}, columns, data }) + +//react +const table = useTable({ _features, _rowModels: {}, columns, data }) + +//solid +const table = createTable({ _features, _rowModels: {}, columns, get data() { return data() } }) + +//svelte +const table = createTable({ _features, _rowModels: {}, columns, data }) + +//vue +const table = useTable({ _features, _rowModels: {}, columns, data }) +``` + +So what's in the `table` instance? Let's take a look at what interactions we can have with the table instance. + +### Table State + +The table instance contains all of the table state, which can be accessed via the `table.store.state` API. Each table feature registers various states in the table state. For example, the row selection feature registers `rowSelection` state, the pagination feature registers `pagination` state, etc. + +Each feature will also have corresponding state setter APIs and state resetter APIs on the table instance. For example, the row selection feature will have a `setRowSelection` API and a `resetRowSelection`. + +```ts +table.store.state.rowSelection //read the row selection state +table.setRowSelection((old) => ({...old})) //set the row selection state +table.resetRowSelection() //reset the row selection state +``` + +This is covered in more detail in the [Table State Guides](../framework/react/guide/table-state) + +### Table APIs + +There are dozens of table APIs created by each feature to help you either read or mutate the table state in different ways. + +API reference docs for the core table instance and all other feature APIs can be found throughout the API docs. + +For example, you can find the core table instance API docs here: [Table API](../api/core/table#table-api) + +### Table Row Models + +There is a special set of table instance APIs for reading rows out of the table instance called row models. TanStack Table has advanced features where the rows that are generated may be very different than the array of `data` that you originally passed in. To learn more about the different row models that you can pass in as a table option, see the [Row Models Guide](./row-models). diff --git a/docs/guide/virtualization.md b/docs/guide/virtualization.md new file mode 100644 index 0000000000..6adc58c3ae --- /dev/null +++ b/docs/guide/virtualization.md @@ -0,0 +1,20 @@ +--- +title: Virtualization Guide +--- + +## Examples + +Want to skip to the implementation? Check out these examples: + +- [virtualized-columns](../framework/react/examples/virtualized-columns) +- [virtualized-rows (dynamic row height)](../framework/react/examples/virtualized-rows) +- [virtualized-rows (fixed row height)](https://tanstack.com/virtual/latest/docs/framework/react/examples/table) +- [virtualized-infinite-scrolling](../framework/react/examples/virtualized-infinite-scrolling) + +## API + +[TanStack Virtual Virtualizer API](https://tanstack.com/virtual/latest/docs/api/virtualizer) + +## Virtualization Guide + +The TanStack Table packages do not come with any virtualization APIs or features built-in, but TanStack Table can easily work with other virtualization libraries like [react-window](https://www.npmjs.com/package/react-window) or TanStack's own [TanStack Virtual](https://tanstack.com/virtual/v3). This guide will show some strategies for using TanStack Table with TanStack Virtual. diff --git a/docs/iframe.html b/docs/iframe.html deleted file mode 100644 index df82ac9dc4..0000000000 --- a/docs/iframe.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - React Storybook - - - - -
-
- - - - \ No newline at end of file diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index 2655775de4..0000000000 --- a/docs/index.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - React Storybook - - - -
- - - - \ No newline at end of file diff --git a/docs/installation.md b/docs/installation.md new file mode 100644 index 0000000000..503f67f913 --- /dev/null +++ b/docs/installation.md @@ -0,0 +1,54 @@ +--- +title: Installation +--- + +Before we dig in to the API, let's get you set up! + +Install your table adapter as a dependency using your preferred package manager: + + + +react: @tanstack/react-table +vue: @tanstack/vue-table +solid: @tanstack/solid-table +svelte: @tanstack/svelte-table +angular: @tanstack/angular-table +lit: @tanstack/lit-table + + + + + +# React + +The `@tanstack/react-table` package works with React 16.8, React 17, React 18, and React 19. + +> [!NOTE] +> Even though the React adapter works with React 19, it may not work with the new React Compiler that's coming out alongside React 19. This may be fixed in future TanStack Table updates. + +# Vue + +The `@tanstack/vue-table` package works with Vue 3. + +# Solid + +The `@tanstack/solid-table` package works with Solid-JS 1. + +# Svelte + +The `@tanstack/svelte-table` package works with Svelte 3 and Svelte 4. + +> [!NOTE] +> There is not a built-in Svelte 5 adapter yet, but you can still use TanStack Table with Svelte 5 by installing the `@tanstack/table-core` package and using a custom adapter from the community. See this [PR](https://github.com/TanStack/table/pull/5403) for inspiration. + +# Angular + +The `@tanstack/angular-table` package works with Angular 17. The Angular adapter uses a new Angular Signal implementation. + +# Lit + +The `@tanstack/lit-table` package works with Lit 3. + + + +Don't see your favorite framework (or favorite version of your framework) listed? You can always just use the `@tanstack/table-core` package and build your own adapter in your own codebase. Usually, only a thin wrapper is needed to manage state and rendering for your specific framework. Browse the [source code](https://github.com/TanStack/table/tree/main/packages) of all of the other adapters to see how they work. diff --git a/docs/introduction.md b/docs/introduction.md new file mode 100644 index 0000000000..86fc18df01 --- /dev/null +++ b/docs/introduction.md @@ -0,0 +1,69 @@ +--- +title: Introduction +--- + +TanStack Table is a **Headless UI** library for building powerful tables & datagrids for TS/JS, React, Vue, Solid, and Svelte. + +## What is "headless" UI? + +**Headless UI** is a term for libraries and utilities that provide the logic, state, processing and API for UI elements and interactions, but **do not provide markup, styles, or pre-built implementations**. Scratching your head yet? 😉 Headless UI has a few main goals: + +The hardest parts of building complex UIs usually revolve around state, events, side-effects, data computation/management. By removing these concerns from the markup, styles and implementation details, our logic and components can be more modular and reusable. + +Building UI is a very branded and custom experience, even if that means choosing a design system or adhering to a design spec. To support this custom experience, component-based UI libraries need to support a massive (and seemingly endless) API surface around markup and style customization. Headless UI libraries decouple your logic from your UI + +When you use a headless UI library, the complex task of **data-processing, state-management, and business logic** are handled for you, leaving you to worry about higher-cardinality decisions that differ across implementations and use cases. + +> Want to dive deeper? [Read more about Headless UI](https://www.merrickchristensen.com/articles/headless-user-interface-components/). + +## Component-based libraries vs Headless libraries + +In the ecosystem of table/datagrid libraries, there are two main categories: + +- Component-based table libraries +- Headless table libraries + +### Which kind of table library should I use? + +Each approach has subtle tradeoffs. Understanding these subtleties will help you make the right decision for your application and team. + +### Component-based Table Libraries + +Component-based table libraries will typically supply you with a feature-rich drop-in solution and ready-to-use components/markup complete with styles/theming. [AG Grid](https://ag-grid.com/react-data-grid/?utm_source=reacttable&utm_campaign=githubreacttable) is a great example of this type of table library. + +**Pros:** + +- Ship with ready-to-use markup/styles +- Little setup required +- Turn-key experience + +**Cons:** + +- Less control over markup +- Custom styles are typically theme-based +- Larger bundle-sizes +- Highly coupled to framework adapters and platforms + +**If you want a ready-to-use table and design/bundle-size are not hard requirements**, then you should consider using a component-based table library. + +There are a lot of component-based table libraries out there, but we believe [AG Grid](https://ag-grid.com/react-data-grid/?utm_source=reacttable&utm_campaign=githubreacttable) is the gold standard and is by far our favorite grid-sibling (don't tell the others 🤫). + +### Headless Table Libraries + +Headless table libraries will typically supply you with functions, state, utilities and event listeners to build your own table markup or attach to existing table markups. + +**Pros:** + +- Full control over markup and styles +- Supports all styling patterns (CSS, CSS-in-JS, UI libraries, etc) +- Smaller bundle-sizes +- Portable. Run anywhere JS runs! + +**Cons:** + +- More setup required +- No markup, styles or themes provided + +**If you want a lighter-weight table or full control over the design**, then you should consider using a headless table library. + +There are very few headless table libraries out there and obviously, **TanStack Table** is our favorite! diff --git a/docs/overview.md b/docs/overview.md new file mode 100644 index 0000000000..e3026346e9 --- /dev/null +++ b/docs/overview.md @@ -0,0 +1,63 @@ +--- +title: Overview +--- + +TanStack Table's core is **framework agnostic**, which means its API is the same regardless of the framework you're using. Adapters are provided to make working with the table core easier depending on your framework. See the Adapters menu for available adapters. + +## Typescript + +While TanStack Table is written in [TypeScript](https://www.typescriptlang.org/), using TypeScript in your application is optional (but recommended as it comes with outstanding benefits to both you and your codebase) + +If you use TypeScript, you will get top-notch type safety and editor autocomplete for all table APIs and state. + +## Headless + +As it was mentioned extensively in the [Intro](./introduction) section, TanStack Table is **headless**. This means that it doesn't render any DOM elements, and instead relies on you, the UI/UX developer to provide the table's markup and styles. This is a great way to build a table that can be used in any UI framework, including React, Vue, Solid, Svelte, Angular, and even JS-to-native platforms like React Native! + +## Agnostic + +Since TanStack Table is headless and runs on a vanilla JavaScript core, it is agnostic in a couple of ways: + +1. TanStack Table is **Framework Agnostic**, which means you can use it with any JavaScript framework (or library) that you want. TanStack Table provides ready-to-use adapters for React, Vue, Solid, Svelte out of the box, but you can create your own adapter if you need to. +2. TanStack Table is **CSS / Component Library Agnostic**, which means that you can use TanStack Table with whatever CSS strategy or component library you want. TanStack Table itself does not render any table markup or styles. You bring your own! Want to use Tailwind or ShadCN? No problem! Want to use Material UI or Bootstrap? No problem! Have your own custom design system? TanStack Table was made for you! + +## Core Objects and Types + +The table core uses the following abstractions, commonly exposed by adapters: + +- [Data](./guide/data) - The core data array you provide the table +- [Column Defs](./guide/column-defs): Objects used to configure a column and its data model, display templates, and more +- [Table Instance](./guide/tables): The core table object containing both state and API +- [Row Models](./guide/row-models): How the `data` array is transformed into useful rows depending on the features you are using +- [Rows](./guide/rows): Each row mirrors its respective row data and provides row-specific APIs +- [Cells](./guide/cells): Each cell mirrors its respective row-column intersection and provides cell-specific APIs +- [Header Groups](./guide/header-groups): Header groups are computed slices of nested header levels, each containing a group of headers +- [Headers](./guide/headers): Each header is either directly associated with or derived from its column def and provides header-specific APIs +- [Columns](./guide/columns): Each column mirrors its respective column def and also provides column-specific APIs + +## Features + +TanStack Table will help you build just about any type of table you can imagine. It has built-in state and APIs for the following features: + +- [Column Faceting](./guide/column-faceting) - List unique lists of column values or min/max values for a column +- [Column Filtering](./guide/column-filtering) - Filter rows based on search values for a column +- [Column Grouping](./guide/grouping) - Group columns together, run aggregations, and more +- [Column Ordering](./guide/column-ordering) - Dynamically change the order of columns +- [Column Pinning](./guide/column-pinning) - Pin (Freeze) columns to the left or right of the table +- [Column Sizing](./guide/column-sizing) - Dynamically change the size of columns (column resizing handles) +- [Column Visibility](./guide/column-visibility) - Hide/show columns +- [Global Faceting](./guide/global-faceting) - List unique lists of column values or min/max values for the entire table +- [Global Filtering](./guide/global-filtering) - Filter rows based on search values for the entire table +- [Row Expanding](./guide/expanding) - Expand/collapse rows (sub-rows) +- [Row Pagination](./guide/pagination) - Paginate rows +- [Row Pinning](./guide/row-pinning) - Pin (Freeze) rows to the top or bottom of the table +- [Row Selection](./guide/row-selection) - Select/deselect rows (checkboxes) +- [Row Sorting](./guide/sorting) - Sort rows by column values + +These are just some of the capabilities that you can build with TanStack Table. There are many more features that are possible with TanStack Table that you can add along-side the built-in features. + +[Virtualization](./guide/virtualization) is an example of a feature that is not built-in to TanStack Table, but can be achieved by using another library (like [TanStack Virtual](https://tanstack.com/virtual/v3)) and adding it along-side your other table rendering logic. + +TanStack Table also supports [Custom Features](./guide/custom-features) (plugins) that you can use to modify the table instance to add your own custom logic to the table in a more integrated way. + +And of course, you can just write your own state and hooks to add whatever other features you want for your table. The features from the TanStack Table core are just a solid foundation to build on, with a large focus on performance and DX. diff --git a/docs/reference/@tanstack/namespaces/filterFn_arrIncludes/functions/autoRemove.md b/docs/reference/@tanstack/namespaces/filterFn_arrIncludes/functions/autoRemove.md new file mode 100644 index 0000000000..e2b8ab07c2 --- /dev/null +++ b/docs/reference/@tanstack/namespaces/filterFn_arrIncludes/functions/autoRemove.md @@ -0,0 +1,22 @@ +--- +id: autoRemove +title: autoRemove +--- + +# Function: autoRemove() + +```ts +function autoRemove(val): boolean; +``` + +Defined in: [fns/filterFns.ts:316](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L316) + +## Parameters + +### val + +`any` + +## Returns + +`boolean` diff --git a/docs/reference/@tanstack/namespaces/filterFn_arrIncludes/index.md b/docs/reference/@tanstack/namespaces/filterFn_arrIncludes/index.md new file mode 100644 index 0000000000..39dbc36047 --- /dev/null +++ b/docs/reference/@tanstack/namespaces/filterFn_arrIncludes/index.md @@ -0,0 +1,12 @@ +--- +id: filterFn_arrIncludes +title: filterFn_arrIncludes +--- + +# filterFn\_arrIncludes + +Filter function for checking if an array includes a given value. + +## Functions + +- [autoRemove](functions/autoRemove.md) diff --git a/docs/reference/@tanstack/namespaces/filterFn_arrIncludesAll/functions/autoRemove.md b/docs/reference/@tanstack/namespaces/filterFn_arrIncludesAll/functions/autoRemove.md new file mode 100644 index 0000000000..6749ac0134 --- /dev/null +++ b/docs/reference/@tanstack/namespaces/filterFn_arrIncludesAll/functions/autoRemove.md @@ -0,0 +1,22 @@ +--- +id: autoRemove +title: autoRemove +--- + +# Function: autoRemove() + +```ts +function autoRemove(val): boolean; +``` + +Defined in: [fns/filterFns.ts:334](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L334) + +## Parameters + +### val + +`any` + +## Returns + +`boolean` diff --git a/docs/reference/@tanstack/namespaces/filterFn_arrIncludesAll/index.md b/docs/reference/@tanstack/namespaces/filterFn_arrIncludesAll/index.md new file mode 100644 index 0000000000..ee2ffb6838 --- /dev/null +++ b/docs/reference/@tanstack/namespaces/filterFn_arrIncludesAll/index.md @@ -0,0 +1,12 @@ +--- +id: filterFn_arrIncludesAll +title: filterFn_arrIncludesAll +--- + +# filterFn\_arrIncludesAll + +Filter function for checking if an array includes all of the given values. + +## Functions + +- [autoRemove](functions/autoRemove.md) diff --git a/docs/reference/@tanstack/namespaces/filterFn_arrIncludesSome/functions/autoRemove.md b/docs/reference/@tanstack/namespaces/filterFn_arrIncludesSome/functions/autoRemove.md new file mode 100644 index 0000000000..5c8129fd1a --- /dev/null +++ b/docs/reference/@tanstack/namespaces/filterFn_arrIncludesSome/functions/autoRemove.md @@ -0,0 +1,22 @@ +--- +id: autoRemove +title: autoRemove +--- + +# Function: autoRemove() + +```ts +function autoRemove(val): boolean; +``` + +Defined in: [fns/filterFns.ts:353](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L353) + +## Parameters + +### val + +`any` + +## Returns + +`boolean` diff --git a/docs/reference/@tanstack/namespaces/filterFn_arrIncludesSome/index.md b/docs/reference/@tanstack/namespaces/filterFn_arrIncludesSome/index.md new file mode 100644 index 0000000000..6e7440d236 --- /dev/null +++ b/docs/reference/@tanstack/namespaces/filterFn_arrIncludesSome/index.md @@ -0,0 +1,12 @@ +--- +id: filterFn_arrIncludesSome +title: filterFn_arrIncludesSome +--- + +# filterFn\_arrIncludesSome + +Filter function for checking if an array includes any of the given values. + +## Functions + +- [autoRemove](functions/autoRemove.md) diff --git a/docs/reference/@tanstack/namespaces/filterFn_equals/functions/autoRemove.md b/docs/reference/@tanstack/namespaces/filterFn_equals/functions/autoRemove.md new file mode 100644 index 0000000000..4215c8844e --- /dev/null +++ b/docs/reference/@tanstack/namespaces/filterFn_equals/functions/autoRemove.md @@ -0,0 +1,22 @@ +--- +id: autoRemove +title: autoRemove +--- + +# Function: autoRemove() + +```ts +function autoRemove(val): boolean; +``` + +Defined in: [fns/filterFns.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L22) + +## Parameters + +### val + +`any` + +## Returns + +`boolean` diff --git a/docs/reference/@tanstack/namespaces/filterFn_equals/index.md b/docs/reference/@tanstack/namespaces/filterFn_equals/index.md new file mode 100644 index 0000000000..a84b3749fa --- /dev/null +++ b/docs/reference/@tanstack/namespaces/filterFn_equals/index.md @@ -0,0 +1,12 @@ +--- +id: filterFn_equals +title: filterFn_equals +--- + +# filterFn\_equals + +Filter function for checking if a value is exactly equal to a given value. (JS === comparison) + +## Functions + +- [autoRemove](functions/autoRemove.md) diff --git a/docs/reference/@tanstack/namespaces/filterFn_equalsString/functions/autoRemove.md b/docs/reference/@tanstack/namespaces/filterFn_equalsString/functions/autoRemove.md new file mode 100644 index 0000000000..3007b1e7db --- /dev/null +++ b/docs/reference/@tanstack/namespaces/filterFn_equalsString/functions/autoRemove.md @@ -0,0 +1,22 @@ +--- +id: autoRemove +title: autoRemove +--- + +# Function: autoRemove() + +```ts +function autoRemove(val): boolean; +``` + +Defined in: [fns/filterFns.ts:99](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L99) + +## Parameters + +### val + +`any` + +## Returns + +`boolean` diff --git a/docs/reference/@tanstack/namespaces/filterFn_equalsString/index.md b/docs/reference/@tanstack/namespaces/filterFn_equalsString/index.md new file mode 100644 index 0000000000..f1b1984393 --- /dev/null +++ b/docs/reference/@tanstack/namespaces/filterFn_equalsString/index.md @@ -0,0 +1,12 @@ +--- +id: filterFn_equalsString +title: filterFn_equalsString +--- + +# filterFn\_equalsString + +Filter function for checking if a string is exactly equal to a given string. (Non-case-sensitive) + +## Functions + +- [autoRemove](functions/autoRemove.md) diff --git a/docs/reference/@tanstack/namespaces/filterFn_equalsStringSensitive/functions/autoRemove.md b/docs/reference/@tanstack/namespaces/filterFn_equalsStringSensitive/functions/autoRemove.md new file mode 100644 index 0000000000..8700832f1e --- /dev/null +++ b/docs/reference/@tanstack/namespaces/filterFn_equalsStringSensitive/functions/autoRemove.md @@ -0,0 +1,22 @@ +--- +id: autoRemove +title: autoRemove +--- + +# Function: autoRemove() + +```ts +function autoRemove(val): boolean; +``` + +Defined in: [fns/filterFns.ts:115](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L115) + +## Parameters + +### val + +`any` + +## Returns + +`boolean` diff --git a/docs/reference/@tanstack/namespaces/filterFn_equalsStringSensitive/index.md b/docs/reference/@tanstack/namespaces/filterFn_equalsStringSensitive/index.md new file mode 100644 index 0000000000..bf99c06b65 --- /dev/null +++ b/docs/reference/@tanstack/namespaces/filterFn_equalsStringSensitive/index.md @@ -0,0 +1,12 @@ +--- +id: filterFn_equalsStringSensitive +title: filterFn_equalsStringSensitive +--- + +# filterFn\_equalsStringSensitive + +Filter function for checking if a string is exactly equal to a given string. (Case-sensitive) + +## Functions + +- [autoRemove](functions/autoRemove.md) diff --git a/docs/reference/@tanstack/namespaces/filterFn_greaterThan/functions/resolveFilterValue.md b/docs/reference/@tanstack/namespaces/filterFn_greaterThan/functions/resolveFilterValue.md new file mode 100644 index 0000000000..e54f30b5cc --- /dev/null +++ b/docs/reference/@tanstack/namespaces/filterFn_greaterThan/functions/resolveFilterValue.md @@ -0,0 +1,22 @@ +--- +id: resolveFilterValue +title: resolveFilterValue +--- + +# Function: resolveFilterValue() + +```ts +function resolveFilterValue(val): boolean; +``` + +Defined in: [fns/filterFns.ts:144](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L144) + +## Parameters + +### val + +`any` + +## Returns + +`boolean` diff --git a/docs/reference/@tanstack/namespaces/filterFn_greaterThan/index.md b/docs/reference/@tanstack/namespaces/filterFn_greaterThan/index.md new file mode 100644 index 0000000000..12ec8a7afa --- /dev/null +++ b/docs/reference/@tanstack/namespaces/filterFn_greaterThan/index.md @@ -0,0 +1,12 @@ +--- +id: filterFn_greaterThan +title: filterFn_greaterThan +--- + +# filterFn\_greaterThan + +Filter function for checking if a number is greater than a given number. + +## Functions + +- [resolveFilterValue](functions/resolveFilterValue.md) diff --git a/docs/reference/@tanstack/namespaces/filterFn_greaterThanOrEqualTo/functions/resolveFilterValue.md b/docs/reference/@tanstack/namespaces/filterFn_greaterThanOrEqualTo/functions/resolveFilterValue.md new file mode 100644 index 0000000000..26c4350672 --- /dev/null +++ b/docs/reference/@tanstack/namespaces/filterFn_greaterThanOrEqualTo/functions/resolveFilterValue.md @@ -0,0 +1,22 @@ +--- +id: resolveFilterValue +title: resolveFilterValue +--- + +# Function: resolveFilterValue() + +```ts +function resolveFilterValue(val): boolean; +``` + +Defined in: [fns/filterFns.ts:163](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L163) + +## Parameters + +### val + +`any` + +## Returns + +`boolean` diff --git a/docs/reference/@tanstack/namespaces/filterFn_greaterThanOrEqualTo/index.md b/docs/reference/@tanstack/namespaces/filterFn_greaterThanOrEqualTo/index.md new file mode 100644 index 0000000000..333b43fbda --- /dev/null +++ b/docs/reference/@tanstack/namespaces/filterFn_greaterThanOrEqualTo/index.md @@ -0,0 +1,12 @@ +--- +id: filterFn_greaterThanOrEqualTo +title: filterFn_greaterThanOrEqualTo +--- + +# filterFn\_greaterThanOrEqualTo + +Filter function for checking if a number is greater than or equal to a given number. + +## Functions + +- [resolveFilterValue](functions/resolveFilterValue.md) diff --git a/docs/reference/@tanstack/namespaces/filterFn_inNumberRange/functions/autoRemove.md b/docs/reference/@tanstack/namespaces/filterFn_inNumberRange/functions/autoRemove.md new file mode 100644 index 0000000000..326e90605f --- /dev/null +++ b/docs/reference/@tanstack/namespaces/filterFn_inNumberRange/functions/autoRemove.md @@ -0,0 +1,22 @@ +--- +id: autoRemove +title: autoRemove +--- + +# Function: autoRemove() + +```ts +function autoRemove(val): boolean; +``` + +Defined in: [fns/filterFns.ts:279](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L279) + +## Parameters + +### val + +`any` + +## Returns + +`boolean` diff --git a/docs/reference/@tanstack/namespaces/filterFn_inNumberRange/functions/resolveFilterValue.md b/docs/reference/@tanstack/namespaces/filterFn_inNumberRange/functions/resolveFilterValue.md new file mode 100644 index 0000000000..24e9ffb513 --- /dev/null +++ b/docs/reference/@tanstack/namespaces/filterFn_inNumberRange/functions/resolveFilterValue.md @@ -0,0 +1,22 @@ +--- +id: resolveFilterValue +title: resolveFilterValue +--- + +# Function: resolveFilterValue() + +```ts +function resolveFilterValue(val): readonly [number, number]; +``` + +Defined in: [fns/filterFns.ts:258](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L258) + +## Parameters + +### val + +\[`any`, `any`\] + +## Returns + +readonly \[`number`, `number`\] diff --git a/docs/reference/@tanstack/namespaces/filterFn_inNumberRange/index.md b/docs/reference/@tanstack/namespaces/filterFn_inNumberRange/index.md new file mode 100644 index 0000000000..0336d66395 --- /dev/null +++ b/docs/reference/@tanstack/namespaces/filterFn_inNumberRange/index.md @@ -0,0 +1,13 @@ +--- +id: filterFn_inNumberRange +title: filterFn_inNumberRange +--- + +# filterFn\_inNumberRange + +Filter function for checking if a number is within a given range. + +## Functions + +- [autoRemove](functions/autoRemove.md) +- [resolveFilterValue](functions/resolveFilterValue.md) diff --git a/docs/reference/@tanstack/namespaces/filterFn_includesString/functions/autoRemove.md b/docs/reference/@tanstack/namespaces/filterFn_includesString/functions/autoRemove.md new file mode 100644 index 0000000000..40bcbd6dd1 --- /dev/null +++ b/docs/reference/@tanstack/namespaces/filterFn_includesString/functions/autoRemove.md @@ -0,0 +1,22 @@ +--- +id: autoRemove +title: autoRemove +--- + +# Function: autoRemove() + +```ts +function autoRemove(val): boolean; +``` + +Defined in: [fns/filterFns.ts:80](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L80) + +## Parameters + +### val + +`any` + +## Returns + +`boolean` diff --git a/docs/reference/@tanstack/namespaces/filterFn_includesString/index.md b/docs/reference/@tanstack/namespaces/filterFn_includesString/index.md new file mode 100644 index 0000000000..04612a30bb --- /dev/null +++ b/docs/reference/@tanstack/namespaces/filterFn_includesString/index.md @@ -0,0 +1,12 @@ +--- +id: filterFn_includesString +title: filterFn_includesString +--- + +# filterFn\_includesString + +Filter function for checking if a string includes a given substring. (Non-case-sensitive) + +## Functions + +- [autoRemove](functions/autoRemove.md) diff --git a/docs/reference/@tanstack/namespaces/filterFn_includesStringSensitive/functions/autoRemove.md b/docs/reference/@tanstack/namespaces/filterFn_includesStringSensitive/functions/autoRemove.md new file mode 100644 index 0000000000..2a3cce59e9 --- /dev/null +++ b/docs/reference/@tanstack/namespaces/filterFn_includesStringSensitive/functions/autoRemove.md @@ -0,0 +1,22 @@ +--- +id: autoRemove +title: autoRemove +--- + +# Function: autoRemove() + +```ts +function autoRemove(val): boolean; +``` + +Defined in: [fns/filterFns.ts:58](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L58) + +## Parameters + +### val + +`any` + +## Returns + +`boolean` diff --git a/docs/reference/@tanstack/namespaces/filterFn_includesStringSensitive/index.md b/docs/reference/@tanstack/namespaces/filterFn_includesStringSensitive/index.md new file mode 100644 index 0000000000..93c0e855a3 --- /dev/null +++ b/docs/reference/@tanstack/namespaces/filterFn_includesStringSensitive/index.md @@ -0,0 +1,12 @@ +--- +id: filterFn_includesStringSensitive +title: filterFn_includesStringSensitive +--- + +# filterFn\_includesStringSensitive + +Filter function for checking if a string includes a given substring. (Case-sensitive) + +## Functions + +- [autoRemove](functions/autoRemove.md) diff --git a/docs/reference/@tanstack/namespaces/filterFn_lessThan/functions/resolveFilterValue.md b/docs/reference/@tanstack/namespaces/filterFn_lessThan/functions/resolveFilterValue.md new file mode 100644 index 0000000000..d06754949d --- /dev/null +++ b/docs/reference/@tanstack/namespaces/filterFn_lessThan/functions/resolveFilterValue.md @@ -0,0 +1,22 @@ +--- +id: resolveFilterValue +title: resolveFilterValue +--- + +# Function: resolveFilterValue() + +```ts +function resolveFilterValue(val): boolean; +``` + +Defined in: [fns/filterFns.ts:179](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L179) + +## Parameters + +### val + +`any` + +## Returns + +`boolean` diff --git a/docs/reference/@tanstack/namespaces/filterFn_lessThan/index.md b/docs/reference/@tanstack/namespaces/filterFn_lessThan/index.md new file mode 100644 index 0000000000..764110d19a --- /dev/null +++ b/docs/reference/@tanstack/namespaces/filterFn_lessThan/index.md @@ -0,0 +1,12 @@ +--- +id: filterFn_lessThan +title: filterFn_lessThan +--- + +# filterFn\_lessThan + +Filter function for checking if a number is less than a given number. + +## Functions + +- [resolveFilterValue](functions/resolveFilterValue.md) diff --git a/docs/reference/@tanstack/namespaces/filterFn_lessThanOrEqualTo/functions/resolveFilterValue.md b/docs/reference/@tanstack/namespaces/filterFn_lessThanOrEqualTo/functions/resolveFilterValue.md new file mode 100644 index 0000000000..c603b9a79a --- /dev/null +++ b/docs/reference/@tanstack/namespaces/filterFn_lessThanOrEqualTo/functions/resolveFilterValue.md @@ -0,0 +1,22 @@ +--- +id: resolveFilterValue +title: resolveFilterValue +--- + +# Function: resolveFilterValue() + +```ts +function resolveFilterValue(val): boolean; +``` + +Defined in: [fns/filterFns.ts:195](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L195) + +## Parameters + +### val + +`any` + +## Returns + +`boolean` diff --git a/docs/reference/@tanstack/namespaces/filterFn_lessThanOrEqualTo/index.md b/docs/reference/@tanstack/namespaces/filterFn_lessThanOrEqualTo/index.md new file mode 100644 index 0000000000..ffa6e3e500 --- /dev/null +++ b/docs/reference/@tanstack/namespaces/filterFn_lessThanOrEqualTo/index.md @@ -0,0 +1,12 @@ +--- +id: filterFn_lessThanOrEqualTo +title: filterFn_lessThanOrEqualTo +--- + +# filterFn\_lessThanOrEqualTo + +Filter function for checking if a number is less than or equal to a given number. + +## Functions + +- [resolveFilterValue](functions/resolveFilterValue.md) diff --git a/docs/reference/@tanstack/namespaces/filterFn_weakEquals/functions/autoRemove.md b/docs/reference/@tanstack/namespaces/filterFn_weakEquals/functions/autoRemove.md new file mode 100644 index 0000000000..dfd81b6bc8 --- /dev/null +++ b/docs/reference/@tanstack/namespaces/filterFn_weakEquals/functions/autoRemove.md @@ -0,0 +1,22 @@ +--- +id: autoRemove +title: autoRemove +--- + +# Function: autoRemove() + +```ts +function autoRemove(val): boolean; +``` + +Defined in: [fns/filterFns.ts:38](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L38) + +## Parameters + +### val + +`any` + +## Returns + +`boolean` diff --git a/docs/reference/@tanstack/namespaces/filterFn_weakEquals/index.md b/docs/reference/@tanstack/namespaces/filterFn_weakEquals/index.md new file mode 100644 index 0000000000..658aea77bf --- /dev/null +++ b/docs/reference/@tanstack/namespaces/filterFn_weakEquals/index.md @@ -0,0 +1,12 @@ +--- +id: filterFn_weakEquals +title: filterFn_weakEquals +--- + +# filterFn\_weakEquals + +Filter function for checking if a value is weakly equal to a given value. (JS == comparison) + +## Functions + +- [autoRemove](functions/autoRemove.md) diff --git a/docs/reference/functions/assignPrototypeAPIs.md b/docs/reference/functions/assignPrototypeAPIs.md new file mode 100644 index 0000000000..2676b92797 --- /dev/null +++ b/docs/reference/functions/assignPrototypeAPIs.md @@ -0,0 +1,62 @@ +--- +id: assignPrototypeAPIs +title: assignPrototypeAPIs +--- + +# Function: assignPrototypeAPIs() + +```ts +function assignPrototypeAPIs( + feature, + prototype, + table, + apis): void; +``` + +Defined in: [utils.ts:339](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L339) + +Assigns API methods to a prototype object for memory-efficient method sharing. +All instances created with this prototype will share the same method references. + +For memoized methods, the memo state is lazily created and stored on each instance. +This provides the best of both worlds: shared method code + per-instance caching. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TDeps + +`TDeps` *extends* readonly `any`[] + +### TDepArgs + +`TDepArgs` + +## Parameters + +### feature + +keyof `TFeatures` & `string` + +### prototype + +`Record`\<`string`, `any`\> + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### apis + +[`PrototypeAPIObject`](../type-aliases/PrototypeAPIObject.md)\<`TDeps`, [`NoInfer`](../type-aliases/NoInfer.md)\<`TDepArgs`\>\> + +## Returns + +`void` diff --git a/docs/reference/functions/assignTableAPIs.md b/docs/reference/functions/assignTableAPIs.md new file mode 100644 index 0000000000..cca846b169 --- /dev/null +++ b/docs/reference/functions/assignTableAPIs.md @@ -0,0 +1,54 @@ +--- +id: assignTableAPIs +title: assignTableAPIs +--- + +# Function: assignTableAPIs() + +```ts +function assignTableAPIs( + feature, + table, + apis): void; +``` + +Defined in: [utils.ts:297](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L297) + +Assigns Table API methods directly to the table instance. +Unlike row/cell/column/header, the table is a singleton so methods are assigned directly. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TDeps + +`TDeps` *extends* readonly `any`[] + +### TDepArgs + +`TDepArgs` + +## Parameters + +### feature + +keyof `TFeatures` & `string` + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### apis + +[`APIObject`](../type-aliases/APIObject.md)\<`TDeps`, [`NoInfer`](../type-aliases/NoInfer.md)\<`TDepArgs`\>\> + +## Returns + +`void` diff --git a/docs/reference/functions/buildHeaderGroups.md b/docs/reference/functions/buildHeaderGroups.md new file mode 100644 index 0000000000..fd8e1f000f --- /dev/null +++ b/docs/reference/functions/buildHeaderGroups.md @@ -0,0 +1,52 @@ +--- +id: buildHeaderGroups +title: buildHeaderGroups +--- + +# Function: buildHeaderGroups() + +```ts +function buildHeaderGroups( + allColumns, + columnsToGroup, + table, + headerFamily?): HeaderGroup[]; +``` + +Defined in: [core/headers/buildHeaderGroups.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/buildHeaderGroups.ts#L11) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### allColumns + +[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `TValue`\>[] + +### columnsToGroup + +[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `TValue`\>[] + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### headerFamily? + +`"left"` | `"right"` | `"center"` + +## Returns + +[`HeaderGroup`](../type-aliases/HeaderGroup.md)\<`TFeatures`, `TData`\>[] diff --git a/docs/reference/functions/callMemoOrStaticFn.md b/docs/reference/functions/callMemoOrStaticFn.md new file mode 100644 index 0000000000..88a7716149 --- /dev/null +++ b/docs/reference/functions/callMemoOrStaticFn.md @@ -0,0 +1,50 @@ +--- +id: callMemoOrStaticFn +title: callMemoOrStaticFn +--- + +# Function: callMemoOrStaticFn() + +```ts +function callMemoOrStaticFn( + obj, + fnKey, + staticFn, ... +args): ReturnType; +``` + +Defined in: [utils.ts:387](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L387) + +Looks to run the memoized function with the builder pattern on the object if it exists, otherwise fallback to the static method passed in. + +## Type Parameters + +### TObject + +`TObject` *extends* `Record`\<`string`, `any`\> + +### TStaticFn + +`TStaticFn` *extends* `AnyFunction` + +## Parameters + +### obj + +`TObject` + +### fnKey + +`string` + +### staticFn + +`TStaticFn` + +### args + +...`Parameters`\<`TStaticFn`\> *extends* \[`any`, `...Rest[]`\] ? `Rest` : `never` + +## Returns + +`ReturnType`\<`TStaticFn`\> diff --git a/docs/reference/functions/cell_getContext.md b/docs/reference/functions/cell_getContext.md new file mode 100644 index 0000000000..9a3c3f1594 --- /dev/null +++ b/docs/reference/functions/cell_getContext.md @@ -0,0 +1,80 @@ +--- +id: cell_getContext +title: cell_getContext +--- + +# Function: cell\_getContext() + +```ts +function cell_getContext(cell): object; +``` + +Defined in: [core/cells/coreCellsFeature.utils.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.utils.ts#L21) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### cell + +[`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +`object` + +### cell + +```ts +cell: Cell; +``` + +### column + +```ts +column: Column = cell.column; +``` + +### getValue() + +```ts +getValue: () => NoInfer; +``` + +#### Returns + +[`NoInfer`](../type-aliases/NoInfer.md)\<`TValue`\> + +### renderValue() + +```ts +renderValue: () => NoInfer; +``` + +#### Returns + +[`NoInfer`](../type-aliases/NoInfer.md)\<`TValue` \| `null`\> + +### row + +```ts +row: Row = cell.row; +``` + +### table + +```ts +table: Table_Internal = cell.table; +``` diff --git a/docs/reference/functions/cell_getIsAggregated.md b/docs/reference/functions/cell_getIsAggregated.md new file mode 100644 index 0000000000..b1c0cb9dfa --- /dev/null +++ b/docs/reference/functions/cell_getIsAggregated.md @@ -0,0 +1,36 @@ +--- +id: cell_getIsAggregated +title: cell_getIsAggregated +--- + +# Function: cell\_getIsAggregated() + +```ts +function cell_getIsAggregated(cell): boolean; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:182](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L182) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### cell + +[`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/cell_getIsGrouped.md b/docs/reference/functions/cell_getIsGrouped.md new file mode 100644 index 0000000000..206ec1acbd --- /dev/null +++ b/docs/reference/functions/cell_getIsGrouped.md @@ -0,0 +1,36 @@ +--- +id: cell_getIsGrouped +title: cell_getIsGrouped +--- + +# Function: cell\_getIsGrouped() + +```ts +function cell_getIsGrouped(cell): boolean; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:163](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L163) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### cell + +[`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/cell_getIsPlaceholder.md b/docs/reference/functions/cell_getIsPlaceholder.md new file mode 100644 index 0000000000..6932090db9 --- /dev/null +++ b/docs/reference/functions/cell_getIsPlaceholder.md @@ -0,0 +1,36 @@ +--- +id: cell_getIsPlaceholder +title: cell_getIsPlaceholder +--- + +# Function: cell\_getIsPlaceholder() + +```ts +function cell_getIsPlaceholder(cell): boolean; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:174](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L174) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### cell + +[`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/cell_getValue.md b/docs/reference/functions/cell_getValue.md new file mode 100644 index 0000000000..21951dad30 --- /dev/null +++ b/docs/reference/functions/cell_getValue.md @@ -0,0 +1,36 @@ +--- +id: cell_getValue +title: cell_getValue +--- + +# Function: cell\_getValue() + +```ts +function cell_getValue(cell): TValue; +``` + +Defined in: [core/cells/coreCellsFeature.utils.ts:5](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.utils.ts#L5) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### cell + +[`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +`TValue` diff --git a/docs/reference/functions/cell_renderValue.md b/docs/reference/functions/cell_renderValue.md new file mode 100644 index 0000000000..00771496dd --- /dev/null +++ b/docs/reference/functions/cell_renderValue.md @@ -0,0 +1,36 @@ +--- +id: cell_renderValue +title: cell_renderValue +--- + +# Function: cell\_renderValue() + +```ts +function cell_renderValue(cell): any; +``` + +Defined in: [core/cells/coreCellsFeature.utils.ts:13](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.utils.ts#L13) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### cell + +[`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +`any` diff --git a/docs/reference/functions/column_clearSorting.md b/docs/reference/functions/column_clearSorting.md new file mode 100644 index 0000000000..c9e1147818 --- /dev/null +++ b/docs/reference/functions/column_clearSorting.md @@ -0,0 +1,36 @@ +--- +id: column_clearSorting +title: column_clearSorting +--- + +# Function: column\_clearSorting() + +```ts +function column_clearSorting(column): void; +``` + +Defined in: [features/row-sorting/rowSortingFeature.utils.ts:290](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L290) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +`void` diff --git a/docs/reference/functions/column_getAfter.md b/docs/reference/functions/column_getAfter.md new file mode 100644 index 0000000000..7113e1b6ef --- /dev/null +++ b/docs/reference/functions/column_getAfter.md @@ -0,0 +1,40 @@ +--- +id: column_getAfter +title: column_getAfter +--- + +# Function: column\_getAfter() + +```ts +function column_getAfter(column, position): number; +``` + +Defined in: [features/column-sizing/columnSizingFeature.utils.ts:66](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L66) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +### position + +[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) | `"center"` + +## Returns + +`number` diff --git a/docs/reference/functions/column_getAggregationFn.md b/docs/reference/functions/column_getAggregationFn.md new file mode 100644 index 0000000000..fe15ad30f0 --- /dev/null +++ b/docs/reference/functions/column_getAggregationFn.md @@ -0,0 +1,39 @@ +--- +id: column_getAggregationFn +title: column_getAggregationFn +--- + +# Function: column\_getAggregationFn() + +```ts +function column_getAggregationFn(column): + | AggregationFn + | undefined; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:97](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L97) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + + \| [`AggregationFn`](../type-aliases/AggregationFn.md)\<`TFeatures`, `TData`\> + \| `undefined` diff --git a/docs/reference/functions/column_getAutoAggregationFn.md b/docs/reference/functions/column_getAutoAggregationFn.md new file mode 100644 index 0000000000..2e87a647f3 --- /dev/null +++ b/docs/reference/functions/column_getAutoAggregationFn.md @@ -0,0 +1,39 @@ +--- +id: column_getAutoAggregationFn +title: column_getAutoAggregationFn +--- + +# Function: column\_getAutoAggregationFn() + +```ts +function column_getAutoAggregationFn(column): + | AggregationFn + | undefined; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L75) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + + \| [`AggregationFn`](../type-aliases/AggregationFn.md)\<`TFeatures`, `TData`\> + \| `undefined` diff --git a/docs/reference/functions/column_getAutoFilterFn.md b/docs/reference/functions/column_getAutoFilterFn.md new file mode 100644 index 0000000000..d0e91aca07 --- /dev/null +++ b/docs/reference/functions/column_getAutoFilterFn.md @@ -0,0 +1,39 @@ +--- +id: column_getAutoFilterFn +title: column_getAutoFilterFn +--- + +# Function: column\_getAutoFilterFn() + +```ts +function column_getAutoFilterFn(column): + | FilterFn + | undefined; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L15) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + + \| [`FilterFn`](../interfaces/FilterFn.md)\<`TFeatures`, `TData`\> + \| `undefined` diff --git a/docs/reference/functions/column_getAutoSortDir.md b/docs/reference/functions/column_getAutoSortDir.md new file mode 100644 index 0000000000..aa1a74d370 --- /dev/null +++ b/docs/reference/functions/column_getAutoSortDir.md @@ -0,0 +1,36 @@ +--- +id: column_getAutoSortDir +title: column_getAutoSortDir +--- + +# Function: column\_getAutoSortDir() + +```ts +function column_getAutoSortDir(column): "asc" | "desc"; +``` + +Defined in: [features/row-sorting/rowSortingFeature.utils.ts:76](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L76) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +`"asc"` \| `"desc"` diff --git a/docs/reference/functions/column_getAutoSortFn.md b/docs/reference/functions/column_getAutoSortFn.md new file mode 100644 index 0000000000..526f4bf412 --- /dev/null +++ b/docs/reference/functions/column_getAutoSortFn.md @@ -0,0 +1,36 @@ +--- +id: column_getAutoSortFn +title: column_getAutoSortFn +--- + +# Function: column\_getAutoSortFn() + +```ts +function column_getAutoSortFn(column): SortFn; +``` + +Defined in: [features/row-sorting/rowSortingFeature.utils.ts:38](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L38) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +[`SortFn`](../interfaces/SortFn.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/column_getCanFilter.md b/docs/reference/functions/column_getCanFilter.md new file mode 100644 index 0000000000..60fd8ee0cb --- /dev/null +++ b/docs/reference/functions/column_getCanFilter.md @@ -0,0 +1,36 @@ +--- +id: column_getCanFilter +title: column_getCanFilter +--- + +# Function: column\_getCanFilter() + +```ts +function column_getCanFilter(column): boolean; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:77](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L77) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/column_getCanGlobalFilter.md b/docs/reference/functions/column_getCanGlobalFilter.md new file mode 100644 index 0000000000..2b7becd5c5 --- /dev/null +++ b/docs/reference/functions/column_getCanGlobalFilter.md @@ -0,0 +1,36 @@ +--- +id: column_getCanGlobalFilter +title: column_getCanGlobalFilter +--- + +# Function: column\_getCanGlobalFilter() + +```ts +function column_getCanGlobalFilter(column): boolean; +``` + +Defined in: [features/global-filtering/globalFilteringFeature.utils.ts:9](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.utils.ts#L9) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/column_getCanGroup.md b/docs/reference/functions/column_getCanGroup.md new file mode 100644 index 0000000000..4e9522305f --- /dev/null +++ b/docs/reference/functions/column_getCanGroup.md @@ -0,0 +1,36 @@ +--- +id: column_getCanGroup +title: column_getCanGroup +--- + +# Function: column\_getCanGroup() + +```ts +function column_getCanGroup(column): boolean; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L34) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/column_getCanHide.md b/docs/reference/functions/column_getCanHide.md new file mode 100644 index 0000000000..8225ced472 --- /dev/null +++ b/docs/reference/functions/column_getCanHide.md @@ -0,0 +1,36 @@ +--- +id: column_getCanHide +title: column_getCanHide +--- + +# Function: column\_getCanHide() + +```ts +function column_getCanHide(column): boolean; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:44](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L44) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/column_getCanMultiSort.md b/docs/reference/functions/column_getCanMultiSort.md new file mode 100644 index 0000000000..0aa5fb4b53 --- /dev/null +++ b/docs/reference/functions/column_getCanMultiSort.md @@ -0,0 +1,36 @@ +--- +id: column_getCanMultiSort +title: column_getCanMultiSort +--- + +# Function: column\_getCanMultiSort() + +```ts +function column_getCanMultiSort(column): boolean; +``` + +Defined in: [features/row-sorting/rowSortingFeature.utils.ts:257](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L257) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/column_getCanPin.md b/docs/reference/functions/column_getCanPin.md new file mode 100644 index 0000000000..119086322e --- /dev/null +++ b/docs/reference/functions/column_getCanPin.md @@ -0,0 +1,36 @@ +--- +id: column_getCanPin +title: column_getCanPin +--- + +# Function: column\_getCanPin() + +```ts +function column_getCanPin(column): boolean; +``` + +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:69](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L69) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/column_getCanResize.md b/docs/reference/functions/column_getCanResize.md new file mode 100644 index 0000000000..0f4216e4b4 --- /dev/null +++ b/docs/reference/functions/column_getCanResize.md @@ -0,0 +1,36 @@ +--- +id: column_getCanResize +title: column_getCanResize +--- + +# Function: column\_getCanResize() + +```ts +function column_getCanResize(column): boolean; +``` + +Defined in: [features/column-resizing/columnResizingFeature.utils.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L26) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/column_getCanSort.md b/docs/reference/functions/column_getCanSort.md new file mode 100644 index 0000000000..3757e5b19e --- /dev/null +++ b/docs/reference/functions/column_getCanSort.md @@ -0,0 +1,36 @@ +--- +id: column_getCanSort +title: column_getCanSort +--- + +# Function: column\_getCanSort() + +```ts +function column_getCanSort(column): boolean; +``` + +Defined in: [features/row-sorting/rowSortingFeature.utils.ts:245](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L245) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/column_getFacetedMinMaxValues.md b/docs/reference/functions/column_getFacetedMinMaxValues.md new file mode 100644 index 0000000000..b48e87a990 --- /dev/null +++ b/docs/reference/functions/column_getFacetedMinMaxValues.md @@ -0,0 +1,40 @@ +--- +id: column_getFacetedMinMaxValues +title: column_getFacetedMinMaxValues +--- + +# Function: column\_getFacetedMinMaxValues() + +```ts +function column_getFacetedMinMaxValues(column, table): [number, number] | undefined; +``` + +Defined in: [features/column-faceting/columnFacetingFeature.utils.ts:7](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.utils.ts#L7) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +\[`number`, `number`\] \| `undefined` diff --git a/docs/reference/functions/column_getFacetedRowModel.md b/docs/reference/functions/column_getFacetedRowModel.md new file mode 100644 index 0000000000..850244c3a6 --- /dev/null +++ b/docs/reference/functions/column_getFacetedRowModel.md @@ -0,0 +1,40 @@ +--- +id: column_getFacetedRowModel +title: column_getFacetedRowModel +--- + +# Function: column\_getFacetedRowModel() + +```ts +function column_getFacetedRowModel(column, table): RowModel; +``` + +Defined in: [features/column-faceting/columnFacetingFeature.utils.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.utils.ts#L21) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> | `undefined` + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/column_getFacetedUniqueValues.md b/docs/reference/functions/column_getFacetedUniqueValues.md new file mode 100644 index 0000000000..60a3e97389 --- /dev/null +++ b/docs/reference/functions/column_getFacetedUniqueValues.md @@ -0,0 +1,40 @@ +--- +id: column_getFacetedUniqueValues +title: column_getFacetedUniqueValues +--- + +# Function: column\_getFacetedUniqueValues() + +```ts +function column_getFacetedUniqueValues(column, table): Map; +``` + +Defined in: [features/column-faceting/columnFacetingFeature.utils.ts:35](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.utils.ts#L35) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`Map`\<`any`, `number`\> diff --git a/docs/reference/functions/column_getFilterFn.md b/docs/reference/functions/column_getFilterFn.md new file mode 100644 index 0000000000..f44c1bedfc --- /dev/null +++ b/docs/reference/functions/column_getFilterFn.md @@ -0,0 +1,39 @@ +--- +id: column_getFilterFn +title: column_getFilterFn +--- + +# Function: column\_getFilterFn() + +```ts +function column_getFilterFn(column): + | FilterFn + | undefined; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:51](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L51) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + + \| [`FilterFn`](../interfaces/FilterFn.md)\<`TFeatures`, `TData`\> + \| `undefined` diff --git a/docs/reference/functions/column_getFilterIndex.md b/docs/reference/functions/column_getFilterIndex.md new file mode 100644 index 0000000000..838a6a1630 --- /dev/null +++ b/docs/reference/functions/column_getFilterIndex.md @@ -0,0 +1,36 @@ +--- +id: column_getFilterIndex +title: column_getFilterIndex +--- + +# Function: column\_getFilterIndex() + +```ts +function column_getFilterIndex(column): number; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:107](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L107) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +`number` diff --git a/docs/reference/functions/column_getFilterValue.md b/docs/reference/functions/column_getFilterValue.md new file mode 100644 index 0000000000..a9725f7900 --- /dev/null +++ b/docs/reference/functions/column_getFilterValue.md @@ -0,0 +1,36 @@ +--- +id: column_getFilterValue +title: column_getFilterValue +--- + +# Function: column\_getFilterValue() + +```ts +function column_getFilterValue(column): unknown; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:98](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L98) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +`unknown` diff --git a/docs/reference/functions/column_getFirstSortDir.md b/docs/reference/functions/column_getFirstSortDir.md new file mode 100644 index 0000000000..f99169329b --- /dev/null +++ b/docs/reference/functions/column_getFirstSortDir.md @@ -0,0 +1,36 @@ +--- +id: column_getFirstSortDir +title: column_getFirstSortDir +--- + +# Function: column\_getFirstSortDir() + +```ts +function column_getFirstSortDir(column): "asc" | "desc"; +``` + +Defined in: [features/row-sorting/rowSortingFeature.utils.ts:211](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L211) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +`"asc"` \| `"desc"` diff --git a/docs/reference/functions/column_getFlatColumns.md b/docs/reference/functions/column_getFlatColumns.md new file mode 100644 index 0000000000..36bf4e8720 --- /dev/null +++ b/docs/reference/functions/column_getFlatColumns.md @@ -0,0 +1,36 @@ +--- +id: column_getFlatColumns +title: column_getFlatColumns +--- + +# Function: column\_getFlatColumns() + +```ts +function column_getFlatColumns(column): Column[]; +``` + +Defined in: [core/columns/coreColumnsFeature.utils.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L14) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `TValue`\>[] diff --git a/docs/reference/functions/column_getGroupedIndex.md b/docs/reference/functions/column_getGroupedIndex.md new file mode 100644 index 0000000000..8e4305ce24 --- /dev/null +++ b/docs/reference/functions/column_getGroupedIndex.md @@ -0,0 +1,36 @@ +--- +id: column_getGroupedIndex +title: column_getGroupedIndex +--- + +# Function: column\_getGroupedIndex() + +```ts +function column_getGroupedIndex(column): number; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:54](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L54) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +`number` diff --git a/docs/reference/functions/column_getIndex.md b/docs/reference/functions/column_getIndex.md new file mode 100644 index 0000000000..7d62bfcf53 --- /dev/null +++ b/docs/reference/functions/column_getIndex.md @@ -0,0 +1,40 @@ +--- +id: column_getIndex +title: column_getIndex +--- + +# Function: column\_getIndex() + +```ts +function column_getIndex(column, position?): number; +``` + +Defined in: [features/column-ordering/columnOrderingFeature.utils.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L14) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +### position? + +[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) | `"center"` + +## Returns + +`number` diff --git a/docs/reference/functions/column_getIsFiltered.md b/docs/reference/functions/column_getIsFiltered.md new file mode 100644 index 0000000000..b683e226e0 --- /dev/null +++ b/docs/reference/functions/column_getIsFiltered.md @@ -0,0 +1,36 @@ +--- +id: column_getIsFiltered +title: column_getIsFiltered +--- + +# Function: column\_getIsFiltered() + +```ts +function column_getIsFiltered(column): boolean; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:90](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L90) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/column_getIsFirstColumn.md b/docs/reference/functions/column_getIsFirstColumn.md new file mode 100644 index 0000000000..e3930acb51 --- /dev/null +++ b/docs/reference/functions/column_getIsFirstColumn.md @@ -0,0 +1,40 @@ +--- +id: column_getIsFirstColumn +title: column_getIsFirstColumn +--- + +# Function: column\_getIsFirstColumn() + +```ts +function column_getIsFirstColumn(column, position?): boolean; +``` + +Defined in: [features/column-ordering/columnOrderingFeature.utils.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L26) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +### position? + +[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) | `"center"` + +## Returns + +`boolean` diff --git a/docs/reference/functions/column_getIsGrouped.md b/docs/reference/functions/column_getIsGrouped.md new file mode 100644 index 0000000000..4a504e4840 --- /dev/null +++ b/docs/reference/functions/column_getIsGrouped.md @@ -0,0 +1,36 @@ +--- +id: column_getIsGrouped +title: column_getIsGrouped +--- + +# Function: column\_getIsGrouped() + +```ts +function column_getIsGrouped(column): boolean; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:46](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L46) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/column_getIsLastColumn.md b/docs/reference/functions/column_getIsLastColumn.md new file mode 100644 index 0000000000..94c37f255f --- /dev/null +++ b/docs/reference/functions/column_getIsLastColumn.md @@ -0,0 +1,40 @@ +--- +id: column_getIsLastColumn +title: column_getIsLastColumn +--- + +# Function: column\_getIsLastColumn() + +```ts +function column_getIsLastColumn(column, position?): boolean; +``` + +Defined in: [features/column-ordering/columnOrderingFeature.utils.ts:38](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L38) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +### position? + +[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) | `"center"` + +## Returns + +`boolean` diff --git a/docs/reference/functions/column_getIsPinned.md b/docs/reference/functions/column_getIsPinned.md new file mode 100644 index 0000000000..f53c19455c --- /dev/null +++ b/docs/reference/functions/column_getIsPinned.md @@ -0,0 +1,36 @@ +--- +id: column_getIsPinned +title: column_getIsPinned +--- + +# Function: column\_getIsPinned() + +```ts +function column_getIsPinned(column): ColumnPinningPosition; +``` + +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:85](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L85) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) diff --git a/docs/reference/functions/column_getIsResizing.md b/docs/reference/functions/column_getIsResizing.md new file mode 100644 index 0000000000..b4492cd782 --- /dev/null +++ b/docs/reference/functions/column_getIsResizing.md @@ -0,0 +1,36 @@ +--- +id: column_getIsResizing +title: column_getIsResizing +--- + +# Function: column\_getIsResizing() + +```ts +function column_getIsResizing(column): boolean; +``` + +Defined in: [features/column-resizing/columnResizingFeature.utils.ts:37](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L37) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/column_getIsSorted.md b/docs/reference/functions/column_getIsSorted.md new file mode 100644 index 0000000000..db76a9a73c --- /dev/null +++ b/docs/reference/functions/column_getIsSorted.md @@ -0,0 +1,36 @@ +--- +id: column_getIsSorted +title: column_getIsSorted +--- + +# Function: column\_getIsSorted() + +```ts +function column_getIsSorted(column): false | SortDirection; +``` + +Defined in: [features/row-sorting/rowSortingFeature.utils.ts:269](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L269) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +`false` \| [`SortDirection`](../type-aliases/SortDirection.md) diff --git a/docs/reference/functions/column_getIsVisible.md b/docs/reference/functions/column_getIsVisible.md new file mode 100644 index 0000000000..499c9b2b1c --- /dev/null +++ b/docs/reference/functions/column_getIsVisible.md @@ -0,0 +1,36 @@ +--- +id: column_getIsVisible +title: column_getIsVisible +--- + +# Function: column\_getIsVisible() + +```ts +function column_getIsVisible(column): boolean; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:29](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L29) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/column_getLeafColumns.md b/docs/reference/functions/column_getLeafColumns.md new file mode 100644 index 0000000000..6e4c0d4785 --- /dev/null +++ b/docs/reference/functions/column_getLeafColumns.md @@ -0,0 +1,36 @@ +--- +id: column_getLeafColumns +title: column_getLeafColumns +--- + +# Function: column\_getLeafColumns() + +```ts +function column_getLeafColumns(column): Column[]; +``` + +Defined in: [core/columns/coreColumnsFeature.utils.ts:24](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L24) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `TValue`\>[] diff --git a/docs/reference/functions/column_getNextSortingOrder.md b/docs/reference/functions/column_getNextSortingOrder.md new file mode 100644 index 0000000000..984bf4b472 --- /dev/null +++ b/docs/reference/functions/column_getNextSortingOrder.md @@ -0,0 +1,40 @@ +--- +id: column_getNextSortingOrder +title: column_getNextSortingOrder +--- + +# Function: column\_getNextSortingOrder() + +```ts +function column_getNextSortingOrder(column, multi?): false | "asc" | "desc"; +``` + +Defined in: [features/row-sorting/rowSortingFeature.utils.ts:223](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L223) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +### multi? + +`boolean` + +## Returns + +`false` \| `"asc"` \| `"desc"` diff --git a/docs/reference/functions/column_getPinnedIndex.md b/docs/reference/functions/column_getPinnedIndex.md new file mode 100644 index 0000000000..4be1704553 --- /dev/null +++ b/docs/reference/functions/column_getPinnedIndex.md @@ -0,0 +1,36 @@ +--- +id: column_getPinnedIndex +title: column_getPinnedIndex +--- + +# Function: column\_getPinnedIndex() + +```ts +function column_getPinnedIndex(column): number; +``` + +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:103](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L103) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +`number` diff --git a/docs/reference/functions/column_getSize.md b/docs/reference/functions/column_getSize.md new file mode 100644 index 0000000000..4dd6ab902e --- /dev/null +++ b/docs/reference/functions/column_getSize.md @@ -0,0 +1,36 @@ +--- +id: column_getSize +title: column_getSize +--- + +# Function: column\_getSize() + +```ts +function column_getSize(column): number; +``` + +Defined in: [features/column-sizing/columnSizingFeature.utils.ts:29](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L29) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +`number` diff --git a/docs/reference/functions/column_getSortFn.md b/docs/reference/functions/column_getSortFn.md new file mode 100644 index 0000000000..2ad1198852 --- /dev/null +++ b/docs/reference/functions/column_getSortFn.md @@ -0,0 +1,36 @@ +--- +id: column_getSortFn +title: column_getSortFn +--- + +# Function: column\_getSortFn() + +```ts +function column_getSortFn(column): SortFn; +``` + +Defined in: [features/row-sorting/rowSortingFeature.utils.ts:92](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L92) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +[`SortFn`](../interfaces/SortFn.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/column_getSortIndex.md b/docs/reference/functions/column_getSortIndex.md new file mode 100644 index 0000000000..c7c8807971 --- /dev/null +++ b/docs/reference/functions/column_getSortIndex.md @@ -0,0 +1,36 @@ +--- +id: column_getSortIndex +title: column_getSortIndex +--- + +# Function: column\_getSortIndex() + +```ts +function column_getSortIndex(column): number; +``` + +Defined in: [features/row-sorting/rowSortingFeature.utils.ts:280](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L280) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +`number` diff --git a/docs/reference/functions/column_getStart.md b/docs/reference/functions/column_getStart.md new file mode 100644 index 0000000000..591c0cb885 --- /dev/null +++ b/docs/reference/functions/column_getStart.md @@ -0,0 +1,40 @@ +--- +id: column_getStart +title: column_getStart +--- + +# Function: column\_getStart() + +```ts +function column_getStart(column, position): number; +``` + +Defined in: [features/column-sizing/columnSizingFeature.utils.ts:46](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L46) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +### position + +[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) | `"center"` + +## Returns + +`number` diff --git a/docs/reference/functions/column_getToggleGroupingHandler.md b/docs/reference/functions/column_getToggleGroupingHandler.md new file mode 100644 index 0000000000..d3da4ab9ec --- /dev/null +++ b/docs/reference/functions/column_getToggleGroupingHandler.md @@ -0,0 +1,42 @@ +--- +id: column_getToggleGroupingHandler +title: column_getToggleGroupingHandler +--- + +# Function: column\_getToggleGroupingHandler() + +```ts +function column_getToggleGroupingHandler(column): () => void; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:62](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L62) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +```ts +(): void; +``` + +### Returns + +`void` diff --git a/docs/reference/functions/column_getToggleSortingHandler.md b/docs/reference/functions/column_getToggleSortingHandler.md new file mode 100644 index 0000000000..96319ac168 --- /dev/null +++ b/docs/reference/functions/column_getToggleSortingHandler.md @@ -0,0 +1,48 @@ +--- +id: column_getToggleSortingHandler +title: column_getToggleSortingHandler +--- + +# Function: column\_getToggleSortingHandler() + +```ts +function column_getToggleSortingHandler(column): (e) => void; +``` + +Defined in: [features/row-sorting/rowSortingFeature.utils.ts:301](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L301) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +```ts +(e): void; +``` + +### Parameters + +#### e + +`unknown` + +### Returns + +`void` diff --git a/docs/reference/functions/column_getToggleVisibilityHandler.md b/docs/reference/functions/column_getToggleVisibilityHandler.md new file mode 100644 index 0000000000..e1e4e2d134 --- /dev/null +++ b/docs/reference/functions/column_getToggleVisibilityHandler.md @@ -0,0 +1,48 @@ +--- +id: column_getToggleVisibilityHandler +title: column_getToggleVisibilityHandler +--- + +# Function: column\_getToggleVisibilityHandler() + +```ts +function column_getToggleVisibilityHandler(column): (e) => void; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:55](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L55) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +```ts +(e): void; +``` + +### Parameters + +#### e + +`unknown` + +### Returns + +`void` diff --git a/docs/reference/functions/column_pin.md b/docs/reference/functions/column_pin.md new file mode 100644 index 0000000000..e3842b67be --- /dev/null +++ b/docs/reference/functions/column_pin.md @@ -0,0 +1,40 @@ +--- +id: column_pin +title: column_pin +--- + +# Function: column\_pin() + +```ts +function column_pin(column, position): void; +``` + +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:31](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L31) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +### position + +[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) + +## Returns + +`void` diff --git a/docs/reference/functions/column_resetSize.md b/docs/reference/functions/column_resetSize.md new file mode 100644 index 0000000000..0ef587d646 --- /dev/null +++ b/docs/reference/functions/column_resetSize.md @@ -0,0 +1,36 @@ +--- +id: column_resetSize +title: column_resetSize +--- + +# Function: column\_resetSize() + +```ts +function column_resetSize(column): void; +``` + +Defined in: [features/column-sizing/columnSizingFeature.utils.ts:88](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L88) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +`void` diff --git a/docs/reference/functions/column_setFilterValue.md b/docs/reference/functions/column_setFilterValue.md new file mode 100644 index 0000000000..b5bdc46725 --- /dev/null +++ b/docs/reference/functions/column_setFilterValue.md @@ -0,0 +1,40 @@ +--- +id: column_setFilterValue +title: column_setFilterValue +--- + +# Function: column\_setFilterValue() + +```ts +function column_setFilterValue(column, value): void; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:119](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L119) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +### value + +`any` + +## Returns + +`void` diff --git a/docs/reference/functions/column_toggleGrouping.md b/docs/reference/functions/column_toggleGrouping.md new file mode 100644 index 0000000000..1dfad1a5d9 --- /dev/null +++ b/docs/reference/functions/column_toggleGrouping.md @@ -0,0 +1,36 @@ +--- +id: column_toggleGrouping +title: column_toggleGrouping +--- + +# Function: column\_toggleGrouping() + +```ts +function column_toggleGrouping(column): void; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:19](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L19) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +`void` diff --git a/docs/reference/functions/column_toggleSorting.md b/docs/reference/functions/column_toggleSorting.md new file mode 100644 index 0000000000..ca74d949b7 --- /dev/null +++ b/docs/reference/functions/column_toggleSorting.md @@ -0,0 +1,47 @@ +--- +id: column_toggleSorting +title: column_toggleSorting +--- + +# Function: column\_toggleSorting() + +```ts +function column_toggleSorting( + column, + desc?, + multi?): void; +``` + +Defined in: [features/row-sorting/rowSortingFeature.utils.ts:108](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L108) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +### desc? + +`boolean` + +### multi? + +`boolean` + +## Returns + +`void` diff --git a/docs/reference/functions/column_toggleVisibility.md b/docs/reference/functions/column_toggleVisibility.md new file mode 100644 index 0000000000..fff5b680a6 --- /dev/null +++ b/docs/reference/functions/column_toggleVisibility.md @@ -0,0 +1,40 @@ +--- +id: column_toggleVisibility +title: column_toggleVisibility +--- + +# Function: column\_toggleVisibility() + +```ts +function column_toggleVisibility(column, visible?): void; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L14) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +### visible? + +`boolean` + +## Returns + +`void` diff --git a/docs/reference/functions/constructCell.md b/docs/reference/functions/constructCell.md new file mode 100644 index 0000000000..60628d4945 --- /dev/null +++ b/docs/reference/functions/constructCell.md @@ -0,0 +1,47 @@ +--- +id: constructCell +title: constructCell +--- + +# Function: constructCell() + +```ts +function constructCell( + column, + row, +table): Cell; +``` + +Defined in: [core/cells/constructCell.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/constructCell.ts#L26) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### column + +[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `TValue`\> + +### row + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +[`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `TValue`\> diff --git a/docs/reference/functions/constructColumn.md b/docs/reference/functions/constructColumn.md new file mode 100644 index 0000000000..800eb52ac1 --- /dev/null +++ b/docs/reference/functions/constructColumn.md @@ -0,0 +1,52 @@ +--- +id: constructColumn +title: constructColumn +--- + +# Function: constructColumn() + +```ts +function constructColumn( + table, + columnDef, + depth, +parent?): Column; +``` + +Defined in: [core/columns/constructColumn.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/constructColumn.ts#L30) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### columnDef + +[`ColumnDef`](../type-aliases/ColumnDef.md)\<`TFeatures`, `TData`, `TValue`\> + +### depth + +`number` + +### parent? + +[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `TValue`\> diff --git a/docs/reference/functions/constructColumnFacetingFeature.md b/docs/reference/functions/constructColumnFacetingFeature.md new file mode 100644 index 0000000000..52fbfdfc7c --- /dev/null +++ b/docs/reference/functions/constructColumnFacetingFeature.md @@ -0,0 +1,26 @@ +--- +id: constructColumnFacetingFeature +title: constructColumnFacetingFeature +--- + +# Function: constructColumnFacetingFeature() + +```ts +function constructColumnFacetingFeature(): TableFeature>; +``` + +Defined in: [features/column-faceting/columnFacetingFeature.ts:32](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.ts#L32) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Returns + +[`TableFeature`](../interfaces/TableFeature.md)\<`ColumnFacetingFeatureConstructors`\<`TFeatures`, `TData`\>\> diff --git a/docs/reference/functions/constructColumnFilteringFeature.md b/docs/reference/functions/constructColumnFilteringFeature.md new file mode 100644 index 0000000000..6f9f9b40a1 --- /dev/null +++ b/docs/reference/functions/constructColumnFilteringFeature.md @@ -0,0 +1,26 @@ +--- +id: constructColumnFilteringFeature +title: constructColumnFilteringFeature +--- + +# Function: constructColumnFilteringFeature() + +```ts +function constructColumnFilteringFeature(): TableFeature>; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.ts:47](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.ts#L47) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Returns + +[`TableFeature`](../interfaces/TableFeature.md)\<`ColumnFilteringFeatureConstructors`\<`TFeatures`, `TData`\>\> diff --git a/docs/reference/functions/constructColumnGroupingFeature.md b/docs/reference/functions/constructColumnGroupingFeature.md new file mode 100644 index 0000000000..1050cc7725 --- /dev/null +++ b/docs/reference/functions/constructColumnGroupingFeature.md @@ -0,0 +1,26 @@ +--- +id: constructColumnGroupingFeature +title: constructColumnGroupingFeature +--- + +# Function: constructColumnGroupingFeature() + +```ts +function constructColumnGroupingFeature(): TableFeature>; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.ts:54](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.ts#L54) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Returns + +[`TableFeature`](../interfaces/TableFeature.md)\<`ColumnGroupingFeatureConstructors`\<`TFeatures`, `TData`\>\> diff --git a/docs/reference/functions/constructColumnOrderingFeature.md b/docs/reference/functions/constructColumnOrderingFeature.md new file mode 100644 index 0000000000..2c99523fc2 --- /dev/null +++ b/docs/reference/functions/constructColumnOrderingFeature.md @@ -0,0 +1,26 @@ +--- +id: constructColumnOrderingFeature +title: constructColumnOrderingFeature +--- + +# Function: constructColumnOrderingFeature() + +```ts +function constructColumnOrderingFeature(): TableFeature>; +``` + +Defined in: [features/column-ordering/columnOrderingFeature.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.ts#L34) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Returns + +[`TableFeature`](../interfaces/TableFeature.md)\<`ColumnOrderingFeatureConstructors`\<`TFeatures`, `TData`\>\> diff --git a/docs/reference/functions/constructColumnPinningFeature.md b/docs/reference/functions/constructColumnPinningFeature.md new file mode 100644 index 0000000000..4e9933c73f --- /dev/null +++ b/docs/reference/functions/constructColumnPinningFeature.md @@ -0,0 +1,26 @@ +--- +id: constructColumnPinningFeature +title: constructColumnPinningFeature +--- + +# Function: constructColumnPinningFeature() + +```ts +function constructColumnPinningFeature(): TableFeature>; +``` + +Defined in: [features/column-pinning/columnPinningFeature.ts:62](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.ts#L62) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Returns + +[`TableFeature`](../interfaces/TableFeature.md)\<`ColumnPinningFeatureConstructors`\<`TFeatures`, `TData`\>\> diff --git a/docs/reference/functions/constructColumnResizingFeature.md b/docs/reference/functions/constructColumnResizingFeature.md new file mode 100644 index 0000000000..73df8670c2 --- /dev/null +++ b/docs/reference/functions/constructColumnResizingFeature.md @@ -0,0 +1,26 @@ +--- +id: constructColumnResizingFeature +title: constructColumnResizingFeature +--- + +# Function: constructColumnResizingFeature() + +```ts +function constructColumnResizingFeature(): TableFeature>; +``` + +Defined in: [features/column-resizing/columnResizingFeature.ts:35](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.ts#L35) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Returns + +[`TableFeature`](../interfaces/TableFeature.md)\<`ColumnResizingFeatureConstructors`\<`TFeatures`, `TData`\>\> diff --git a/docs/reference/functions/constructColumnSizingFeature.md b/docs/reference/functions/constructColumnSizingFeature.md new file mode 100644 index 0000000000..2c8731bb9d --- /dev/null +++ b/docs/reference/functions/constructColumnSizingFeature.md @@ -0,0 +1,26 @@ +--- +id: constructColumnSizingFeature +title: constructColumnSizingFeature +--- + +# Function: constructColumnSizingFeature() + +```ts +function constructColumnSizingFeature(): TableFeature>; +``` + +Defined in: [features/column-sizing/columnSizingFeature.ts:47](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.ts#L47) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Returns + +[`TableFeature`](../interfaces/TableFeature.md)\<`ColumnSizingFeatureConstructors`\<`TFeatures`, `TData`\>\> diff --git a/docs/reference/functions/constructColumnVisibilityFeature.md b/docs/reference/functions/constructColumnVisibilityFeature.md new file mode 100644 index 0000000000..032bd84e93 --- /dev/null +++ b/docs/reference/functions/constructColumnVisibilityFeature.md @@ -0,0 +1,26 @@ +--- +id: constructColumnVisibilityFeature +title: constructColumnVisibilityFeature +--- + +# Function: constructColumnVisibilityFeature() + +```ts +function constructColumnVisibilityFeature(): TableFeature>; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.ts:51](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.ts#L51) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Returns + +[`TableFeature`](../interfaces/TableFeature.md)\<`ColumnVisibilityFeatureConstructors`\<`TFeatures`, `TData`\>\> diff --git a/docs/reference/functions/constructCoreCellsFeature.md b/docs/reference/functions/constructCoreCellsFeature.md new file mode 100644 index 0000000000..9f657586ca --- /dev/null +++ b/docs/reference/functions/constructCoreCellsFeature.md @@ -0,0 +1,26 @@ +--- +id: constructCoreCellsFeature +title: constructCoreCellsFeature +--- + +# Function: constructCoreCellsFeature() + +```ts +function constructCoreCellsFeature(): TableFeature>; +``` + +Defined in: [core/cells/coreCellsFeature.ts:19](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.ts#L19) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Returns + +[`TableFeature`](../interfaces/TableFeature.md)\<`CoreCellsFeatureConstructors`\<`TFeatures`, `TData`\>\> diff --git a/docs/reference/functions/constructCoreColumnsFeature.md b/docs/reference/functions/constructCoreColumnsFeature.md new file mode 100644 index 0000000000..0d0d077608 --- /dev/null +++ b/docs/reference/functions/constructCoreColumnsFeature.md @@ -0,0 +1,26 @@ +--- +id: constructCoreColumnsFeature +title: constructCoreColumnsFeature +--- + +# Function: constructCoreColumnsFeature() + +```ts +function constructCoreColumnsFeature(): TableFeature>; +``` + +Defined in: [core/columns/coreColumnsFeature.ts:29](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.ts#L29) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Returns + +[`TableFeature`](../interfaces/TableFeature.md)\<`CoreColumnsFeatureConstructors`\<`TFeatures`, `TData`\>\> diff --git a/docs/reference/functions/constructCoreHeadersFeature.md b/docs/reference/functions/constructCoreHeadersFeature.md new file mode 100644 index 0000000000..d7ba8b8111 --- /dev/null +++ b/docs/reference/functions/constructCoreHeadersFeature.md @@ -0,0 +1,26 @@ +--- +id: constructCoreHeadersFeature +title: constructCoreHeadersFeature +--- + +# Function: constructCoreHeadersFeature() + +```ts +function constructCoreHeadersFeature(): TableFeature>; +``` + +Defined in: [core/headers/coreHeadersFeature.ts:31](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.ts#L31) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Returns + +[`TableFeature`](../interfaces/TableFeature.md)\<`CoreHeadersFeatureConstructors`\<`TFeatures`, `TData`\>\> diff --git a/docs/reference/functions/constructCoreRowModelsFeature.md b/docs/reference/functions/constructCoreRowModelsFeature.md new file mode 100644 index 0000000000..e96423158b --- /dev/null +++ b/docs/reference/functions/constructCoreRowModelsFeature.md @@ -0,0 +1,26 @@ +--- +id: constructCoreRowModelsFeature +title: constructCoreRowModelsFeature +--- + +# Function: constructCoreRowModelsFeature() + +```ts +function constructCoreRowModelsFeature(): TableFeature>; +``` + +Defined in: [core/row-models/coreRowModelsFeature.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.ts#L27) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Returns + +[`TableFeature`](../interfaces/TableFeature.md)\<`CoreRowModelsFeatureConstructors`\<`TFeatures`, `TData`\>\> diff --git a/docs/reference/functions/constructCoreRowsFeature.md b/docs/reference/functions/constructCoreRowsFeature.md new file mode 100644 index 0000000000..ca040f8af3 --- /dev/null +++ b/docs/reference/functions/constructCoreRowsFeature.md @@ -0,0 +1,26 @@ +--- +id: constructCoreRowsFeature +title: constructCoreRowsFeature +--- + +# Function: constructCoreRowsFeature() + +```ts +function constructCoreRowsFeature(): TableFeature>; +``` + +Defined in: [core/rows/coreRowsFeature.ts:31](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.ts#L31) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Returns + +[`TableFeature`](../interfaces/TableFeature.md)\<`CoreRowsFeatureConstructors`\<`TFeatures`, `TData`\>\> diff --git a/docs/reference/functions/constructCoreTablesFeature.md b/docs/reference/functions/constructCoreTablesFeature.md new file mode 100644 index 0000000000..f7a88c141a --- /dev/null +++ b/docs/reference/functions/constructCoreTablesFeature.md @@ -0,0 +1,26 @@ +--- +id: constructCoreTablesFeature +title: constructCoreTablesFeature +--- + +# Function: constructCoreTablesFeature() + +```ts +function constructCoreTablesFeature(): TableFeature>; +``` + +Defined in: [core/table/coreTablesFeature.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.ts#L15) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Returns + +[`TableFeature`](../interfaces/TableFeature.md)\<`CoreTablesFeatureConstructors`\<`TFeatures`, `TData`\>\> diff --git a/docs/reference/functions/constructGlobalFilteringFeature.md b/docs/reference/functions/constructGlobalFilteringFeature.md new file mode 100644 index 0000000000..7b1be3fbb2 --- /dev/null +++ b/docs/reference/functions/constructGlobalFilteringFeature.md @@ -0,0 +1,26 @@ +--- +id: constructGlobalFilteringFeature +title: constructGlobalFilteringFeature +--- + +# Function: constructGlobalFilteringFeature() + +```ts +function constructGlobalFilteringFeature(): TableFeature>; +``` + +Defined in: [features/global-filtering/globalFilteringFeature.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.ts#L34) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Returns + +[`TableFeature`](../interfaces/TableFeature.md)\<`GlobalFilteringFeatureConstructors`\<`TFeatures`, `TData`\>\> diff --git a/docs/reference/functions/constructHeader.md b/docs/reference/functions/constructHeader.md new file mode 100644 index 0000000000..939f2d8a5d --- /dev/null +++ b/docs/reference/functions/constructHeader.md @@ -0,0 +1,65 @@ +--- +id: constructHeader +title: constructHeader +--- + +# Function: constructHeader() + +```ts +function constructHeader( + table, + column, +options): Header; +``` + +Defined in: [core/headers/constructHeader.ts:25](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/constructHeader.ts#L25) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### column + +[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `TValue`\> + +### options + +#### depth + +`number` + +#### id? + +`string` + +#### index + +`number` + +#### isPlaceholder? + +`boolean` + +#### placeholderId? + +`string` + +## Returns + +[`Header`](../type-aliases/Header.md)\<`TFeatures`, `TData`, `TValue`\> diff --git a/docs/reference/functions/constructRow.md b/docs/reference/functions/constructRow.md new file mode 100644 index 0000000000..c15c5fb72e --- /dev/null +++ b/docs/reference/functions/constructRow.md @@ -0,0 +1,63 @@ +--- +id: constructRow +title: constructRow +--- + +# Function: constructRow() + +```ts +function constructRow( + table, + id, + original, + rowIndex, + depth, + subRows?, +parentId?): Row; +``` + +Defined in: [core/rows/constructRow.ts:24](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/constructRow.ts#L24) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### id + +`string` + +### original + +`TData` + +### rowIndex + +`number` + +### depth + +`number` + +### subRows? + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\>[] + +### parentId? + +`string` + +## Returns + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/constructRowExpandingFeature.md b/docs/reference/functions/constructRowExpandingFeature.md new file mode 100644 index 0000000000..f9469e1e9f --- /dev/null +++ b/docs/reference/functions/constructRowExpandingFeature.md @@ -0,0 +1,26 @@ +--- +id: constructRowExpandingFeature +title: constructRowExpandingFeature +--- + +# Function: constructRowExpandingFeature() + +```ts +function constructRowExpandingFeature(): TableFeature>; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.ts:46](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.ts#L46) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Returns + +[`TableFeature`](../interfaces/TableFeature.md)\<`RowExpandingFeatureConstructors`\<`TFeatures`, `TData`\>\> diff --git a/docs/reference/functions/constructRowPaginationFeature.md b/docs/reference/functions/constructRowPaginationFeature.md new file mode 100644 index 0000000000..7f3c0cdf58 --- /dev/null +++ b/docs/reference/functions/constructRowPaginationFeature.md @@ -0,0 +1,26 @@ +--- +id: constructRowPaginationFeature +title: constructRowPaginationFeature +--- + +# Function: constructRowPaginationFeature() + +```ts +function constructRowPaginationFeature(): TableFeature>; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.ts:42](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.ts#L42) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Returns + +[`TableFeature`](../interfaces/TableFeature.md)\<`RowPaginationFeatureConstructors`\<`TFeatures`, `TData`\>\> diff --git a/docs/reference/functions/constructRowPinningFeature.md b/docs/reference/functions/constructRowPinningFeature.md new file mode 100644 index 0000000000..92353b8820 --- /dev/null +++ b/docs/reference/functions/constructRowPinningFeature.md @@ -0,0 +1,26 @@ +--- +id: constructRowPinningFeature +title: constructRowPinningFeature +--- + +# Function: constructRowPinningFeature() + +```ts +function constructRowPinningFeature(): TableFeature>; +``` + +Defined in: [features/row-pinning/rowPinningFeature.ts:38](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.ts#L38) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Returns + +[`TableFeature`](../interfaces/TableFeature.md)\<`RowPinningFeatureConstructors`\<`TFeatures`, `TData`\>\> diff --git a/docs/reference/functions/constructRowSelectionFeature.md b/docs/reference/functions/constructRowSelectionFeature.md new file mode 100644 index 0000000000..c03f98060d --- /dev/null +++ b/docs/reference/functions/constructRowSelectionFeature.md @@ -0,0 +1,26 @@ +--- +id: constructRowSelectionFeature +title: constructRowSelectionFeature +--- + +# Function: constructRowSelectionFeature() + +```ts +function constructRowSelectionFeature(): TableFeature>; +``` + +Defined in: [features/row-selection/rowSelectionFeature.ts:50](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.ts#L50) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Returns + +[`TableFeature`](../interfaces/TableFeature.md)\<`RowSelectionFeatureConstructors`\<`TFeatures`, `TData`\>\> diff --git a/docs/reference/functions/constructRowSortingFeature.md b/docs/reference/functions/constructRowSortingFeature.md new file mode 100644 index 0000000000..dcbf834a85 --- /dev/null +++ b/docs/reference/functions/constructRowSortingFeature.md @@ -0,0 +1,26 @@ +--- +id: constructRowSortingFeature +title: constructRowSortingFeature +--- + +# Function: constructRowSortingFeature() + +```ts +function constructRowSortingFeature(): TableFeature>; +``` + +Defined in: [features/row-sorting/rowSortingFeature.ts:50](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.ts#L50) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Returns + +[`TableFeature`](../interfaces/TableFeature.md)\<`RowSortingFeatureConstructors`\<`TFeatures`, `TData`\>\> diff --git a/docs/reference/functions/constructTable.md b/docs/reference/functions/constructTable.md new file mode 100644 index 0000000000..3a16ec869b --- /dev/null +++ b/docs/reference/functions/constructTable.md @@ -0,0 +1,32 @@ +--- +id: constructTable +title: constructTable +--- + +# Function: constructTable() + +```ts +function constructTable(tableOptions): Table; +``` + +Defined in: [core/table/constructTable.ts:29](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/constructTable.ts#L29) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### tableOptions + +[`TableOptions`](../type-aliases/TableOptions.md)\<`TFeatures`, `TData`\> + +## Returns + +[`Table`](../type-aliases/Table.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/constructTableHelper.md b/docs/reference/functions/constructTableHelper.md new file mode 100644 index 0000000000..b2cb42e297 --- /dev/null +++ b/docs/reference/functions/constructTableHelper.md @@ -0,0 +1,34 @@ +--- +id: constructTableHelper +title: constructTableHelper +--- + +# Function: constructTableHelper() + +```ts +function constructTableHelper(tableCreator, tableHelperOptions): TableHelper_Core; +``` + +Defined in: [helpers/tableHelper.ts:44](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableHelper.ts#L44) + +Internal function to create a table helper that each adapter package will use to create their own table helper + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +## Parameters + +### tableCreator + +\<`TData`\>(`tableOptions`, `selector?`) => [`Table`](../type-aliases/Table.md)\<`TFeatures`, `TData`\> + +### tableHelperOptions + +[`TableHelperOptions`](../type-aliases/TableHelperOptions.md)\<`TFeatures`\> + +## Returns + +[`TableHelper_Core`](../type-aliases/TableHelper_Core.md)\<`TFeatures`\> diff --git a/docs/reference/functions/createColumnHelper.md b/docs/reference/functions/createColumnHelper.md new file mode 100644 index 0000000000..878ce28895 --- /dev/null +++ b/docs/reference/functions/createColumnHelper.md @@ -0,0 +1,41 @@ +--- +id: createColumnHelper +title: createColumnHelper +--- + +# Function: createColumnHelper() + +```ts +function createColumnHelper(): ColumnHelper; +``` + +Defined in: [helpers/columnHelper.ts:94](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/columnHelper.ts#L94) + +A helper utility for creating column definitions with slightly better type inference for each individual column. +The `TValue` generic is inferred based on the accessor key or function provided. +**Note:** From a JavaScript perspective, the functions in these helpers do not do anything. They are only used to help TypeScript infer the correct types for the column definitions. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Returns + +[`ColumnHelper`](../type-aliases/ColumnHelper.md)\<`TFeatures`, `TData`\> + +## Example + +```tsx +const helper = createColumnHelper() // _features is the result of `tableFeatures({})` helper +const columns = [ + helper.display({ id: 'actions', header: 'Actions' }), + helper.accessor('firstName', {}), + helper.accessor((row) => row.lastName, {} +] +``` diff --git a/docs/reference/functions/createCoreRowModel.md b/docs/reference/functions/createCoreRowModel.md new file mode 100644 index 0000000000..891142e85e --- /dev/null +++ b/docs/reference/functions/createCoreRowModel.md @@ -0,0 +1,44 @@ +--- +id: createCoreRowModel +title: createCoreRowModel +--- + +# Function: createCoreRowModel() + +```ts +function createCoreRowModel(): (table) => () => RowModel; +``` + +Defined in: [core/row-models/createCoreRowModel.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/createCoreRowModel.ts#L10) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Returns + +```ts +(table): () => RowModel; +``` + +### Parameters + +#### table + +[`Table`](../type-aliases/Table.md)\<`TFeatures`, `TData`\> + +### Returns + +```ts +(): RowModel; +``` + +#### Returns + +[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/createExpandedRowModel.md b/docs/reference/functions/createExpandedRowModel.md new file mode 100644 index 0000000000..b5499c25be --- /dev/null +++ b/docs/reference/functions/createExpandedRowModel.md @@ -0,0 +1,44 @@ +--- +id: createExpandedRowModel +title: createExpandedRowModel +--- + +# Function: createExpandedRowModel() + +```ts +function createExpandedRowModel(): (table) => () => RowModel; +``` + +Defined in: [features/row-expanding/createExpandedRowModel.ts:9](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/createExpandedRowModel.ts#L9) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) = `any` + +## Returns + +```ts +(table): () => RowModel; +``` + +### Parameters + +#### table + +[`Table`](../type-aliases/Table.md)\<`TFeatures`, `TData`\> + +### Returns + +```ts +(): RowModel; +``` + +#### Returns + +[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/createFacetedMinMaxValues.md b/docs/reference/functions/createFacetedMinMaxValues.md new file mode 100644 index 0000000000..26fa59f9b9 --- /dev/null +++ b/docs/reference/functions/createFacetedMinMaxValues.md @@ -0,0 +1,48 @@ +--- +id: createFacetedMinMaxValues +title: createFacetedMinMaxValues +--- + +# Function: createFacetedMinMaxValues() + +```ts +function createFacetedMinMaxValues(): (table, columnId) => () => [number, number] | undefined; +``` + +Defined in: [features/column-faceting/createFacetedMinMaxValues.ts:8](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/createFacetedMinMaxValues.ts#L8) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) = `any` + +## Returns + +```ts +(table, columnId): () => [number, number] | undefined; +``` + +### Parameters + +#### table + +[`Table`](../type-aliases/Table.md)\<`TFeatures`, `TData`\> + +#### columnId + +`string` + +### Returns + +```ts +(): [number, number] | undefined; +``` + +#### Returns + +\[`number`, `number`\] \| `undefined` diff --git a/docs/reference/functions/createFacetedRowModel.md b/docs/reference/functions/createFacetedRowModel.md new file mode 100644 index 0000000000..7844c294e0 --- /dev/null +++ b/docs/reference/functions/createFacetedRowModel.md @@ -0,0 +1,48 @@ +--- +id: createFacetedRowModel +title: createFacetedRowModel +--- + +# Function: createFacetedRowModel() + +```ts +function createFacetedRowModel(): (table, columnId) => () => RowModel; +``` + +Defined in: [features/column-faceting/createFacetedRowModel.ts:13](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/createFacetedRowModel.ts#L13) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) = `any` + +## Returns + +```ts +(table, columnId): () => RowModel; +``` + +### Parameters + +#### table + +[`Table`](../type-aliases/Table.md)\<`TFeatures`, `TData`\> + +#### columnId + +`string` + +### Returns + +```ts +(): RowModel; +``` + +#### Returns + +[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/createFacetedUniqueValues.md b/docs/reference/functions/createFacetedUniqueValues.md new file mode 100644 index 0000000000..231d9d81f6 --- /dev/null +++ b/docs/reference/functions/createFacetedUniqueValues.md @@ -0,0 +1,48 @@ +--- +id: createFacetedUniqueValues +title: createFacetedUniqueValues +--- + +# Function: createFacetedUniqueValues() + +```ts +function createFacetedUniqueValues(): (table, columnId) => () => Map; +``` + +Defined in: [features/column-faceting/createFacetedUniqueValues.ts:8](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/createFacetedUniqueValues.ts#L8) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) = `any` + +## Returns + +```ts +(table, columnId): () => Map; +``` + +### Parameters + +#### table + +[`Table`](../type-aliases/Table.md)\<`TFeatures`, `TData`\> + +#### columnId + +`string` + +### Returns + +```ts +(): Map; +``` + +#### Returns + +`Map`\<`any`, `number`\> diff --git a/docs/reference/functions/createFilteredRowModel.md b/docs/reference/functions/createFilteredRowModel.md new file mode 100644 index 0000000000..cc38905c6c --- /dev/null +++ b/docs/reference/functions/createFilteredRowModel.md @@ -0,0 +1,50 @@ +--- +id: createFilteredRowModel +title: createFilteredRowModel +--- + +# Function: createFilteredRowModel() + +```ts +function createFilteredRowModel(filterFns): (table) => () => RowModel; +``` + +Defined in: [features/column-filtering/createFilteredRowModel.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/createFilteredRowModel.ts#L22) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) = `any` + +## Parameters + +### filterFns + +`Record`\\> + +## Returns + +```ts +(table): () => RowModel; +``` + +### Parameters + +#### table + +[`Table`](../type-aliases/Table.md)\<`TFeatures`, `TData`\> + +### Returns + +```ts +(): RowModel; +``` + +#### Returns + +[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/createGroupedRowModel.md b/docs/reference/functions/createGroupedRowModel.md new file mode 100644 index 0000000000..ff97b03413 --- /dev/null +++ b/docs/reference/functions/createGroupedRowModel.md @@ -0,0 +1,50 @@ +--- +id: createGroupedRowModel +title: createGroupedRowModel +--- + +# Function: createGroupedRowModel() + +```ts +function createGroupedRowModel(aggregationFns): (table) => () => RowModel; +``` + +Defined in: [features/column-grouping/createGroupedRowModel.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/createGroupedRowModel.ts#L22) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) = `any` + +## Parameters + +### aggregationFns + +`Record`\\> + +## Returns + +```ts +(table): () => RowModel; +``` + +### Parameters + +#### table + +[`Table`](../type-aliases/Table.md)\<`TFeatures`, `TData`\> + +### Returns + +```ts +(): RowModel; +``` + +#### Returns + +[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/createPaginatedRowModel.md b/docs/reference/functions/createPaginatedRowModel.md new file mode 100644 index 0000000000..360310498e --- /dev/null +++ b/docs/reference/functions/createPaginatedRowModel.md @@ -0,0 +1,44 @@ +--- +id: createPaginatedRowModel +title: createPaginatedRowModel +--- + +# Function: createPaginatedRowModel() + +```ts +function createPaginatedRowModel(): (table) => () => RowModel; +``` + +Defined in: [features/row-pagination/createPaginatedRowModel.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/createPaginatedRowModel.ts#L10) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) = `any` + +## Returns + +```ts +(table): () => RowModel; +``` + +### Parameters + +#### table + +[`Table`](../type-aliases/Table.md)\<`TFeatures`, `TData`\> + +### Returns + +```ts +(): RowModel; +``` + +#### Returns + +[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/createSortedRowModel.md b/docs/reference/functions/createSortedRowModel.md new file mode 100644 index 0000000000..358d087e04 --- /dev/null +++ b/docs/reference/functions/createSortedRowModel.md @@ -0,0 +1,50 @@ +--- +id: createSortedRowModel +title: createSortedRowModel +--- + +# Function: createSortedRowModel() + +```ts +function createSortedRowModel(sortFns): (table) => () => RowModel; +``` + +Defined in: [features/row-sorting/createSortedRowModel.ts:12](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/createSortedRowModel.ts#L12) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### sortFns + +`Record`\\> + +## Returns + +```ts +(table): () => RowModel; +``` + +### Parameters + +#### table + +[`Table`](../type-aliases/Table.md)\<`TFeatures`, `TData`\> + +### Returns + +```ts +(): RowModel; +``` + +#### Returns + +[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/createTableStore.md b/docs/reference/functions/createTableStore.md new file mode 100644 index 0000000000..28730f2a8c --- /dev/null +++ b/docs/reference/functions/createTableStore.md @@ -0,0 +1,32 @@ +--- +id: createTableStore +title: createTableStore +--- + +# Function: createTableStore() + +```ts +function createTableStore(features, initialState): Store>; +``` + +Defined in: [core/table/constructTable.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/constructTable.ts#L22) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +## Parameters + +### features + +`TFeatures` + +### initialState + +`Partial`\<[`TableState`](../type-aliases/TableState.md)\<`TFeatures`\>\> | `undefined` + +## Returns + +`Store`\<[`TableState`](../type-aliases/TableState.md)\<`TFeatures`\>\> diff --git a/docs/reference/functions/expandRows.md b/docs/reference/functions/expandRows.md new file mode 100644 index 0000000000..93217b8c35 --- /dev/null +++ b/docs/reference/functions/expandRows.md @@ -0,0 +1,32 @@ +--- +id: expandRows +title: expandRows +--- + +# Function: expandRows() + +```ts +function expandRows(rowModel): RowModel; +``` + +Defined in: [features/row-expanding/createExpandedRowModel.ts:51](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/createExpandedRowModel.ts#L51) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) = `any` + +## Parameters + +### rowModel + +[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> + +## Returns + +[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/flattenBy.md b/docs/reference/functions/flattenBy.md new file mode 100644 index 0000000000..0478469106 --- /dev/null +++ b/docs/reference/functions/flattenBy.md @@ -0,0 +1,32 @@ +--- +id: flattenBy +title: flattenBy +--- + +# Function: flattenBy() + +```ts +function flattenBy(arr, getChildren): TNode[]; +``` + +Defined in: [utils.ts:40](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L40) + +## Type Parameters + +### TNode + +`TNode` + +## Parameters + +### arr + +`TNode`[] + +### getChildren + +(`item`) => `TNode`[] + +## Returns + +`TNode`[] diff --git a/docs/reference/functions/functionalUpdate.md b/docs/reference/functions/functionalUpdate.md new file mode 100644 index 0000000000..52e12cc8ac --- /dev/null +++ b/docs/reference/functions/functionalUpdate.md @@ -0,0 +1,32 @@ +--- +id: functionalUpdate +title: functionalUpdate +--- + +# Function: functionalUpdate() + +```ts +function functionalUpdate(updater, input): T; +``` + +Defined in: [utils.ts:6](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L6) + +## Type Parameters + +### T + +`T` + +## Parameters + +### updater + +[`Updater`](../type-aliases/Updater.md)\<`T`\> + +### input + +`T` + +## Returns + +`T` diff --git a/docs/reference/functions/getDefaultColumnFiltersState.md b/docs/reference/functions/getDefaultColumnFiltersState.md new file mode 100644 index 0000000000..01cd6bf425 --- /dev/null +++ b/docs/reference/functions/getDefaultColumnFiltersState.md @@ -0,0 +1,16 @@ +--- +id: getDefaultColumnFiltersState +title: getDefaultColumnFiltersState +--- + +# Function: getDefaultColumnFiltersState() + +```ts +function getDefaultColumnFiltersState(): ColumnFiltersState; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L11) + +## Returns + +[`ColumnFiltersState`](../type-aliases/ColumnFiltersState.md) diff --git a/docs/reference/functions/getDefaultColumnOrderState.md b/docs/reference/functions/getDefaultColumnOrderState.md new file mode 100644 index 0000000000..76b6641d97 --- /dev/null +++ b/docs/reference/functions/getDefaultColumnOrderState.md @@ -0,0 +1,16 @@ +--- +id: getDefaultColumnOrderState +title: getDefaultColumnOrderState +--- + +# Function: getDefaultColumnOrderState() + +```ts +function getDefaultColumnOrderState(): ColumnOrderState; +``` + +Defined in: [features/column-ordering/columnOrderingFeature.utils.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L10) + +## Returns + +[`ColumnOrderState`](../type-aliases/ColumnOrderState.md) diff --git a/docs/reference/functions/getDefaultColumnPinningState.md b/docs/reference/functions/getDefaultColumnPinningState.md new file mode 100644 index 0000000000..17dff16c53 --- /dev/null +++ b/docs/reference/functions/getDefaultColumnPinningState.md @@ -0,0 +1,16 @@ +--- +id: getDefaultColumnPinningState +title: getDefaultColumnPinningState +--- + +# Function: getDefaultColumnPinningState() + +```ts +function getDefaultColumnPinningState(): ColumnPinningState; +``` + +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L22) + +## Returns + +[`ColumnPinningState`](../interfaces/ColumnPinningState.md) diff --git a/docs/reference/functions/getDefaultColumnResizingState.md b/docs/reference/functions/getDefaultColumnResizingState.md new file mode 100644 index 0000000000..aa88930a90 --- /dev/null +++ b/docs/reference/functions/getDefaultColumnResizingState.md @@ -0,0 +1,16 @@ +--- +id: getDefaultColumnResizingState +title: getDefaultColumnResizingState +--- + +# Function: getDefaultColumnResizingState() + +```ts +function getDefaultColumnResizingState(): columnResizingState; +``` + +Defined in: [features/column-resizing/columnResizingFeature.utils.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L15) + +## Returns + +[`columnResizingState`](../interfaces/columnResizingState.md) diff --git a/docs/reference/functions/getDefaultColumnSizingColumnDef.md b/docs/reference/functions/getDefaultColumnSizingColumnDef.md new file mode 100644 index 0000000000..89daefd5e6 --- /dev/null +++ b/docs/reference/functions/getDefaultColumnSizingColumnDef.md @@ -0,0 +1,34 @@ +--- +id: getDefaultColumnSizingColumnDef +title: getDefaultColumnSizingColumnDef +--- + +# Function: getDefaultColumnSizingColumnDef() + +```ts +function getDefaultColumnSizingColumnDef(): object; +``` + +Defined in: [features/column-sizing/columnSizingFeature.utils.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L21) + +## Returns + +`object` + +### maxSize + +```ts +maxSize: number = Number.MAX_SAFE_INTEGER; +``` + +### minSize + +```ts +minSize: number = 20; +``` + +### size + +```ts +size: number = 150; +``` diff --git a/docs/reference/functions/getDefaultColumnSizingState.md b/docs/reference/functions/getDefaultColumnSizingState.md new file mode 100644 index 0000000000..7ffe17d73d --- /dev/null +++ b/docs/reference/functions/getDefaultColumnSizingState.md @@ -0,0 +1,16 @@ +--- +id: getDefaultColumnSizingState +title: getDefaultColumnSizingState +--- + +# Function: getDefaultColumnSizingState() + +```ts +function getDefaultColumnSizingState(): ColumnSizingState; +``` + +Defined in: [features/column-sizing/columnSizingFeature.utils.ts:17](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L17) + +## Returns + +[`ColumnSizingState`](../type-aliases/ColumnSizingState.md) diff --git a/docs/reference/functions/getDefaultColumnVisibilityState.md b/docs/reference/functions/getDefaultColumnVisibilityState.md new file mode 100644 index 0000000000..dda4416fdc --- /dev/null +++ b/docs/reference/functions/getDefaultColumnVisibilityState.md @@ -0,0 +1,16 @@ +--- +id: getDefaultColumnVisibilityState +title: getDefaultColumnVisibilityState +--- + +# Function: getDefaultColumnVisibilityState() + +```ts +function getDefaultColumnVisibilityState(): ColumnVisibilityState; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L10) + +## Returns + +[`ColumnVisibilityState`](../type-aliases/ColumnVisibilityState.md) diff --git a/docs/reference/functions/getDefaultExpandedState.md b/docs/reference/functions/getDefaultExpandedState.md new file mode 100644 index 0000000000..3eb177b31d --- /dev/null +++ b/docs/reference/functions/getDefaultExpandedState.md @@ -0,0 +1,16 @@ +--- +id: getDefaultExpandedState +title: getDefaultExpandedState +--- + +# Function: getDefaultExpandedState() + +```ts +function getDefaultExpandedState(): ExpandedState; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L10) + +## Returns + +[`ExpandedState`](../type-aliases/ExpandedState.md) diff --git a/docs/reference/functions/getDefaultGroupingState.md b/docs/reference/functions/getDefaultGroupingState.md new file mode 100644 index 0000000000..213ac83cca --- /dev/null +++ b/docs/reference/functions/getDefaultGroupingState.md @@ -0,0 +1,16 @@ +--- +id: getDefaultGroupingState +title: getDefaultGroupingState +--- + +# Function: getDefaultGroupingState() + +```ts +function getDefaultGroupingState(): GroupingState; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L15) + +## Returns + +[`GroupingState`](../type-aliases/GroupingState.md) diff --git a/docs/reference/functions/getDefaultPaginationState.md b/docs/reference/functions/getDefaultPaginationState.md new file mode 100644 index 0000000000..8701d43269 --- /dev/null +++ b/docs/reference/functions/getDefaultPaginationState.md @@ -0,0 +1,16 @@ +--- +id: getDefaultPaginationState +title: getDefaultPaginationState +--- + +# Function: getDefaultPaginationState() + +```ts +function getDefaultPaginationState(): PaginationState; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L10) + +## Returns + +[`PaginationState`](../interfaces/PaginationState.md) diff --git a/docs/reference/functions/getDefaultRowPinningState.md b/docs/reference/functions/getDefaultRowPinningState.md new file mode 100644 index 0000000000..3470248367 --- /dev/null +++ b/docs/reference/functions/getDefaultRowPinningState.md @@ -0,0 +1,16 @@ +--- +id: getDefaultRowPinningState +title: getDefaultRowPinningState +--- + +# Function: getDefaultRowPinningState() + +```ts +function getDefaultRowPinningState(): RowPinningState; +``` + +Defined in: [features/row-pinning/rowPinningFeature.utils.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L14) + +## Returns + +[`RowPinningState`](../interfaces/RowPinningState.md) diff --git a/docs/reference/functions/getDefaultRowSelectionState.md b/docs/reference/functions/getDefaultRowSelectionState.md new file mode 100644 index 0000000000..8e2dfaf0b7 --- /dev/null +++ b/docs/reference/functions/getDefaultRowSelectionState.md @@ -0,0 +1,16 @@ +--- +id: getDefaultRowSelectionState +title: getDefaultRowSelectionState +--- + +# Function: getDefaultRowSelectionState() + +```ts +function getDefaultRowSelectionState(): RowSelectionState; +``` + +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L10) + +## Returns + +[`RowSelectionState`](../type-aliases/RowSelectionState.md) diff --git a/docs/reference/functions/getDefaultSortingState.md b/docs/reference/functions/getDefaultSortingState.md new file mode 100644 index 0000000000..cb57d4e9df --- /dev/null +++ b/docs/reference/functions/getDefaultSortingState.md @@ -0,0 +1,16 @@ +--- +id: getDefaultSortingState +title: getDefaultSortingState +--- + +# Function: getDefaultSortingState() + +```ts +function getDefaultSortingState(): SortingState; +``` + +Defined in: [features/row-sorting/rowSortingFeature.utils.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L15) + +## Returns + +[`SortingState`](../type-aliases/SortingState.md) diff --git a/docs/reference/functions/getFunctionNameInfo.md b/docs/reference/functions/getFunctionNameInfo.md new file mode 100644 index 0000000000..86768a0ae6 --- /dev/null +++ b/docs/reference/functions/getFunctionNameInfo.md @@ -0,0 +1,46 @@ +--- +id: getFunctionNameInfo +title: getFunctionNameInfo +--- + +# Function: getFunctionNameInfo() + +```ts +function getFunctionNameInfo(staticFnName, splitBy): object; +``` + +Defined in: [utils.ts:280](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L280) + +Assumes that a function name is in the format of `parentName_fnKey` and returns the `fnKey` and `fnName` in the format of `parentName.fnKey`. + +## Parameters + +### staticFnName + +`string` + +### splitBy + +`"_"` | `"."` + +## Returns + +`object` + +### fnKey + +```ts +fnKey: string; +``` + +### fnName + +```ts +fnName: string; +``` + +### parentName + +```ts +parentName: string; +``` diff --git a/docs/reference/functions/getInitialTableState.md b/docs/reference/functions/getInitialTableState.md new file mode 100644 index 0000000000..62c995128e --- /dev/null +++ b/docs/reference/functions/getInitialTableState.md @@ -0,0 +1,32 @@ +--- +id: getInitialTableState +title: getInitialTableState +--- + +# Function: getInitialTableState() + +```ts +function getInitialTableState(features, initialState): TableState; +``` + +Defined in: [core/table/constructTable.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/constructTable.ts#L10) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +## Parameters + +### features + +`TFeatures` + +### initialState + +`Partial`\<[`TableState`](../type-aliases/TableState.md)\<`TFeatures`\>\> | `undefined` + +## Returns + +[`TableState`](../type-aliases/TableState.md)\<`TFeatures`\> diff --git a/docs/reference/functions/getMemoFnMeta.md b/docs/reference/functions/getMemoFnMeta.md new file mode 100644 index 0000000000..d8555afd30 --- /dev/null +++ b/docs/reference/functions/getMemoFnMeta.md @@ -0,0 +1,24 @@ +--- +id: getMemoFnMeta +title: getMemoFnMeta +--- + +# Function: getMemoFnMeta() + +```ts +function getMemoFnMeta(fn): MemoFnMeta | null; +``` + +Defined in: [utils.ts:74](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L74) + +**`Internal`** + +## Parameters + +### fn + +`any` + +## Returns + +[`MemoFnMeta`](../type-aliases/MemoFnMeta.md) \| `null` diff --git a/docs/reference/functions/header_getContext.md b/docs/reference/functions/header_getContext.md new file mode 100644 index 0000000000..3642011124 --- /dev/null +++ b/docs/reference/functions/header_getContext.md @@ -0,0 +1,54 @@ +--- +id: header_getContext +title: header_getContext +--- + +# Function: header\_getContext() + +```ts +function header_getContext(header): object; +``` + +Defined in: [core/headers/coreHeadersFeature.utils.ts:36](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts#L36) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` + +## Parameters + +### header + +[`Header`](../type-aliases/Header.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +`object` + +### column + +```ts +column: Column = header.column; +``` + +### header + +```ts +header: Header; +``` + +### table + +```ts +table: Table_Internal = header.column.table; +``` diff --git a/docs/reference/functions/header_getLeafHeaders.md b/docs/reference/functions/header_getLeafHeaders.md new file mode 100644 index 0000000000..1ae9df99f7 --- /dev/null +++ b/docs/reference/functions/header_getLeafHeaders.md @@ -0,0 +1,36 @@ +--- +id: header_getLeafHeaders +title: header_getLeafHeaders +--- + +# Function: header\_getLeafHeaders() + +```ts +function header_getLeafHeaders(header): Header[]; +``` + +Defined in: [core/headers/coreHeadersFeature.utils.ts:17](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts#L17) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` + +## Parameters + +### header + +[`Header`](../type-aliases/Header.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +[`Header`](../type-aliases/Header.md)\<`TFeatures`, `TData`, `TValue`\>[] diff --git a/docs/reference/functions/header_getResizeHandler.md b/docs/reference/functions/header_getResizeHandler.md new file mode 100644 index 0000000000..fd49eaf3e8 --- /dev/null +++ b/docs/reference/functions/header_getResizeHandler.md @@ -0,0 +1,52 @@ +--- +id: header_getResizeHandler +title: header_getResizeHandler +--- + +# Function: header\_getResizeHandler() + +```ts +function header_getResizeHandler(header, _contextDocument?): (event) => void; +``` + +Defined in: [features/column-resizing/columnResizingFeature.utils.ts:45](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L45) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### header + +[`Header`](../type-aliases/Header.md)\<`TFeatures`, `TData`, `TValue`\> + +### \_contextDocument? + +`Document` + +## Returns + +```ts +(event): void; +``` + +### Parameters + +#### event + +`unknown` + +### Returns + +`void` diff --git a/docs/reference/functions/header_getSize.md b/docs/reference/functions/header_getSize.md new file mode 100644 index 0000000000..6cd56d16a2 --- /dev/null +++ b/docs/reference/functions/header_getSize.md @@ -0,0 +1,36 @@ +--- +id: header_getSize +title: header_getSize +--- + +# Function: header\_getSize() + +```ts +function header_getSize(header): number; +``` + +Defined in: [features/column-sizing/columnSizingFeature.utils.ts:98](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L98) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### header + +[`Header`](../type-aliases/Header.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +`number` diff --git a/docs/reference/functions/header_getStart.md b/docs/reference/functions/header_getStart.md new file mode 100644 index 0000000000..7ffb78b071 --- /dev/null +++ b/docs/reference/functions/header_getStart.md @@ -0,0 +1,36 @@ +--- +id: header_getStart +title: header_getStart +--- + +# Function: header\_getStart() + +```ts +function header_getStart(header): number; +``` + +Defined in: [features/column-sizing/columnSizingFeature.utils.ts:118](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L118) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### header + +[`Header`](../type-aliases/Header.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +`number` diff --git a/docs/reference/functions/isFunction.md b/docs/reference/functions/isFunction.md new file mode 100644 index 0000000000..2de56b4337 --- /dev/null +++ b/docs/reference/functions/isFunction.md @@ -0,0 +1,28 @@ +--- +id: isFunction +title: isFunction +--- + +# Function: isFunction() + +```ts +function isFunction(d): d is T; +``` + +Defined in: [utils.ts:32](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L32) + +## Type Parameters + +### T + +`T` *extends* `AnyFunction` + +## Parameters + +### d + +`any` + +## Returns + +`d is T` diff --git a/docs/reference/functions/isNumberArray.md b/docs/reference/functions/isNumberArray.md new file mode 100644 index 0000000000..c40d3d1d87 --- /dev/null +++ b/docs/reference/functions/isNumberArray.md @@ -0,0 +1,22 @@ +--- +id: isNumberArray +title: isNumberArray +--- + +# Function: isNumberArray() + +```ts +function isNumberArray(d): d is number[]; +``` + +Defined in: [utils.ts:36](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L36) + +## Parameters + +### d + +`any` + +## Returns + +`d is number[]` diff --git a/docs/reference/functions/isRowSelected.md b/docs/reference/functions/isRowSelected.md new file mode 100644 index 0000000000..f63371fdd5 --- /dev/null +++ b/docs/reference/functions/isRowSelected.md @@ -0,0 +1,32 @@ +--- +id: isRowSelected +title: isRowSelected +--- + +# Function: isRowSelected() + +```ts +function isRowSelected(row): boolean; +``` + +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:418](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L418) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### row + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/isSubRowSelected.md b/docs/reference/functions/isSubRowSelected.md new file mode 100644 index 0000000000..cd15f28eb9 --- /dev/null +++ b/docs/reference/functions/isSubRowSelected.md @@ -0,0 +1,32 @@ +--- +id: isSubRowSelected +title: isSubRowSelected +--- + +# Function: isSubRowSelected() + +```ts +function isSubRowSelected(row): boolean | "some" | "all"; +``` + +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:425](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L425) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### row + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +## Returns + +`boolean` \| `"some"` \| `"all"` diff --git a/docs/reference/functions/isTouchStartEvent.md b/docs/reference/functions/isTouchStartEvent.md new file mode 100644 index 0000000000..3147919b3e --- /dev/null +++ b/docs/reference/functions/isTouchStartEvent.md @@ -0,0 +1,22 @@ +--- +id: isTouchStartEvent +title: isTouchStartEvent +--- + +# Function: isTouchStartEvent() + +```ts +function isTouchStartEvent(e): e is TouchEvent; +``` + +Defined in: [features/column-resizing/columnResizingFeature.utils.ts:263](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L263) + +## Parameters + +### e + +`unknown` + +## Returns + +`e is TouchEvent` diff --git a/docs/reference/functions/makeStateUpdater.md b/docs/reference/functions/makeStateUpdater.md new file mode 100644 index 0000000000..d5648007bd --- /dev/null +++ b/docs/reference/functions/makeStateUpdater.md @@ -0,0 +1,48 @@ +--- +id: makeStateUpdater +title: makeStateUpdater +--- + +# Function: makeStateUpdater() + +```ts +function makeStateUpdater(key, instance): (updater) => void; +``` + +Defined in: [utils.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L14) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### K + +`K` *extends* `string` \| `number` \| `symbol` \| `string` & `object` + +## Parameters + +### key + +`K` + +### instance + +[`Table`](../type-aliases/Table.md)\<`TFeatures`, `any`\> + +## Returns + +```ts +(updater): void; +``` + +### Parameters + +#### updater + +`any` + +### Returns + +`void` diff --git a/docs/reference/functions/memo.md b/docs/reference/functions/memo.md new file mode 100644 index 0000000000..4ec5151291 --- /dev/null +++ b/docs/reference/functions/memo.md @@ -0,0 +1,48 @@ +--- +id: memo +title: memo +--- + +# Function: memo() + +```ts +function memo(__namedParameters): (depArgs?) => TResult; +``` + +Defined in: [utils.ts:87](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L87) + +## Type Parameters + +### TDeps + +`TDeps` *extends* readonly `any`[] + +### TDepArgs + +`TDepArgs` + +### TResult + +`TResult` + +## Parameters + +### \_\_namedParameters + +`MemoOptions`\<`TDeps`, `TDepArgs`, `TResult`\> + +## Returns + +```ts +(depArgs?): TResult; +``` + +### Parameters + +#### depArgs? + +`TDepArgs` + +### Returns + +`TResult` diff --git a/docs/reference/functions/noop.md b/docs/reference/functions/noop.md new file mode 100644 index 0000000000..171dd12e09 --- /dev/null +++ b/docs/reference/functions/noop.md @@ -0,0 +1,16 @@ +--- +id: noop +title: noop +--- + +# Function: noop() + +```ts +function noop(): void; +``` + +Defined in: [utils.ts:12](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L12) + +## Returns + +`void` diff --git a/docs/reference/functions/orderColumns.md b/docs/reference/functions/orderColumns.md new file mode 100644 index 0000000000..44184f7c07 --- /dev/null +++ b/docs/reference/functions/orderColumns.md @@ -0,0 +1,36 @@ +--- +id: orderColumns +title: orderColumns +--- + +# Function: orderColumns() + +```ts +function orderColumns(table, leafColumns): Column_Internal[]; +``` + +Defined in: [features/column-ordering/columnOrderingFeature.utils.ts:106](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L106) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### leafColumns + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `unknown`\>[] + +## Returns + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `unknown`\>[] diff --git a/docs/reference/functions/passiveEventSupported.md b/docs/reference/functions/passiveEventSupported.md new file mode 100644 index 0000000000..ee83a24393 --- /dev/null +++ b/docs/reference/functions/passiveEventSupported.md @@ -0,0 +1,16 @@ +--- +id: passiveEventSupported +title: passiveEventSupported +--- + +# Function: passiveEventSupported() + +```ts +function passiveEventSupported(): boolean; +``` + +Defined in: [features/column-resizing/columnResizingFeature.utils.ts:238](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L238) + +## Returns + +`boolean` diff --git a/docs/reference/functions/row_getAllCells.md b/docs/reference/functions/row_getAllCells.md new file mode 100644 index 0000000000..7261297c27 --- /dev/null +++ b/docs/reference/functions/row_getAllCells.md @@ -0,0 +1,32 @@ +--- +id: row_getAllCells +title: row_getAllCells +--- + +# Function: row\_getAllCells() + +```ts +function row_getAllCells(row): Cell[]; +``` + +Defined in: [core/rows/coreRowsFeature.utils.ts:92](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L92) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### row + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +## Returns + +[`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `unknown`\>[] diff --git a/docs/reference/functions/row_getAllCellsByColumnId.md b/docs/reference/functions/row_getAllCellsByColumnId.md new file mode 100644 index 0000000000..55d8cf2532 --- /dev/null +++ b/docs/reference/functions/row_getAllCellsByColumnId.md @@ -0,0 +1,32 @@ +--- +id: row_getAllCellsByColumnId +title: row_getAllCellsByColumnId +--- + +# Function: row\_getAllCellsByColumnId() + +```ts +function row_getAllCellsByColumnId(row): Record>; +``` + +Defined in: [core/rows/coreRowsFeature.utils.ts:101](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L101) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### row + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +## Returns + +`Record`\<`string`, [`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `unknown`\>\> diff --git a/docs/reference/functions/row_getAllVisibleCells.md b/docs/reference/functions/row_getAllVisibleCells.md new file mode 100644 index 0000000000..2bfb23159a --- /dev/null +++ b/docs/reference/functions/row_getAllVisibleCells.md @@ -0,0 +1,32 @@ +--- +id: row_getAllVisibleCells +title: row_getAllVisibleCells +--- + +# Function: row\_getAllVisibleCells() + +```ts +function row_getAllVisibleCells(row): Cell[]; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:68](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L68) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### row + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +## Returns + +[`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `unknown`\>[] diff --git a/docs/reference/functions/row_getCanExpand.md b/docs/reference/functions/row_getCanExpand.md new file mode 100644 index 0000000000..3f3bc7f149 --- /dev/null +++ b/docs/reference/functions/row_getCanExpand.md @@ -0,0 +1,32 @@ +--- +id: row_getCanExpand +title: row_getCanExpand +--- + +# Function: row\_getCanExpand() + +```ts +function row_getCanExpand(row): boolean; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:172](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L172) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### row + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/row_getCanMultiSelect.md b/docs/reference/functions/row_getCanMultiSelect.md new file mode 100644 index 0000000000..8c085c1655 --- /dev/null +++ b/docs/reference/functions/row_getCanMultiSelect.md @@ -0,0 +1,32 @@ +--- +id: row_getCanMultiSelect +title: row_getCanMultiSelect +--- + +# Function: row\_getCanMultiSelect() + +```ts +function row_getCanMultiSelect(row): boolean; +``` + +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:319](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L319) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### row + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/row_getCanPin.md b/docs/reference/functions/row_getCanPin.md new file mode 100644 index 0000000000..ca15bec473 --- /dev/null +++ b/docs/reference/functions/row_getCanPin.md @@ -0,0 +1,32 @@ +--- +id: row_getCanPin +title: row_getCanPin +--- + +# Function: row\_getCanPin() + +```ts +function row_getCanPin(row): boolean; +``` + +Defined in: [features/row-pinning/rowPinningFeature.utils.ts:119](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L119) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### row + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/row_getCanSelect.md b/docs/reference/functions/row_getCanSelect.md new file mode 100644 index 0000000000..8abbd6f102 --- /dev/null +++ b/docs/reference/functions/row_getCanSelect.md @@ -0,0 +1,32 @@ +--- +id: row_getCanSelect +title: row_getCanSelect +--- + +# Function: row\_getCanSelect() + +```ts +function row_getCanSelect(row): boolean; +``` + +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:295](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L295) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### row + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/row_getCanSelectSubRows.md b/docs/reference/functions/row_getCanSelectSubRows.md new file mode 100644 index 0000000000..723f0fb9b5 --- /dev/null +++ b/docs/reference/functions/row_getCanSelectSubRows.md @@ -0,0 +1,32 @@ +--- +id: row_getCanSelectSubRows +title: row_getCanSelectSubRows +--- + +# Function: row\_getCanSelectSubRows() + +```ts +function row_getCanSelectSubRows(row): boolean; +``` + +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:307](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L307) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### row + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/row_getCenterVisibleCells.md b/docs/reference/functions/row_getCenterVisibleCells.md new file mode 100644 index 0000000000..1af5e97b28 --- /dev/null +++ b/docs/reference/functions/row_getCenterVisibleCells.md @@ -0,0 +1,32 @@ +--- +id: row_getCenterVisibleCells +title: row_getCenterVisibleCells +--- + +# Function: row\_getCenterVisibleCells() + +```ts +function row_getCenterVisibleCells(row): any[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:118](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L118) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### row + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +## Returns + +`any`[] diff --git a/docs/reference/functions/row_getGroupingValue.md b/docs/reference/functions/row_getGroupingValue.md new file mode 100644 index 0000000000..f665b1d53b --- /dev/null +++ b/docs/reference/functions/row_getGroupingValue.md @@ -0,0 +1,43 @@ +--- +id: row_getGroupingValue +title: row_getGroupingValue +--- + +# Function: row\_getGroupingValue() + +```ts +function row_getGroupingValue(row, columnId): any; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:137](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L137) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### row + +[`Row_Core`](../interfaces/Row_Core.md)\<`TFeatures`, `TData`\> & [`UnionToIntersection`](../type-aliases/UnionToIntersection.md)\< + \| `"columnFilteringFeature"` *extends* keyof `TFeatures` ? [`Row_ColumnFiltering`](../interfaces/Row_ColumnFiltering.md)\<`TFeatures`, `TData`\> : `never` + \| `"columnGroupingFeature"` *extends* keyof `TFeatures` ? [`Row_ColumnGrouping`](../interfaces/Row_ColumnGrouping.md) : `never` + \| `"columnPinningFeature"` *extends* keyof `TFeatures` ? [`Row_ColumnPinning`](../interfaces/Row_ColumnPinning.md)\<`TFeatures`, `TData`\> : `never` + \| `"columnVisibilityFeature"` *extends* keyof `TFeatures` ? [`Row_ColumnVisibility`](../interfaces/Row_ColumnVisibility.md)\<`TFeatures`, `TData`\> : `never` + \| `"rowExpandingFeature"` *extends* keyof `TFeatures` ? [`Row_RowExpanding`](../interfaces/Row_RowExpanding.md) : `never` + \| `"rowPinningFeature"` *extends* keyof `TFeatures` ? [`Row_RowPinning`](../interfaces/Row_RowPinning.md) : `never` + \| `"rowSelectionFeature"` *extends* keyof `TFeatures` ? [`Row_RowSelection`](../interfaces/Row_RowSelection.md) : `never`\> & [`UnionToIntersection`](../type-aliases/UnionToIntersection.md)\<\{ \[K in string \| number \| symbol\]: TFeatures\[K\] extends TableFeature\ ? "Row" extends keyof FeatureConstructorOptions ? FeatureConstructorOptions\[keyof FeatureConstructorOptions & "Row"\] : never : any \}\[keyof `TFeatures`\]\> & [`Row_Plugins`](../interfaces/Row_Plugins.md)\<`TFeatures`, `TData`\> & `Partial`\<[`Row_ColumnGrouping`](../interfaces/Row_ColumnGrouping.md)\> + +### columnId + +`string` + +## Returns + +`any` diff --git a/docs/reference/functions/row_getIsAllParentsExpanded.md b/docs/reference/functions/row_getIsAllParentsExpanded.md new file mode 100644 index 0000000000..d467263217 --- /dev/null +++ b/docs/reference/functions/row_getIsAllParentsExpanded.md @@ -0,0 +1,32 @@ +--- +id: row_getIsAllParentsExpanded +title: row_getIsAllParentsExpanded +--- + +# Function: row\_getIsAllParentsExpanded() + +```ts +function row_getIsAllParentsExpanded(row): boolean; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:182](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L182) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### row + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/row_getIsAllSubRowsSelected.md b/docs/reference/functions/row_getIsAllSubRowsSelected.md new file mode 100644 index 0000000000..cedddf3b13 --- /dev/null +++ b/docs/reference/functions/row_getIsAllSubRowsSelected.md @@ -0,0 +1,32 @@ +--- +id: row_getIsAllSubRowsSelected +title: row_getIsAllSubRowsSelected +--- + +# Function: row\_getIsAllSubRowsSelected() + +```ts +function row_getIsAllSubRowsSelected(row): boolean; +``` + +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:288](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L288) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### row + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/row_getIsExpanded.md b/docs/reference/functions/row_getIsExpanded.md new file mode 100644 index 0000000000..7b2e324adb --- /dev/null +++ b/docs/reference/functions/row_getIsExpanded.md @@ -0,0 +1,32 @@ +--- +id: row_getIsExpanded +title: row_getIsExpanded +--- + +# Function: row\_getIsExpanded() + +```ts +function row_getIsExpanded(row): boolean; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:160](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L160) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### row + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/row_getIsGrouped.md b/docs/reference/functions/row_getIsGrouped.md new file mode 100644 index 0000000000..b50ea63062 --- /dev/null +++ b/docs/reference/functions/row_getIsGrouped.md @@ -0,0 +1,39 @@ +--- +id: row_getIsGrouped +title: row_getIsGrouped +--- + +# Function: row\_getIsGrouped() + +```ts +function row_getIsGrouped(row): boolean; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:130](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L130) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### row + +[`Row_Core`](../interfaces/Row_Core.md)\<`TFeatures`, `TData`\> & [`UnionToIntersection`](../type-aliases/UnionToIntersection.md)\< + \| `"columnFilteringFeature"` *extends* keyof `TFeatures` ? [`Row_ColumnFiltering`](../interfaces/Row_ColumnFiltering.md)\<`TFeatures`, `TData`\> : `never` + \| `"columnGroupingFeature"` *extends* keyof `TFeatures` ? [`Row_ColumnGrouping`](../interfaces/Row_ColumnGrouping.md) : `never` + \| `"columnPinningFeature"` *extends* keyof `TFeatures` ? [`Row_ColumnPinning`](../interfaces/Row_ColumnPinning.md)\<`TFeatures`, `TData`\> : `never` + \| `"columnVisibilityFeature"` *extends* keyof `TFeatures` ? [`Row_ColumnVisibility`](../interfaces/Row_ColumnVisibility.md)\<`TFeatures`, `TData`\> : `never` + \| `"rowExpandingFeature"` *extends* keyof `TFeatures` ? [`Row_RowExpanding`](../interfaces/Row_RowExpanding.md) : `never` + \| `"rowPinningFeature"` *extends* keyof `TFeatures` ? [`Row_RowPinning`](../interfaces/Row_RowPinning.md) : `never` + \| `"rowSelectionFeature"` *extends* keyof `TFeatures` ? [`Row_RowSelection`](../interfaces/Row_RowSelection.md) : `never`\> & [`UnionToIntersection`](../type-aliases/UnionToIntersection.md)\<\{ \[K in string \| number \| symbol\]: TFeatures\[K\] extends TableFeature\ ? "Row" extends keyof FeatureConstructorOptions ? FeatureConstructorOptions\[keyof FeatureConstructorOptions & "Row"\] : never : any \}\[keyof `TFeatures`\]\> & [`Row_Plugins`](../interfaces/Row_Plugins.md)\<`TFeatures`, `TData`\> & `Partial`\<[`Row_ColumnGrouping`](../interfaces/Row_ColumnGrouping.md)\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/row_getIsPinned.md b/docs/reference/functions/row_getIsPinned.md new file mode 100644 index 0000000000..808317d1d4 --- /dev/null +++ b/docs/reference/functions/row_getIsPinned.md @@ -0,0 +1,32 @@ +--- +id: row_getIsPinned +title: row_getIsPinned +--- + +# Function: row\_getIsPinned() + +```ts +function row_getIsPinned(row): RowPinningPosition; +``` + +Defined in: [features/row-pinning/rowPinningFeature.utils.ts:130](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L130) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### row + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +## Returns + +[`RowPinningPosition`](../type-aliases/RowPinningPosition.md) diff --git a/docs/reference/functions/row_getIsSelected.md b/docs/reference/functions/row_getIsSelected.md new file mode 100644 index 0000000000..365338394a --- /dev/null +++ b/docs/reference/functions/row_getIsSelected.md @@ -0,0 +1,32 @@ +--- +id: row_getIsSelected +title: row_getIsSelected +--- + +# Function: row\_getIsSelected() + +```ts +function row_getIsSelected(row): boolean; +``` + +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:274](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L274) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### row + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/row_getIsSomeSelected.md b/docs/reference/functions/row_getIsSomeSelected.md new file mode 100644 index 0000000000..44be8b91b7 --- /dev/null +++ b/docs/reference/functions/row_getIsSomeSelected.md @@ -0,0 +1,32 @@ +--- +id: row_getIsSomeSelected +title: row_getIsSomeSelected +--- + +# Function: row\_getIsSomeSelected() + +```ts +function row_getIsSomeSelected(row): boolean; +``` + +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:281](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L281) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### row + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/row_getLeafRows.md b/docs/reference/functions/row_getLeafRows.md new file mode 100644 index 0000000000..3f80aefab9 --- /dev/null +++ b/docs/reference/functions/row_getLeafRows.md @@ -0,0 +1,32 @@ +--- +id: row_getLeafRows +title: row_getLeafRows +--- + +# Function: row\_getLeafRows() + +```ts +function row_getLeafRows(row): Row[]; +``` + +Defined in: [core/rows/coreRowsFeature.utils.ts:62](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L62) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### row + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +## Returns + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\>[] diff --git a/docs/reference/functions/row_getLeftVisibleCells.md b/docs/reference/functions/row_getLeftVisibleCells.md new file mode 100644 index 0000000000..30cc8f5d60 --- /dev/null +++ b/docs/reference/functions/row_getLeftVisibleCells.md @@ -0,0 +1,32 @@ +--- +id: row_getLeftVisibleCells +title: row_getLeftVisibleCells +--- + +# Function: row\_getLeftVisibleCells() + +```ts +function row_getLeftVisibleCells(row): Cell[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:133](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L133) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### row + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +## Returns + +[`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `unknown`\>[] diff --git a/docs/reference/functions/row_getParentRow.md b/docs/reference/functions/row_getParentRow.md new file mode 100644 index 0000000000..1a864d7127 --- /dev/null +++ b/docs/reference/functions/row_getParentRow.md @@ -0,0 +1,32 @@ +--- +id: row_getParentRow +title: row_getParentRow +--- + +# Function: row\_getParentRow() + +```ts +function row_getParentRow(row): Row | undefined; +``` + +Defined in: [core/rows/coreRowsFeature.utils.ts:69](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L69) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### row + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +## Returns + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> \| `undefined` diff --git a/docs/reference/functions/row_getParentRows.md b/docs/reference/functions/row_getParentRows.md new file mode 100644 index 0000000000..04f0151e1d --- /dev/null +++ b/docs/reference/functions/row_getParentRows.md @@ -0,0 +1,32 @@ +--- +id: row_getParentRows +title: row_getParentRows +--- + +# Function: row\_getParentRows() + +```ts +function row_getParentRows(row): Row[]; +``` + +Defined in: [core/rows/coreRowsFeature.utils.ts:76](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L76) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### row + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +## Returns + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\>[] diff --git a/docs/reference/functions/row_getPinnedIndex.md b/docs/reference/functions/row_getPinnedIndex.md new file mode 100644 index 0000000000..8afb2f381f --- /dev/null +++ b/docs/reference/functions/row_getPinnedIndex.md @@ -0,0 +1,32 @@ +--- +id: row_getPinnedIndex +title: row_getPinnedIndex +--- + +# Function: row\_getPinnedIndex() + +```ts +function row_getPinnedIndex(row): number; +``` + +Defined in: [features/row-pinning/rowPinningFeature.utils.ts:144](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L144) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### row + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +## Returns + +`number` diff --git a/docs/reference/functions/row_getRightVisibleCells.md b/docs/reference/functions/row_getRightVisibleCells.md new file mode 100644 index 0000000000..8e76ff1cd0 --- /dev/null +++ b/docs/reference/functions/row_getRightVisibleCells.md @@ -0,0 +1,32 @@ +--- +id: row_getRightVisibleCells +title: row_getRightVisibleCells +--- + +# Function: row\_getRightVisibleCells() + +```ts +function row_getRightVisibleCells(row): any; +``` + +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:154](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L154) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### row + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +## Returns + +`any` diff --git a/docs/reference/functions/row_getToggleExpandedHandler.md b/docs/reference/functions/row_getToggleExpandedHandler.md new file mode 100644 index 0000000000..63f7a760e6 --- /dev/null +++ b/docs/reference/functions/row_getToggleExpandedHandler.md @@ -0,0 +1,38 @@ +--- +id: row_getToggleExpandedHandler +title: row_getToggleExpandedHandler +--- + +# Function: row\_getToggleExpandedHandler() + +```ts +function row_getToggleExpandedHandler(row): () => void; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:197](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L197) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### row + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +## Returns + +```ts +(): void; +``` + +### Returns + +`void` diff --git a/docs/reference/functions/row_getToggleSelectedHandler.md b/docs/reference/functions/row_getToggleSelectedHandler.md new file mode 100644 index 0000000000..40f35c4694 --- /dev/null +++ b/docs/reference/functions/row_getToggleSelectedHandler.md @@ -0,0 +1,44 @@ +--- +id: row_getToggleSelectedHandler +title: row_getToggleSelectedHandler +--- + +# Function: row\_getToggleSelectedHandler() + +```ts +function row_getToggleSelectedHandler(row): (e) => void; +``` + +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:331](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L331) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### row + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +## Returns + +```ts +(e): void; +``` + +### Parameters + +#### e + +`unknown` + +### Returns + +`void` diff --git a/docs/reference/functions/row_getUniqueValues.md b/docs/reference/functions/row_getUniqueValues.md new file mode 100644 index 0000000000..8a3798ef16 --- /dev/null +++ b/docs/reference/functions/row_getUniqueValues.md @@ -0,0 +1,36 @@ +--- +id: row_getUniqueValues +title: row_getUniqueValues +--- + +# Function: row\_getUniqueValues() + +```ts +function row_getUniqueValues(row, columnId): unknown; +``` + +Defined in: [core/rows/coreRowsFeature.utils.ts:28](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L28) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### row + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +### columnId + +`string` + +## Returns + +`unknown` diff --git a/docs/reference/functions/row_getValue.md b/docs/reference/functions/row_getValue.md new file mode 100644 index 0000000000..8b0b76acfb --- /dev/null +++ b/docs/reference/functions/row_getValue.md @@ -0,0 +1,36 @@ +--- +id: row_getValue +title: row_getValue +--- + +# Function: row\_getValue() + +```ts +function row_getValue(row, columnId): unknown; +``` + +Defined in: [core/rows/coreRowsFeature.utils.ts:9](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L9) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### row + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +### columnId + +`string` + +## Returns + +`unknown` diff --git a/docs/reference/functions/row_getVisibleCells.md b/docs/reference/functions/row_getVisibleCells.md new file mode 100644 index 0000000000..8db6cd77b3 --- /dev/null +++ b/docs/reference/functions/row_getVisibleCells.md @@ -0,0 +1,43 @@ +--- +id: row_getVisibleCells +title: row_getVisibleCells +--- + +# Function: row\_getVisibleCells() + +```ts +function row_getVisibleCells( + left, + center, + right): Cell[]; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:79](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L79) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### left + +[`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `unknown`\>[] + +### center + +[`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `unknown`\>[] + +### right + +[`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `unknown`\>[] + +## Returns + +[`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `unknown`\>[] diff --git a/docs/reference/functions/row_pin.md b/docs/reference/functions/row_pin.md new file mode 100644 index 0000000000..5b692e2b2c --- /dev/null +++ b/docs/reference/functions/row_pin.md @@ -0,0 +1,48 @@ +--- +id: row_pin +title: row_pin +--- + +# Function: row\_pin() + +```ts +function row_pin( + row, + position, + includeLeafRows?, + includeParentRows?): void; +``` + +Defined in: [features/row-pinning/rowPinningFeature.utils.ts:160](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L160) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### row + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +### position + +[`RowPinningPosition`](../type-aliases/RowPinningPosition.md) + +### includeLeafRows? + +`boolean` + +### includeParentRows? + +`boolean` + +## Returns + +`void` diff --git a/docs/reference/functions/row_renderValue.md b/docs/reference/functions/row_renderValue.md new file mode 100644 index 0000000000..7f81dcf762 --- /dev/null +++ b/docs/reference/functions/row_renderValue.md @@ -0,0 +1,36 @@ +--- +id: row_renderValue +title: row_renderValue +--- + +# Function: row\_renderValue() + +```ts +function row_renderValue(row, columnId): any; +``` + +Defined in: [core/rows/coreRowsFeature.utils.ts:55](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L55) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### row + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +### columnId + +`string` + +## Returns + +`any` diff --git a/docs/reference/functions/row_toggleExpanded.md b/docs/reference/functions/row_toggleExpanded.md new file mode 100644 index 0000000000..82e29ac378 --- /dev/null +++ b/docs/reference/functions/row_toggleExpanded.md @@ -0,0 +1,36 @@ +--- +id: row_toggleExpanded +title: row_toggleExpanded +--- + +# Function: row\_toggleExpanded() + +```ts +function row_toggleExpanded(row, expanded?): void; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:125](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L125) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### row + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +### expanded? + +`boolean` + +## Returns + +`void` diff --git a/docs/reference/functions/row_toggleSelected.md b/docs/reference/functions/row_toggleSelected.md new file mode 100644 index 0000000000..d812cae9a1 --- /dev/null +++ b/docs/reference/functions/row_toggleSelected.md @@ -0,0 +1,45 @@ +--- +id: row_toggleSelected +title: row_toggleSelected +--- + +# Function: row\_toggleSelected() + +```ts +function row_toggleSelected( + row, + value?, + opts?): void; +``` + +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:241](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L241) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### row + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +### value? + +`boolean` + +### opts? + +#### selectChildren? + +`boolean` + +## Returns + +`void` diff --git a/docs/reference/functions/selectRowsFn.md b/docs/reference/functions/selectRowsFn.md new file mode 100644 index 0000000000..81c72ba780 --- /dev/null +++ b/docs/reference/functions/selectRowsFn.md @@ -0,0 +1,32 @@ +--- +id: selectRowsFn +title: selectRowsFn +--- + +# Function: selectRowsFn() + +```ts +function selectRowsFn(rowModel): RowModel; +``` + +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:376](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L376) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### rowModel + +[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> + +## Returns + +[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/shouldAutoRemoveFilter.md b/docs/reference/functions/shouldAutoRemoveFilter.md new file mode 100644 index 0000000000..06d3fd1d4e --- /dev/null +++ b/docs/reference/functions/shouldAutoRemoveFilter.md @@ -0,0 +1,47 @@ +--- +id: shouldAutoRemoveFilter +title: shouldAutoRemoveFilter +--- + +# Function: shouldAutoRemoveFilter() + +```ts +function shouldAutoRemoveFilter( + filterFn?, + value?, + column?): boolean; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:194](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L194) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* `unknown` = `unknown` + +## Parameters + +### filterFn? + +[`FilterFn`](../interfaces/FilterFn.md)\<`TFeatures`, `TData`\> + +### value? + +`any` + +### column? + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/tableFeatures.md b/docs/reference/functions/tableFeatures.md new file mode 100644 index 0000000000..1b0a5c8cd1 --- /dev/null +++ b/docs/reference/functions/tableFeatures.md @@ -0,0 +1,40 @@ +--- +id: tableFeatures +title: tableFeatures +--- + +# Function: tableFeatures() + +```ts +function tableFeatures(features): TFeatures; +``` + +Defined in: [helpers/tableFeatures.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableFeatures.ts#L14) + +A helper function to help define the features that are to be imported and applied to a table instance. +Use this utility to make it easier to have the correct type inference for the features that are being imported. +**Note:** It is recommended to use this utility statically outside of a component. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +## Parameters + +### features + +`TFeatures` + +## Returns + +`TFeatures` + +## Example + +``` +import { tableFeatures, columnVisibilityFeature, rowPinningFeature } from '@tanstack/react-table' +const _features = tableFeatures({ columnVisibilityFeature, rowPinningFeature }); +const table = useTable({ _features, rowModels: {}, columns, data }); +``` diff --git a/docs/reference/functions/tableMemo.md b/docs/reference/functions/tableMemo.md new file mode 100644 index 0000000000..c84ceb09a7 --- /dev/null +++ b/docs/reference/functions/tableMemo.md @@ -0,0 +1,52 @@ +--- +id: tableMemo +title: tableMemo +--- + +# Function: tableMemo() + +```ts +function tableMemo(__namedParameters): (depArgs?) => TResult; +``` + +Defined in: [utils.ts:148](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L148) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TDeps + +`TDeps` *extends* readonly `any`[] + +### TDepArgs + +`TDepArgs` + +### TResult + +`TResult` + +## Parameters + +### \_\_namedParameters + +`TableMemoOptions`\<`TFeatures`, `TDeps`, `TDepArgs`, `TResult`\> + +## Returns + +```ts +(depArgs?): TResult; +``` + +### Parameters + +#### depArgs? + +`TDepArgs` + +### Returns + +`TResult` diff --git a/docs/reference/functions/tableOptions.md b/docs/reference/functions/tableOptions.md new file mode 100644 index 0000000000..46944ecc2d --- /dev/null +++ b/docs/reference/functions/tableOptions.md @@ -0,0 +1,230 @@ +--- +id: tableOptions +title: tableOptions +--- + +# Function: tableOptions() + +## Call Signature + +```ts +function tableOptions(options): Omit, "_features" | "columns"> & object; +``` + +Defined in: [helpers/tableOptions.ts:5](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableOptions.ts#L5) + +### Type Parameters + +#### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +#### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) = `any` + +### Parameters + +#### options + +`Omit`\<[`TableOptions`](../type-aliases/TableOptions.md)\<`TFeatures`, `TData`\>, `"columns"`\> & `object` + +### Returns + +`Omit`\<[`TableOptions`](../type-aliases/TableOptions.md)\<`TFeatures`, `TData`\>, `"_features"` \| `"columns"`\> & `object` + +## Call Signature + +```ts +function tableOptions(options): Omit, "_features" | "data"> & object; +``` + +Defined in: [helpers/tableOptions.ts:16](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableOptions.ts#L16) + +### Type Parameters + +#### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +#### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) = `any` + +### Parameters + +#### options + +`Omit`\<[`TableOptions`](../type-aliases/TableOptions.md)\<`TFeatures`, `TData`\>, `"data"`\> & `object` + +### Returns + +`Omit`\<[`TableOptions`](../type-aliases/TableOptions.md)\<`TFeatures`, `TData`\>, `"_features"` \| `"data"`\> & `object` + +## Call Signature + +```ts +function tableOptions(options): Omit, "_features">; +``` + +Defined in: [helpers/tableOptions.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableOptions.ts#L27) + +### Type Parameters + +#### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +#### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) = `any` + +### Parameters + +#### options + +`Omit`\<[`TableOptions`](../type-aliases/TableOptions.md)\<`TFeatures`, `TData`\>, `"_features"`\> + +### Returns + +`Omit`\<[`TableOptions`](../type-aliases/TableOptions.md)\<`TFeatures`, `TData`\>, `"_features"`\> + +## Call Signature + +```ts +function tableOptions(options): Omit, "_features" | "data" | "columns"> & object; +``` + +Defined in: [helpers/tableOptions.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableOptions.ts#L34) + +### Type Parameters + +#### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +#### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) = `any` + +### Parameters + +#### options + +`Omit`\<[`TableOptions`](../type-aliases/TableOptions.md)\<`TFeatures`, `TData`\>, `"data"` \| `"columns"`\> & `object` + +### Returns + +`Omit`\<[`TableOptions`](../type-aliases/TableOptions.md)\<`TFeatures`, `TData`\>, `"_features"` \| `"data"` \| `"columns"`\> & `object` + +## Call Signature + +```ts +function tableOptions(options): Omit, "data" | "_features">; +``` + +Defined in: [helpers/tableOptions.ts:45](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableOptions.ts#L45) + +### Type Parameters + +#### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +#### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) = `any` + +### Parameters + +#### options + +`Omit`\<[`TableOptions`](../type-aliases/TableOptions.md)\<`TFeatures`, `TData`\>, `"data"` \| `"_features"`\> + +### Returns + +`Omit`\<[`TableOptions`](../type-aliases/TableOptions.md)\<`TFeatures`, `TData`\>, `"data"` \| `"_features"`\> + +## Call Signature + +```ts +function tableOptions(options): Omit, "columns" | "_features">; +``` + +Defined in: [helpers/tableOptions.ts:52](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableOptions.ts#L52) + +### Type Parameters + +#### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +#### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) = `any` + +### Parameters + +#### options + +`Omit`\<[`TableOptions`](../type-aliases/TableOptions.md)\<`TFeatures`, `TData`\>, `"columns"` \| `"_features"`\> + +### Returns + +`Omit`\<[`TableOptions`](../type-aliases/TableOptions.md)\<`TFeatures`, `TData`\>, `"columns"` \| `"_features"`\> + +## Call Signature + +```ts +function tableOptions(options): Omit, "data" | "columns" | "_features">; +``` + +Defined in: [helpers/tableOptions.ts:59](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableOptions.ts#L59) + +### Type Parameters + +#### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +#### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) = `any` + +### Parameters + +#### options + +`Omit`\<[`TableOptions`](../type-aliases/TableOptions.md)\<`TFeatures`, `TData`\>, `"data"` \| `"columns"` \| `"_features"`\> + +### Returns + +`Omit`\<[`TableOptions`](../type-aliases/TableOptions.md)\<`TFeatures`, `TData`\>, `"data"` \| `"columns"` \| `"_features"`\> + +## Call Signature + +```ts +function tableOptions(options): TableOptions; +``` + +Defined in: [helpers/tableOptions.ts:69](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableOptions.ts#L69) + +### Type Parameters + +#### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +#### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) = `any` + +### Parameters + +#### options + +[`TableOptions`](../type-aliases/TableOptions.md)\<`TFeatures`, `TData`\> + +### Returns + +[`TableOptions`](../type-aliases/TableOptions.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_autoResetExpanded.md b/docs/reference/functions/table_autoResetExpanded.md new file mode 100644 index 0000000000..dd6be0c731 --- /dev/null +++ b/docs/reference/functions/table_autoResetExpanded.md @@ -0,0 +1,32 @@ +--- +id: table_autoResetExpanded +title: table_autoResetExpanded +--- + +# Function: table\_autoResetExpanded() + +```ts +function table_autoResetExpanded(table): void; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L14) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`void` diff --git a/docs/reference/functions/table_autoResetPageIndex.md b/docs/reference/functions/table_autoResetPageIndex.md new file mode 100644 index 0000000000..2fe5a61126 --- /dev/null +++ b/docs/reference/functions/table_autoResetPageIndex.md @@ -0,0 +1,32 @@ +--- +id: table_autoResetPageIndex +title: table_autoResetPageIndex +--- + +# Function: table\_autoResetPageIndex() + +```ts +function table_autoResetPageIndex(table): void; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:17](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L17) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`void` diff --git a/docs/reference/functions/table_firstPage.md b/docs/reference/functions/table_firstPage.md new file mode 100644 index 0000000000..c9c9edca1b --- /dev/null +++ b/docs/reference/functions/table_firstPage.md @@ -0,0 +1,32 @@ +--- +id: table_firstPage +title: table_firstPage +--- + +# Function: table\_firstPage() + +```ts +function table_firstPage(table): void; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:172](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L172) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`void` diff --git a/docs/reference/functions/table_getAllColumns.md b/docs/reference/functions/table_getAllColumns.md new file mode 100644 index 0000000000..3262d7014e --- /dev/null +++ b/docs/reference/functions/table_getAllColumns.md @@ -0,0 +1,32 @@ +--- +id: table_getAllColumns +title: table_getAllColumns +--- + +# Function: table\_getAllColumns() + +```ts +function table_getAllColumns(table): Column[]; +``` + +Defined in: [core/columns/coreColumnsFeature.utils.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L75) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `unknown`\>[] diff --git a/docs/reference/functions/table_getAllFlatColumns.md b/docs/reference/functions/table_getAllFlatColumns.md new file mode 100644 index 0000000000..05f9b41efa --- /dev/null +++ b/docs/reference/functions/table_getAllFlatColumns.md @@ -0,0 +1,32 @@ +--- +id: table_getAllFlatColumns +title: table_getAllFlatColumns +--- + +# Function: table\_getAllFlatColumns() + +```ts +function table_getAllFlatColumns(table): Column[]; +``` + +Defined in: [core/columns/coreColumnsFeature.utils.ts:106](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L106) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `unknown`\>[] diff --git a/docs/reference/functions/table_getAllFlatColumnsById.md b/docs/reference/functions/table_getAllFlatColumnsById.md new file mode 100644 index 0000000000..f8824493cc --- /dev/null +++ b/docs/reference/functions/table_getAllFlatColumnsById.md @@ -0,0 +1,32 @@ +--- +id: table_getAllFlatColumnsById +title: table_getAllFlatColumnsById +--- + +# Function: table\_getAllFlatColumnsById() + +```ts +function table_getAllFlatColumnsById(table): Record>; +``` + +Defined in: [core/columns/coreColumnsFeature.utils.ts:115](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L115) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`Record`\<`string`, [`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `unknown`\>\> diff --git a/docs/reference/functions/table_getAllLeafColumns.md b/docs/reference/functions/table_getAllLeafColumns.md new file mode 100644 index 0000000000..99da39c0b7 --- /dev/null +++ b/docs/reference/functions/table_getAllLeafColumns.md @@ -0,0 +1,32 @@ +--- +id: table_getAllLeafColumns +title: table_getAllLeafColumns +--- + +# Function: table\_getAllLeafColumns() + +```ts +function table_getAllLeafColumns(table): Column[]; +``` + +Defined in: [core/columns/coreColumnsFeature.utils.ts:130](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L130) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `unknown`\>[] diff --git a/docs/reference/functions/table_getBottomRows.md b/docs/reference/functions/table_getBottomRows.md new file mode 100644 index 0000000000..7aa3adfd74 --- /dev/null +++ b/docs/reference/functions/table_getBottomRows.md @@ -0,0 +1,32 @@ +--- +id: table_getBottomRows +title: table_getBottomRows +--- + +# Function: table\_getBottomRows() + +```ts +function table_getBottomRows(table): Row[]; +``` + +Defined in: [features/row-pinning/rowPinningFeature.utils.ts:98](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L98) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\>[] diff --git a/docs/reference/functions/table_getCanNextPage.md b/docs/reference/functions/table_getCanNextPage.md new file mode 100644 index 0000000000..c73e8f1e42 --- /dev/null +++ b/docs/reference/functions/table_getCanNextPage.md @@ -0,0 +1,32 @@ +--- +id: table_getCanNextPage +title: table_getCanNextPage +--- + +# Function: table\_getCanNextPage() + +```ts +function table_getCanNextPage(table): boolean; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:137](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L137) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/table_getCanPreviousPage.md b/docs/reference/functions/table_getCanPreviousPage.md new file mode 100644 index 0000000000..e54fcb4a1c --- /dev/null +++ b/docs/reference/functions/table_getCanPreviousPage.md @@ -0,0 +1,32 @@ +--- +id: table_getCanPreviousPage +title: table_getCanPreviousPage +--- + +# Function: table\_getCanPreviousPage() + +```ts +function table_getCanPreviousPage(table): boolean; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:130](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L130) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/table_getCanSomeRowsExpand.md b/docs/reference/functions/table_getCanSomeRowsExpand.md new file mode 100644 index 0000000000..490ba549a3 --- /dev/null +++ b/docs/reference/functions/table_getCanSomeRowsExpand.md @@ -0,0 +1,32 @@ +--- +id: table_getCanSomeRowsExpand +title: table_getCanSomeRowsExpand +--- + +# Function: table\_getCanSomeRowsExpand() + +```ts +function table_getCanSomeRowsExpand(table): boolean; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:55](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L55) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/table_getCenterFlatHeaders.md b/docs/reference/functions/table_getCenterFlatHeaders.md new file mode 100644 index 0000000000..ce24cd11a3 --- /dev/null +++ b/docs/reference/functions/table_getCenterFlatHeaders.md @@ -0,0 +1,32 @@ +--- +id: table_getCenterFlatHeaders +title: table_getCenterFlatHeaders +--- + +# Function: table\_getCenterFlatHeaders() + +```ts +function table_getCenterFlatHeaders(table): any[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:347](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L347) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`any`[] diff --git a/docs/reference/functions/table_getCenterFooterGroups.md b/docs/reference/functions/table_getCenterFooterGroups.md new file mode 100644 index 0000000000..9cc6033926 --- /dev/null +++ b/docs/reference/functions/table_getCenterFooterGroups.md @@ -0,0 +1,32 @@ +--- +id: table_getCenterFooterGroups +title: table_getCenterFooterGroups +--- + +# Function: table\_getCenterFooterGroups() + +```ts +function table_getCenterFooterGroups(table): any[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:301](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L301) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`any`[] diff --git a/docs/reference/functions/table_getCenterHeaderGroups.md b/docs/reference/functions/table_getCenterHeaderGroups.md new file mode 100644 index 0000000000..7f0deb46c2 --- /dev/null +++ b/docs/reference/functions/table_getCenterHeaderGroups.md @@ -0,0 +1,32 @@ +--- +id: table_getCenterHeaderGroups +title: table_getCenterHeaderGroups +--- + +# Function: table\_getCenterHeaderGroups() + +```ts +function table_getCenterHeaderGroups(table): HeaderGroup[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:253](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L253) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +[`HeaderGroup`](../type-aliases/HeaderGroup.md)\<`TFeatures`, `TData`\>[] diff --git a/docs/reference/functions/table_getCenterLeafColumns.md b/docs/reference/functions/table_getCenterLeafColumns.md new file mode 100644 index 0000000000..7e9fde45b1 --- /dev/null +++ b/docs/reference/functions/table_getCenterLeafColumns.md @@ -0,0 +1,32 @@ +--- +id: table_getCenterLeafColumns +title: table_getCenterLeafColumns +--- + +# Function: table\_getCenterLeafColumns() + +```ts +function table_getCenterLeafColumns(table): Column[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:428](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L428) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `unknown`\>[] diff --git a/docs/reference/functions/table_getCenterLeafHeaders.md b/docs/reference/functions/table_getCenterLeafHeaders.md new file mode 100644 index 0000000000..386bf7cc48 --- /dev/null +++ b/docs/reference/functions/table_getCenterLeafHeaders.md @@ -0,0 +1,32 @@ +--- +id: table_getCenterLeafHeaders +title: table_getCenterLeafHeaders +--- + +# Function: table\_getCenterLeafHeaders() + +```ts +function table_getCenterLeafHeaders(table): any[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:387](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L387) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`any`[] diff --git a/docs/reference/functions/table_getCenterRows.md b/docs/reference/functions/table_getCenterRows.md new file mode 100644 index 0000000000..e45da10c5a --- /dev/null +++ b/docs/reference/functions/table_getCenterRows.md @@ -0,0 +1,32 @@ +--- +id: table_getCenterRows +title: table_getCenterRows +--- + +# Function: table\_getCenterRows() + +```ts +function table_getCenterRows(table): Row[]; +``` + +Defined in: [features/row-pinning/rowPinningFeature.utils.ts:105](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L105) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\>[] diff --git a/docs/reference/functions/table_getCenterTotalSize.md b/docs/reference/functions/table_getCenterTotalSize.md new file mode 100644 index 0000000000..0c48b509cc --- /dev/null +++ b/docs/reference/functions/table_getCenterTotalSize.md @@ -0,0 +1,32 @@ +--- +id: table_getCenterTotalSize +title: table_getCenterTotalSize +--- + +# Function: table\_getCenterTotalSize() + +```ts +function table_getCenterTotalSize(table): any; +``` + +Defined in: [features/column-sizing/columnSizingFeature.utils.ts:183](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L183) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`any` diff --git a/docs/reference/functions/table_getCenterVisibleLeafColumns.md b/docs/reference/functions/table_getCenterVisibleLeafColumns.md new file mode 100644 index 0000000000..fdeeef1102 --- /dev/null +++ b/docs/reference/functions/table_getCenterVisibleLeafColumns.md @@ -0,0 +1,32 @@ +--- +id: table_getCenterVisibleLeafColumns +title: table_getCenterVisibleLeafColumns +--- + +# Function: table\_getCenterVisibleLeafColumns() + +```ts +function table_getCenterVisibleLeafColumns(table): any[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:494](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L494) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`any`[] diff --git a/docs/reference/functions/table_getColumn.md b/docs/reference/functions/table_getColumn.md new file mode 100644 index 0000000000..739efd2ccc --- /dev/null +++ b/docs/reference/functions/table_getColumn.md @@ -0,0 +1,39 @@ +--- +id: table_getColumn +title: table_getColumn +--- + +# Function: table\_getColumn() + +```ts +function table_getColumn(table, columnId): + | Column + | undefined; +``` + +Defined in: [core/columns/coreColumnsFeature.utils.ts:146](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L146) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### columnId + +`string` + +## Returns + + \| [`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `unknown`\> + \| `undefined` diff --git a/docs/reference/functions/table_getCoreRowModel.md b/docs/reference/functions/table_getCoreRowModel.md new file mode 100644 index 0000000000..012c6b3ace --- /dev/null +++ b/docs/reference/functions/table_getCoreRowModel.md @@ -0,0 +1,32 @@ +--- +id: table_getCoreRowModel +title: table_getCoreRowModel +--- + +# Function: table\_getCoreRowModel() + +```ts +function table_getCoreRowModel(table): RowModel; +``` + +Defined in: [core/row-models/coreRowModelsFeature.utils.ts:7](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L7) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_getDefaultColumnDef.md b/docs/reference/functions/table_getDefaultColumnDef.md new file mode 100644 index 0000000000..32760590af --- /dev/null +++ b/docs/reference/functions/table_getDefaultColumnDef.md @@ -0,0 +1,32 @@ +--- +id: table_getDefaultColumnDef +title: table_getDefaultColumnDef +--- + +# Function: table\_getDefaultColumnDef() + +```ts +function table_getDefaultColumnDef(table): Partial>; +``` + +Defined in: [core/columns/coreColumnsFeature.utils.ts:46](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L46) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`Partial`\<[`ColumnDef`](../type-aliases/ColumnDef.md)\<`TFeatures`, `TData`, `unknown`\>\> diff --git a/docs/reference/functions/table_getExpandedDepth.md b/docs/reference/functions/table_getExpandedDepth.md new file mode 100644 index 0000000000..b91886b413 --- /dev/null +++ b/docs/reference/functions/table_getExpandedDepth.md @@ -0,0 +1,32 @@ +--- +id: table_getExpandedDepth +title: table_getExpandedDepth +--- + +# Function: table\_getExpandedDepth() + +```ts +function table_getExpandedDepth(table): number; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:106](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L106) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`number` diff --git a/docs/reference/functions/table_getExpandedRowModel.md b/docs/reference/functions/table_getExpandedRowModel.md new file mode 100644 index 0000000000..c6d0715b72 --- /dev/null +++ b/docs/reference/functions/table_getExpandedRowModel.md @@ -0,0 +1,32 @@ +--- +id: table_getExpandedRowModel +title: table_getExpandedRowModel +--- + +# Function: table\_getExpandedRowModel() + +```ts +function table_getExpandedRowModel(table): RowModel; +``` + +Defined in: [core/row-models/coreRowModelsFeature.utils.ts:96](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L96) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_getFilteredRowModel.md b/docs/reference/functions/table_getFilteredRowModel.md new file mode 100644 index 0000000000..82278c50a5 --- /dev/null +++ b/docs/reference/functions/table_getFilteredRowModel.md @@ -0,0 +1,32 @@ +--- +id: table_getFilteredRowModel +title: table_getFilteredRowModel +--- + +# Function: table\_getFilteredRowModel() + +```ts +function table_getFilteredRowModel(table): RowModel; +``` + +Defined in: [core/row-models/coreRowModelsFeature.utils.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L27) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_getFilteredSelectedRowModel.md b/docs/reference/functions/table_getFilteredSelectedRowModel.md new file mode 100644 index 0000000000..0b3bf2522e --- /dev/null +++ b/docs/reference/functions/table_getFilteredSelectedRowModel.md @@ -0,0 +1,32 @@ +--- +id: table_getFilteredSelectedRowModel +title: table_getFilteredSelectedRowModel +--- + +# Function: table\_getFilteredSelectedRowModel() + +```ts +function table_getFilteredSelectedRowModel(table): RowModel; +``` + +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:111](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L111) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_getFlatHeaders.md b/docs/reference/functions/table_getFlatHeaders.md new file mode 100644 index 0000000000..60cae4f60d --- /dev/null +++ b/docs/reference/functions/table_getFlatHeaders.md @@ -0,0 +1,32 @@ +--- +id: table_getFlatHeaders +title: table_getFlatHeaders +--- + +# Function: table\_getFlatHeaders() + +```ts +function table_getFlatHeaders(table): Header[]; +``` + +Defined in: [core/headers/coreHeadersFeature.utils.ts:90](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts#L90) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +[`Header`](../type-aliases/Header.md)\<`TFeatures`, `TData`, `unknown`\>[] diff --git a/docs/reference/functions/table_getFooterGroups.md b/docs/reference/functions/table_getFooterGroups.md new file mode 100644 index 0000000000..092f380e5f --- /dev/null +++ b/docs/reference/functions/table_getFooterGroups.md @@ -0,0 +1,32 @@ +--- +id: table_getFooterGroups +title: table_getFooterGroups +--- + +# Function: table\_getFooterGroups() + +```ts +function table_getFooterGroups(table): HeaderGroup[]; +``` + +Defined in: [core/headers/coreHeadersFeature.utils.ts:82](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts#L82) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +[`HeaderGroup`](../type-aliases/HeaderGroup.md)\<`TFeatures`, `TData`\>[] diff --git a/docs/reference/functions/table_getGlobalAutoFilterFn.md b/docs/reference/functions/table_getGlobalAutoFilterFn.md new file mode 100644 index 0000000000..1cf7e7816e --- /dev/null +++ b/docs/reference/functions/table_getGlobalAutoFilterFn.md @@ -0,0 +1,16 @@ +--- +id: table_getGlobalAutoFilterFn +title: table_getGlobalAutoFilterFn +--- + +# Function: table\_getGlobalAutoFilterFn() + +```ts +function table_getGlobalAutoFilterFn(): FilterFn; +``` + +Defined in: [features/global-filtering/globalFilteringFeature.utils.ts:23](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.utils.ts#L23) + +## Returns + +[`FilterFn`](../interfaces/FilterFn.md)\<`any`, `any`\> diff --git a/docs/reference/functions/table_getGlobalFacetedMinMaxValues.md b/docs/reference/functions/table_getGlobalFacetedMinMaxValues.md new file mode 100644 index 0000000000..43b2434a92 --- /dev/null +++ b/docs/reference/functions/table_getGlobalFacetedMinMaxValues.md @@ -0,0 +1,32 @@ +--- +id: table_getGlobalFacetedMinMaxValues +title: table_getGlobalFacetedMinMaxValues +--- + +# Function: table\_getGlobalFacetedMinMaxValues() + +```ts +function table_getGlobalFacetedMinMaxValues(table): [number, number] | undefined; +``` + +Defined in: [features/column-faceting/columnFacetingFeature.utils.ts:49](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.utils.ts#L49) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +\[`number`, `number`\] \| `undefined` diff --git a/docs/reference/functions/table_getGlobalFacetedRowModel.md b/docs/reference/functions/table_getGlobalFacetedRowModel.md new file mode 100644 index 0000000000..dbeaf848bf --- /dev/null +++ b/docs/reference/functions/table_getGlobalFacetedRowModel.md @@ -0,0 +1,32 @@ +--- +id: table_getGlobalFacetedRowModel +title: table_getGlobalFacetedRowModel +--- + +# Function: table\_getGlobalFacetedRowModel() + +```ts +function table_getGlobalFacetedRowModel(table): RowModel; +``` + +Defined in: [features/column-faceting/columnFacetingFeature.utils.ts:59](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.utils.ts#L59) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_getGlobalFacetedUniqueValues.md b/docs/reference/functions/table_getGlobalFacetedUniqueValues.md new file mode 100644 index 0000000000..ae3dc890cf --- /dev/null +++ b/docs/reference/functions/table_getGlobalFacetedUniqueValues.md @@ -0,0 +1,32 @@ +--- +id: table_getGlobalFacetedUniqueValues +title: table_getGlobalFacetedUniqueValues +--- + +# Function: table\_getGlobalFacetedUniqueValues() + +```ts +function table_getGlobalFacetedUniqueValues(table): Map; +``` + +Defined in: [features/column-faceting/columnFacetingFeature.utils.ts:69](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.utils.ts#L69) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`Map`\<`any`, `number`\> diff --git a/docs/reference/functions/table_getGlobalFilterFn.md b/docs/reference/functions/table_getGlobalFilterFn.md new file mode 100644 index 0000000000..434caadec4 --- /dev/null +++ b/docs/reference/functions/table_getGlobalFilterFn.md @@ -0,0 +1,35 @@ +--- +id: table_getGlobalFilterFn +title: table_getGlobalFilterFn +--- + +# Function: table\_getGlobalFilterFn() + +```ts +function table_getGlobalFilterFn(table): + | FilterFn + | undefined; +``` + +Defined in: [features/global-filtering/globalFilteringFeature.utils.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.utils.ts#L27) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + + \| [`FilterFn`](../interfaces/FilterFn.md)\<`TFeatures`, `TData`\> + \| `undefined` diff --git a/docs/reference/functions/table_getGroupedRowModel.md b/docs/reference/functions/table_getGroupedRowModel.md new file mode 100644 index 0000000000..d550ff834c --- /dev/null +++ b/docs/reference/functions/table_getGroupedRowModel.md @@ -0,0 +1,32 @@ +--- +id: table_getGroupedRowModel +title: table_getGroupedRowModel +--- + +# Function: table\_getGroupedRowModel() + +```ts +function table_getGroupedRowModel(table): RowModel; +``` + +Defined in: [core/row-models/coreRowModelsFeature.utils.ts:50](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L50) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_getGroupedSelectedRowModel.md b/docs/reference/functions/table_getGroupedSelectedRowModel.md new file mode 100644 index 0000000000..742ce51198 --- /dev/null +++ b/docs/reference/functions/table_getGroupedSelectedRowModel.md @@ -0,0 +1,32 @@ +--- +id: table_getGroupedSelectedRowModel +title: table_getGroupedSelectedRowModel +--- + +# Function: table\_getGroupedSelectedRowModel() + +```ts +function table_getGroupedSelectedRowModel(table): RowModel; +``` + +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:128](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L128) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_getHeaderGroups.md b/docs/reference/functions/table_getHeaderGroups.md new file mode 100644 index 0000000000..caa9b249bd --- /dev/null +++ b/docs/reference/functions/table_getHeaderGroups.md @@ -0,0 +1,32 @@ +--- +id: table_getHeaderGroups +title: table_getHeaderGroups +--- + +# Function: table\_getHeaderGroups() + +```ts +function table_getHeaderGroups(table): HeaderGroup[]; +``` + +Defined in: [core/headers/coreHeadersFeature.utils.ts:48](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts#L48) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +[`HeaderGroup`](../type-aliases/HeaderGroup.md)\<`TFeatures`, `TData`\>[] diff --git a/docs/reference/functions/table_getIsAllColumnsVisible.md b/docs/reference/functions/table_getIsAllColumnsVisible.md new file mode 100644 index 0000000000..b8ebb3acfa --- /dev/null +++ b/docs/reference/functions/table_getIsAllColumnsVisible.md @@ -0,0 +1,32 @@ +--- +id: table_getIsAllColumnsVisible +title: table_getIsAllColumnsVisible +--- + +# Function: table\_getIsAllColumnsVisible() + +```ts +function table_getIsAllColumnsVisible(table): boolean; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:150](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L150) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/table_getIsAllPageRowsSelected.md b/docs/reference/functions/table_getIsAllPageRowsSelected.md new file mode 100644 index 0000000000..960f7cac98 --- /dev/null +++ b/docs/reference/functions/table_getIsAllPageRowsSelected.md @@ -0,0 +1,32 @@ +--- +id: table_getIsAllPageRowsSelected +title: table_getIsAllPageRowsSelected +--- + +# Function: table\_getIsAllPageRowsSelected() + +```ts +function table_getIsAllPageRowsSelected(table): boolean; +``` + +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:170](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L170) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/table_getIsAllRowsExpanded.md b/docs/reference/functions/table_getIsAllRowsExpanded.md new file mode 100644 index 0000000000..ffb10bf5ba --- /dev/null +++ b/docs/reference/functions/table_getIsAllRowsExpanded.md @@ -0,0 +1,32 @@ +--- +id: table_getIsAllRowsExpanded +title: table_getIsAllRowsExpanded +--- + +# Function: table\_getIsAllRowsExpanded() + +```ts +function table_getIsAllRowsExpanded(table): boolean; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:82](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L82) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/table_getIsAllRowsSelected.md b/docs/reference/functions/table_getIsAllRowsSelected.md new file mode 100644 index 0000000000..3b93de246f --- /dev/null +++ b/docs/reference/functions/table_getIsAllRowsSelected.md @@ -0,0 +1,32 @@ +--- +id: table_getIsAllRowsSelected +title: table_getIsAllRowsSelected +--- + +# Function: table\_getIsAllRowsSelected() + +```ts +function table_getIsAllRowsSelected(table): boolean; +``` + +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:145](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L145) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/table_getIsSomeColumnsPinned.md b/docs/reference/functions/table_getIsSomeColumnsPinned.md new file mode 100644 index 0000000000..f7b1e38d84 --- /dev/null +++ b/docs/reference/functions/table_getIsSomeColumnsPinned.md @@ -0,0 +1,36 @@ +--- +id: table_getIsSomeColumnsPinned +title: table_getIsSomeColumnsPinned +--- + +# Function: table\_getIsSomeColumnsPinned() + +```ts +function table_getIsSomeColumnsPinned(table, position?): boolean; +``` + +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:199](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L199) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### position? + +[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) + +## Returns + +`boolean` diff --git a/docs/reference/functions/table_getIsSomeColumnsVisible.md b/docs/reference/functions/table_getIsSomeColumnsVisible.md new file mode 100644 index 0000000000..7214c5c9a0 --- /dev/null +++ b/docs/reference/functions/table_getIsSomeColumnsVisible.md @@ -0,0 +1,32 @@ +--- +id: table_getIsSomeColumnsVisible +title: table_getIsSomeColumnsVisible +--- + +# Function: table\_getIsSomeColumnsVisible() + +```ts +function table_getIsSomeColumnsVisible(table): boolean; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:162](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L162) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/table_getIsSomePageRowsSelected.md b/docs/reference/functions/table_getIsSomePageRowsSelected.md new file mode 100644 index 0000000000..90e749b9ee --- /dev/null +++ b/docs/reference/functions/table_getIsSomePageRowsSelected.md @@ -0,0 +1,32 @@ +--- +id: table_getIsSomePageRowsSelected +title: table_getIsSomePageRowsSelected +--- + +# Function: table\_getIsSomePageRowsSelected() + +```ts +function table_getIsSomePageRowsSelected(table): boolean; +``` + +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:203](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L203) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/table_getIsSomeRowsExpanded.md b/docs/reference/functions/table_getIsSomeRowsExpanded.md new file mode 100644 index 0000000000..362fbcfded --- /dev/null +++ b/docs/reference/functions/table_getIsSomeRowsExpanded.md @@ -0,0 +1,32 @@ +--- +id: table_getIsSomeRowsExpanded +title: table_getIsSomeRowsExpanded +--- + +# Function: table\_getIsSomeRowsExpanded() + +```ts +function table_getIsSomeRowsExpanded(table): boolean; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:74](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L74) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/table_getIsSomeRowsPinned.md b/docs/reference/functions/table_getIsSomeRowsPinned.md new file mode 100644 index 0000000000..e5bc89d81f --- /dev/null +++ b/docs/reference/functions/table_getIsSomeRowsPinned.md @@ -0,0 +1,36 @@ +--- +id: table_getIsSomeRowsPinned +title: table_getIsSomeRowsPinned +--- + +# Function: table\_getIsSomeRowsPinned() + +```ts +function table_getIsSomeRowsPinned(table, position?): boolean; +``` + +Defined in: [features/row-pinning/rowPinningFeature.utils.ts:45](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L45) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### position? + +[`RowPinningPosition`](../type-aliases/RowPinningPosition.md) + +## Returns + +`boolean` diff --git a/docs/reference/functions/table_getIsSomeRowsSelected.md b/docs/reference/functions/table_getIsSomeRowsSelected.md new file mode 100644 index 0000000000..46c1f5a1a3 --- /dev/null +++ b/docs/reference/functions/table_getIsSomeRowsSelected.md @@ -0,0 +1,32 @@ +--- +id: table_getIsSomeRowsSelected +title: table_getIsSomeRowsSelected +--- + +# Function: table\_getIsSomeRowsSelected() + +```ts +function table_getIsSomeRowsSelected(table): boolean; +``` + +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:192](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L192) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`boolean` diff --git a/docs/reference/functions/table_getLeafHeaders.md b/docs/reference/functions/table_getLeafHeaders.md new file mode 100644 index 0000000000..55bd14e658 --- /dev/null +++ b/docs/reference/functions/table_getLeafHeaders.md @@ -0,0 +1,32 @@ +--- +id: table_getLeafHeaders +title: table_getLeafHeaders +--- + +# Function: table\_getLeafHeaders() + +```ts +function table_getLeafHeaders(table): any[]; +``` + +Defined in: [core/headers/coreHeadersFeature.utils.ts:102](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts#L102) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`any`[] diff --git a/docs/reference/functions/table_getLeftFlatHeaders.md b/docs/reference/functions/table_getLeftFlatHeaders.md new file mode 100644 index 0000000000..f364e5cc0d --- /dev/null +++ b/docs/reference/functions/table_getLeftFlatHeaders.md @@ -0,0 +1,32 @@ +--- +id: table_getLeftFlatHeaders +title: table_getLeftFlatHeaders +--- + +# Function: table\_getLeftFlatHeaders() + +```ts +function table_getLeftFlatHeaders(table): any[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:315](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L315) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`any`[] diff --git a/docs/reference/functions/table_getLeftFooterGroups.md b/docs/reference/functions/table_getLeftFooterGroups.md new file mode 100644 index 0000000000..109679e20e --- /dev/null +++ b/docs/reference/functions/table_getLeftFooterGroups.md @@ -0,0 +1,32 @@ +--- +id: table_getLeftFooterGroups +title: table_getLeftFooterGroups +--- + +# Function: table\_getLeftFooterGroups() + +```ts +function table_getLeftFooterGroups(table): any[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:277](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L277) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`any`[] diff --git a/docs/reference/functions/table_getLeftHeaderGroups.md b/docs/reference/functions/table_getLeftHeaderGroups.md new file mode 100644 index 0000000000..38b0d67c6e --- /dev/null +++ b/docs/reference/functions/table_getLeftHeaderGroups.md @@ -0,0 +1,32 @@ +--- +id: table_getLeftHeaderGroups +title: table_getLeftHeaderGroups +--- + +# Function: table\_getLeftHeaderGroups() + +```ts +function table_getLeftHeaderGroups(table): HeaderGroup[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:213](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L213) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +[`HeaderGroup`](../type-aliases/HeaderGroup.md)\<`TFeatures`, `TData`\>[] diff --git a/docs/reference/functions/table_getLeftLeafColumns.md b/docs/reference/functions/table_getLeftLeafColumns.md new file mode 100644 index 0000000000..e1949f20a6 --- /dev/null +++ b/docs/reference/functions/table_getLeftLeafColumns.md @@ -0,0 +1,32 @@ +--- +id: table_getLeftLeafColumns +title: table_getLeftLeafColumns +--- + +# Function: table\_getLeftLeafColumns() + +```ts +function table_getLeftLeafColumns(table): Column[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:400](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L400) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `unknown`\>[] diff --git a/docs/reference/functions/table_getLeftLeafHeaders.md b/docs/reference/functions/table_getLeftLeafHeaders.md new file mode 100644 index 0000000000..6cfd443118 --- /dev/null +++ b/docs/reference/functions/table_getLeftLeafHeaders.md @@ -0,0 +1,32 @@ +--- +id: table_getLeftLeafHeaders +title: table_getLeftLeafHeaders +--- + +# Function: table\_getLeftLeafHeaders() + +```ts +function table_getLeftLeafHeaders(table): any[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:365](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L365) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`any`[] diff --git a/docs/reference/functions/table_getLeftTotalSize.md b/docs/reference/functions/table_getLeftTotalSize.md new file mode 100644 index 0000000000..d103687b40 --- /dev/null +++ b/docs/reference/functions/table_getLeftTotalSize.md @@ -0,0 +1,32 @@ +--- +id: table_getLeftTotalSize +title: table_getLeftTotalSize +--- + +# Function: table\_getLeftTotalSize() + +```ts +function table_getLeftTotalSize(table): any; +``` + +Defined in: [features/column-sizing/columnSizingFeature.utils.ts:168](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L168) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`any` diff --git a/docs/reference/functions/table_getLeftVisibleLeafColumns.md b/docs/reference/functions/table_getLeftVisibleLeafColumns.md new file mode 100644 index 0000000000..53a01016eb --- /dev/null +++ b/docs/reference/functions/table_getLeftVisibleLeafColumns.md @@ -0,0 +1,32 @@ +--- +id: table_getLeftVisibleLeafColumns +title: table_getLeftVisibleLeafColumns +--- + +# Function: table\_getLeftVisibleLeafColumns() + +```ts +function table_getLeftVisibleLeafColumns(table): any[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:468](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L468) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`any`[] diff --git a/docs/reference/functions/table_getOrderColumnsFn.md b/docs/reference/functions/table_getOrderColumnsFn.md new file mode 100644 index 0000000000..df1d229957 --- /dev/null +++ b/docs/reference/functions/table_getOrderColumnsFn.md @@ -0,0 +1,44 @@ +--- +id: table_getOrderColumnsFn +title: table_getOrderColumnsFn +--- + +# Function: table\_getOrderColumnsFn() + +```ts +function table_getOrderColumnsFn(table): (columns) => Column_Internal[]; +``` + +Defined in: [features/column-ordering/columnOrderingFeature.utils.ts:67](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L67) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +```ts +(columns): Column_Internal[]; +``` + +### Parameters + +#### columns + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `unknown`\>[] + +### Returns + +[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `unknown`\>[] diff --git a/docs/reference/functions/table_getPageCount.md b/docs/reference/functions/table_getPageCount.md new file mode 100644 index 0000000000..3f22dbfe6f --- /dev/null +++ b/docs/reference/functions/table_getPageCount.md @@ -0,0 +1,32 @@ +--- +id: table_getPageCount +title: table_getPageCount +--- + +# Function: table\_getPageCount() + +```ts +function table_getPageCount(table): number; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:186](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L186) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`number` diff --git a/docs/reference/functions/table_getPageOptions.md b/docs/reference/functions/table_getPageOptions.md new file mode 100644 index 0000000000..c80263f424 --- /dev/null +++ b/docs/reference/functions/table_getPageOptions.md @@ -0,0 +1,32 @@ +--- +id: table_getPageOptions +title: table_getPageOptions +--- + +# Function: table\_getPageOptions() + +```ts +function table_getPageOptions(table): number[]; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:118](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L118) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`number`[] diff --git a/docs/reference/functions/table_getPaginatedRowModel.md b/docs/reference/functions/table_getPaginatedRowModel.md new file mode 100644 index 0000000000..6996562149 --- /dev/null +++ b/docs/reference/functions/table_getPaginatedRowModel.md @@ -0,0 +1,32 @@ +--- +id: table_getPaginatedRowModel +title: table_getPaginatedRowModel +--- + +# Function: table\_getPaginatedRowModel() + +```ts +function table_getPaginatedRowModel(table): RowModel; +``` + +Defined in: [core/row-models/coreRowModelsFeature.utils.ts:119](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L119) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_getPinnedLeafColumns.md b/docs/reference/functions/table_getPinnedLeafColumns.md new file mode 100644 index 0000000000..f9b6329fc5 --- /dev/null +++ b/docs/reference/functions/table_getPinnedLeafColumns.md @@ -0,0 +1,36 @@ +--- +id: table_getPinnedLeafColumns +title: table_getPinnedLeafColumns +--- + +# Function: table\_getPinnedLeafColumns() + +```ts +function table_getPinnedLeafColumns(table, position): any[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:438](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L438) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### position + +[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) | `"center"` + +## Returns + +`any`[] diff --git a/docs/reference/functions/table_getPinnedVisibleLeafColumns.md b/docs/reference/functions/table_getPinnedVisibleLeafColumns.md new file mode 100644 index 0000000000..03fd18975d --- /dev/null +++ b/docs/reference/functions/table_getPinnedVisibleLeafColumns.md @@ -0,0 +1,36 @@ +--- +id: table_getPinnedVisibleLeafColumns +title: table_getPinnedVisibleLeafColumns +--- + +# Function: table\_getPinnedVisibleLeafColumns() + +```ts +function table_getPinnedVisibleLeafColumns(table, position?): any[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:507](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L507) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### position? + +[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) | `"center"` + +## Returns + +`any`[] diff --git a/docs/reference/functions/table_getPreExpandedRowModel.md b/docs/reference/functions/table_getPreExpandedRowModel.md new file mode 100644 index 0000000000..5cb7eddb47 --- /dev/null +++ b/docs/reference/functions/table_getPreExpandedRowModel.md @@ -0,0 +1,32 @@ +--- +id: table_getPreExpandedRowModel +title: table_getPreExpandedRowModel +--- + +# Function: table\_getPreExpandedRowModel() + +```ts +function table_getPreExpandedRowModel(table): RowModel; +``` + +Defined in: [core/row-models/coreRowModelsFeature.utils.ts:89](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L89) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_getPreFilteredRowModel.md b/docs/reference/functions/table_getPreFilteredRowModel.md new file mode 100644 index 0000000000..603795219d --- /dev/null +++ b/docs/reference/functions/table_getPreFilteredRowModel.md @@ -0,0 +1,32 @@ +--- +id: table_getPreFilteredRowModel +title: table_getPreFilteredRowModel +--- + +# Function: table\_getPreFilteredRowModel() + +```ts +function table_getPreFilteredRowModel(table): RowModel; +``` + +Defined in: [core/row-models/coreRowModelsFeature.utils.ts:20](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L20) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_getPreGroupedRowModel.md b/docs/reference/functions/table_getPreGroupedRowModel.md new file mode 100644 index 0000000000..3c2f92571c --- /dev/null +++ b/docs/reference/functions/table_getPreGroupedRowModel.md @@ -0,0 +1,32 @@ +--- +id: table_getPreGroupedRowModel +title: table_getPreGroupedRowModel +--- + +# Function: table\_getPreGroupedRowModel() + +```ts +function table_getPreGroupedRowModel(table): RowModel; +``` + +Defined in: [core/row-models/coreRowModelsFeature.utils.ts:43](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L43) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_getPrePaginatedRowModel.md b/docs/reference/functions/table_getPrePaginatedRowModel.md new file mode 100644 index 0000000000..33b8000ea1 --- /dev/null +++ b/docs/reference/functions/table_getPrePaginatedRowModel.md @@ -0,0 +1,32 @@ +--- +id: table_getPrePaginatedRowModel +title: table_getPrePaginatedRowModel +--- + +# Function: table\_getPrePaginatedRowModel() + +```ts +function table_getPrePaginatedRowModel(table): RowModel; +``` + +Defined in: [core/row-models/coreRowModelsFeature.utils.ts:112](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L112) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_getPreSelectedRowModel.md b/docs/reference/functions/table_getPreSelectedRowModel.md new file mode 100644 index 0000000000..c165218481 --- /dev/null +++ b/docs/reference/functions/table_getPreSelectedRowModel.md @@ -0,0 +1,32 @@ +--- +id: table_getPreSelectedRowModel +title: table_getPreSelectedRowModel +--- + +# Function: table\_getPreSelectedRowModel() + +```ts +function table_getPreSelectedRowModel(table): RowModel; +``` + +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:87](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L87) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_getPreSortedRowModel.md b/docs/reference/functions/table_getPreSortedRowModel.md new file mode 100644 index 0000000000..d0a12c85de --- /dev/null +++ b/docs/reference/functions/table_getPreSortedRowModel.md @@ -0,0 +1,32 @@ +--- +id: table_getPreSortedRowModel +title: table_getPreSortedRowModel +--- + +# Function: table\_getPreSortedRowModel() + +```ts +function table_getPreSortedRowModel(table): RowModel; +``` + +Defined in: [core/row-models/coreRowModelsFeature.utils.ts:66](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L66) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_getRightFlatHeaders.md b/docs/reference/functions/table_getRightFlatHeaders.md new file mode 100644 index 0000000000..4aace1cb48 --- /dev/null +++ b/docs/reference/functions/table_getRightFlatHeaders.md @@ -0,0 +1,32 @@ +--- +id: table_getRightFlatHeaders +title: table_getRightFlatHeaders +--- + +# Function: table\_getRightFlatHeaders() + +```ts +function table_getRightFlatHeaders(table): any[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:331](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L331) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`any`[] diff --git a/docs/reference/functions/table_getRightFooterGroups.md b/docs/reference/functions/table_getRightFooterGroups.md new file mode 100644 index 0000000000..d783e28b41 --- /dev/null +++ b/docs/reference/functions/table_getRightFooterGroups.md @@ -0,0 +1,32 @@ +--- +id: table_getRightFooterGroups +title: table_getRightFooterGroups +--- + +# Function: table\_getRightFooterGroups() + +```ts +function table_getRightFooterGroups(table): any[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:289](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L289) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`any`[] diff --git a/docs/reference/functions/table_getRightHeaderGroups.md b/docs/reference/functions/table_getRightHeaderGroups.md new file mode 100644 index 0000000000..84bb873bcf --- /dev/null +++ b/docs/reference/functions/table_getRightHeaderGroups.md @@ -0,0 +1,32 @@ +--- +id: table_getRightHeaderGroups +title: table_getRightHeaderGroups +--- + +# Function: table\_getRightHeaderGroups() + +```ts +function table_getRightHeaderGroups(table): HeaderGroup[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:233](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L233) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +[`HeaderGroup`](../type-aliases/HeaderGroup.md)\<`TFeatures`, `TData`\>[] diff --git a/docs/reference/functions/table_getRightLeafColumns.md b/docs/reference/functions/table_getRightLeafColumns.md new file mode 100644 index 0000000000..349a11ad53 --- /dev/null +++ b/docs/reference/functions/table_getRightLeafColumns.md @@ -0,0 +1,32 @@ +--- +id: table_getRightLeafColumns +title: table_getRightLeafColumns +--- + +# Function: table\_getRightLeafColumns() + +```ts +function table_getRightLeafColumns(table): Column[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:414](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L414) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `unknown`\>[] diff --git a/docs/reference/functions/table_getRightLeafHeaders.md b/docs/reference/functions/table_getRightLeafHeaders.md new file mode 100644 index 0000000000..b5954174a6 --- /dev/null +++ b/docs/reference/functions/table_getRightLeafHeaders.md @@ -0,0 +1,32 @@ +--- +id: table_getRightLeafHeaders +title: table_getRightLeafHeaders +--- + +# Function: table\_getRightLeafHeaders() + +```ts +function table_getRightLeafHeaders(table): any[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:376](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L376) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`any`[] diff --git a/docs/reference/functions/table_getRightTotalSize.md b/docs/reference/functions/table_getRightTotalSize.md new file mode 100644 index 0000000000..e212ade5cd --- /dev/null +++ b/docs/reference/functions/table_getRightTotalSize.md @@ -0,0 +1,32 @@ +--- +id: table_getRightTotalSize +title: table_getRightTotalSize +--- + +# Function: table\_getRightTotalSize() + +```ts +function table_getRightTotalSize(table): any; +``` + +Defined in: [features/column-sizing/columnSizingFeature.utils.ts:198](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L198) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`any` diff --git a/docs/reference/functions/table_getRightVisibleLeafColumns.md b/docs/reference/functions/table_getRightVisibleLeafColumns.md new file mode 100644 index 0000000000..7db070ec85 --- /dev/null +++ b/docs/reference/functions/table_getRightVisibleLeafColumns.md @@ -0,0 +1,32 @@ +--- +id: table_getRightVisibleLeafColumns +title: table_getRightVisibleLeafColumns +--- + +# Function: table\_getRightVisibleLeafColumns() + +```ts +function table_getRightVisibleLeafColumns(table): any[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:481](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L481) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`any`[] diff --git a/docs/reference/functions/table_getRow.md b/docs/reference/functions/table_getRow.md new file mode 100644 index 0000000000..6c25537082 --- /dev/null +++ b/docs/reference/functions/table_getRow.md @@ -0,0 +1,43 @@ +--- +id: table_getRow +title: table_getRow +--- + +# Function: table\_getRow() + +```ts +function table_getRow( + table, + rowId, +searchAll?): Row; +``` + +Defined in: [core/rows/coreRowsFeature.utils.ts:129](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L129) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### rowId + +`string` + +### searchAll? + +`boolean` + +## Returns + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_getRowCount.md b/docs/reference/functions/table_getRowCount.md new file mode 100644 index 0000000000..7ab73f67ef --- /dev/null +++ b/docs/reference/functions/table_getRowCount.md @@ -0,0 +1,32 @@ +--- +id: table_getRowCount +title: table_getRowCount +--- + +# Function: table\_getRowCount() + +```ts +function table_getRowCount(table): number; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:199](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L199) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`number` diff --git a/docs/reference/functions/table_getRowId.md b/docs/reference/functions/table_getRowId.md new file mode 100644 index 0000000000..9b1fa0c820 --- /dev/null +++ b/docs/reference/functions/table_getRowId.md @@ -0,0 +1,48 @@ +--- +id: table_getRowId +title: table_getRowId +--- + +# Function: table\_getRowId() + +```ts +function table_getRowId( + originalRow, + table, + index, + parent?): string; +``` + +Defined in: [core/rows/coreRowsFeature.utils.ts:114](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L114) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### originalRow + +`TData` + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### index + +`number` + +### parent? + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +## Returns + +`string` diff --git a/docs/reference/functions/table_getRowModel.md b/docs/reference/functions/table_getRowModel.md new file mode 100644 index 0000000000..303f6fabb2 --- /dev/null +++ b/docs/reference/functions/table_getRowModel.md @@ -0,0 +1,32 @@ +--- +id: table_getRowModel +title: table_getRowModel +--- + +# Function: table\_getRowModel() + +```ts +function table_getRowModel(table): RowModel; +``` + +Defined in: [core/row-models/coreRowModelsFeature.utils.ts:135](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L135) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_getSelectedRowModel.md b/docs/reference/functions/table_getSelectedRowModel.md new file mode 100644 index 0000000000..7172e0dbb0 --- /dev/null +++ b/docs/reference/functions/table_getSelectedRowModel.md @@ -0,0 +1,32 @@ +--- +id: table_getSelectedRowModel +title: table_getSelectedRowModel +--- + +# Function: table\_getSelectedRowModel() + +```ts +function table_getSelectedRowModel(table): RowModel; +``` + +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:94](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L94) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_getSortedRowModel.md b/docs/reference/functions/table_getSortedRowModel.md new file mode 100644 index 0000000000..d602828f2c --- /dev/null +++ b/docs/reference/functions/table_getSortedRowModel.md @@ -0,0 +1,32 @@ +--- +id: table_getSortedRowModel +title: table_getSortedRowModel +--- + +# Function: table\_getSortedRowModel() + +```ts +function table_getSortedRowModel(table): RowModel; +``` + +Defined in: [core/row-models/coreRowModelsFeature.utils.ts:73](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L73) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_getToggleAllColumnsVisibilityHandler.md b/docs/reference/functions/table_getToggleAllColumnsVisibilityHandler.md new file mode 100644 index 0000000000..704eff3bb0 --- /dev/null +++ b/docs/reference/functions/table_getToggleAllColumnsVisibilityHandler.md @@ -0,0 +1,44 @@ +--- +id: table_getToggleAllColumnsVisibilityHandler +title: table_getToggleAllColumnsVisibilityHandler +--- + +# Function: table\_getToggleAllColumnsVisibilityHandler() + +```ts +function table_getToggleAllColumnsVisibilityHandler(table): (e) => void; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:173](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L173) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +```ts +(e): void; +``` + +### Parameters + +#### e + +`unknown` + +### Returns + +`void` diff --git a/docs/reference/functions/table_getToggleAllPageRowsSelectedHandler.md b/docs/reference/functions/table_getToggleAllPageRowsSelectedHandler.md new file mode 100644 index 0000000000..799f1a1c61 --- /dev/null +++ b/docs/reference/functions/table_getToggleAllPageRowsSelectedHandler.md @@ -0,0 +1,44 @@ +--- +id: table_getToggleAllPageRowsSelectedHandler +title: table_getToggleAllPageRowsSelectedHandler +--- + +# Function: table\_getToggleAllPageRowsSelectedHandler() + +```ts +function table_getToggleAllPageRowsSelectedHandler(table): (e) => void; +``` + +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:227](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L227) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +```ts +(e): void; +``` + +### Parameters + +#### e + +`unknown` + +### Returns + +`void` diff --git a/docs/reference/functions/table_getToggleAllRowsExpandedHandler.md b/docs/reference/functions/table_getToggleAllRowsExpandedHandler.md new file mode 100644 index 0000000000..e66d3171e0 --- /dev/null +++ b/docs/reference/functions/table_getToggleAllRowsExpandedHandler.md @@ -0,0 +1,44 @@ +--- +id: table_getToggleAllRowsExpandedHandler +title: table_getToggleAllRowsExpandedHandler +--- + +# Function: table\_getToggleAllRowsExpandedHandler() + +```ts +function table_getToggleAllRowsExpandedHandler(table): (e) => void; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:64](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L64) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +```ts +(e): void; +``` + +### Parameters + +#### e + +`unknown` + +### Returns + +`void` diff --git a/docs/reference/functions/table_getToggleAllRowsSelectedHandler.md b/docs/reference/functions/table_getToggleAllRowsSelectedHandler.md new file mode 100644 index 0000000000..6212b6a5f3 --- /dev/null +++ b/docs/reference/functions/table_getToggleAllRowsSelectedHandler.md @@ -0,0 +1,44 @@ +--- +id: table_getToggleAllRowsSelectedHandler +title: table_getToggleAllRowsSelectedHandler +--- + +# Function: table\_getToggleAllRowsSelectedHandler() + +```ts +function table_getToggleAllRowsSelectedHandler(table): (e) => void; +``` + +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:215](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L215) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +```ts +(e): void; +``` + +### Parameters + +#### e + +`unknown` + +### Returns + +`void` diff --git a/docs/reference/functions/table_getTopRows.md b/docs/reference/functions/table_getTopRows.md new file mode 100644 index 0000000000..b5230c2d34 --- /dev/null +++ b/docs/reference/functions/table_getTopRows.md @@ -0,0 +1,32 @@ +--- +id: table_getTopRows +title: table_getTopRows +--- + +# Function: table\_getTopRows() + +```ts +function table_getTopRows(table): Row[]; +``` + +Defined in: [features/row-pinning/rowPinningFeature.utils.ts:91](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L91) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\>[] diff --git a/docs/reference/functions/table_getTotalSize.md b/docs/reference/functions/table_getTotalSize.md new file mode 100644 index 0000000000..007b1e3928 --- /dev/null +++ b/docs/reference/functions/table_getTotalSize.md @@ -0,0 +1,32 @@ +--- +id: table_getTotalSize +title: table_getTotalSize +--- + +# Function: table\_getTotalSize() + +```ts +function table_getTotalSize(table): number; +``` + +Defined in: [features/column-sizing/columnSizingFeature.utils.ts:157](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L157) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`number` diff --git a/docs/reference/functions/table_getVisibleFlatColumns.md b/docs/reference/functions/table_getVisibleFlatColumns.md new file mode 100644 index 0000000000..91af3fecd7 --- /dev/null +++ b/docs/reference/functions/table_getVisibleFlatColumns.md @@ -0,0 +1,32 @@ +--- +id: table_getVisibleFlatColumns +title: table_getVisibleFlatColumns +--- + +# Function: table\_getVisibleFlatColumns() + +```ts +function table_getVisibleFlatColumns(table): Column[]; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:90](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L90) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `unknown`\>[] diff --git a/docs/reference/functions/table_getVisibleLeafColumns.md b/docs/reference/functions/table_getVisibleLeafColumns.md new file mode 100644 index 0000000000..27e489fcdf --- /dev/null +++ b/docs/reference/functions/table_getVisibleLeafColumns.md @@ -0,0 +1,32 @@ +--- +id: table_getVisibleLeafColumns +title: table_getVisibleLeafColumns +--- + +# Function: table\_getVisibleLeafColumns() + +```ts +function table_getVisibleLeafColumns(table): Column[]; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:101](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L101) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `unknown`\>[] diff --git a/docs/reference/functions/table_lastPage.md b/docs/reference/functions/table_lastPage.md new file mode 100644 index 0000000000..abf04de99a --- /dev/null +++ b/docs/reference/functions/table_lastPage.md @@ -0,0 +1,32 @@ +--- +id: table_lastPage +title: table_lastPage +--- + +# Function: table\_lastPage() + +```ts +function table_lastPage(table): void; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:179](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L179) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`void` diff --git a/docs/reference/functions/table_mergeOptions.md b/docs/reference/functions/table_mergeOptions.md new file mode 100644 index 0000000000..4291d7c53c --- /dev/null +++ b/docs/reference/functions/table_mergeOptions.md @@ -0,0 +1,36 @@ +--- +id: table_mergeOptions +title: table_mergeOptions +--- + +# Function: table\_mergeOptions() + +```ts +function table_mergeOptions(table, newOptions): TableOptions; +``` + +Defined in: [core/table/coreTablesFeature.utils.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.utils.ts#L14) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### newOptions + +[`TableOptions`](../type-aliases/TableOptions.md)\<`TFeatures`, `TData`\> + +## Returns + +[`TableOptions`](../type-aliases/TableOptions.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_nextPage.md b/docs/reference/functions/table_nextPage.md new file mode 100644 index 0000000000..23e6fd966d --- /dev/null +++ b/docs/reference/functions/table_nextPage.md @@ -0,0 +1,32 @@ +--- +id: table_nextPage +title: table_nextPage +--- + +# Function: table\_nextPage() + +```ts +function table_nextPage(table): void; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:163](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L163) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`void` diff --git a/docs/reference/functions/table_previousPage.md b/docs/reference/functions/table_previousPage.md new file mode 100644 index 0000000000..d62365d50a --- /dev/null +++ b/docs/reference/functions/table_previousPage.md @@ -0,0 +1,32 @@ +--- +id: table_previousPage +title: table_previousPage +--- + +# Function: table\_previousPage() + +```ts +function table_previousPage(table): void; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:156](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L156) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`void` diff --git a/docs/reference/functions/table_reset.md b/docs/reference/functions/table_reset.md new file mode 100644 index 0000000000..268cd94307 --- /dev/null +++ b/docs/reference/functions/table_reset.md @@ -0,0 +1,32 @@ +--- +id: table_reset +title: table_reset +--- + +# Function: table\_reset() + +```ts +function table_reset(table): void; +``` + +Defined in: [core/table/coreTablesFeature.utils.ts:7](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.utils.ts#L7) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`void` diff --git a/docs/reference/functions/table_resetColumnFilters.md b/docs/reference/functions/table_resetColumnFilters.md new file mode 100644 index 0000000000..f788d879eb --- /dev/null +++ b/docs/reference/functions/table_resetColumnFilters.md @@ -0,0 +1,36 @@ +--- +id: table_resetColumnFilters +title: table_resetColumnFilters +--- + +# Function: table\_resetColumnFilters() + +```ts +function table_resetColumnFilters(table, defaultState?): void; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:184](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L184) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### defaultState? + +`boolean` + +## Returns + +`void` diff --git a/docs/reference/functions/table_resetColumnOrder.md b/docs/reference/functions/table_resetColumnOrder.md new file mode 100644 index 0000000000..0873757721 --- /dev/null +++ b/docs/reference/functions/table_resetColumnOrder.md @@ -0,0 +1,36 @@ +--- +id: table_resetColumnOrder +title: table_resetColumnOrder +--- + +# Function: table\_resetColumnOrder() + +```ts +function table_resetColumnOrder(table, defaultState?): void; +``` + +Defined in: [features/column-ordering/columnOrderingFeature.utils.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L57) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### defaultState? + +`boolean` + +## Returns + +`void` diff --git a/docs/reference/functions/table_resetColumnPinning.md b/docs/reference/functions/table_resetColumnPinning.md new file mode 100644 index 0000000000..fbfbaffe0a --- /dev/null +++ b/docs/reference/functions/table_resetColumnPinning.md @@ -0,0 +1,36 @@ +--- +id: table_resetColumnPinning +title: table_resetColumnPinning +--- + +# Function: table\_resetColumnPinning() + +```ts +function table_resetColumnPinning(table, defaultState?): void; +``` + +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:187](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L187) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### defaultState? + +`boolean` + +## Returns + +`void` diff --git a/docs/reference/functions/table_resetColumnSizing.md b/docs/reference/functions/table_resetColumnSizing.md new file mode 100644 index 0000000000..26b017da2c --- /dev/null +++ b/docs/reference/functions/table_resetColumnSizing.md @@ -0,0 +1,36 @@ +--- +id: table_resetColumnSizing +title: table_resetColumnSizing +--- + +# Function: table\_resetColumnSizing() + +```ts +function table_resetColumnSizing(table, defaultState?): void; +``` + +Defined in: [features/column-sizing/columnSizingFeature.utils.ts:147](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L147) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### defaultState? + +`boolean` + +## Returns + +`void` diff --git a/docs/reference/functions/table_resetColumnVisibility.md b/docs/reference/functions/table_resetColumnVisibility.md new file mode 100644 index 0000000000..f0f3ec5741 --- /dev/null +++ b/docs/reference/functions/table_resetColumnVisibility.md @@ -0,0 +1,36 @@ +--- +id: table_resetColumnVisibility +title: table_resetColumnVisibility +--- + +# Function: table\_resetColumnVisibility() + +```ts +function table_resetColumnVisibility(table, defaultState?): void; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:122](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L122) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### defaultState? + +`boolean` + +## Returns + +`void` diff --git a/docs/reference/functions/table_resetExpanded.md b/docs/reference/functions/table_resetExpanded.md new file mode 100644 index 0000000000..a164e7b853 --- /dev/null +++ b/docs/reference/functions/table_resetExpanded.md @@ -0,0 +1,36 @@ +--- +id: table_resetExpanded +title: table_resetExpanded +--- + +# Function: table\_resetExpanded() + +```ts +function table_resetExpanded(table, defaultState?): void; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:45](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L45) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### defaultState? + +`boolean` + +## Returns + +`void` diff --git a/docs/reference/functions/table_resetGlobalFilter.md b/docs/reference/functions/table_resetGlobalFilter.md new file mode 100644 index 0000000000..e79e2fa396 --- /dev/null +++ b/docs/reference/functions/table_resetGlobalFilter.md @@ -0,0 +1,36 @@ +--- +id: table_resetGlobalFilter +title: table_resetGlobalFilter +--- + +# Function: table\_resetGlobalFilter() + +```ts +function table_resetGlobalFilter(table, defaultState?): void; +``` + +Defined in: [features/global-filtering/globalFilteringFeature.utils.ts:52](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.utils.ts#L52) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### defaultState? + +`boolean` + +## Returns + +`void` diff --git a/docs/reference/functions/table_resetGrouping.md b/docs/reference/functions/table_resetGrouping.md new file mode 100644 index 0000000000..958d286225 --- /dev/null +++ b/docs/reference/functions/table_resetGrouping.md @@ -0,0 +1,36 @@ +--- +id: table_resetGrouping +title: table_resetGrouping +--- + +# Function: table\_resetGrouping() + +```ts +function table_resetGrouping(table, defaultState?): void; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:120](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L120) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### defaultState? + +`boolean` + +## Returns + +`void` diff --git a/docs/reference/functions/table_resetHeaderSizeInfo.md b/docs/reference/functions/table_resetHeaderSizeInfo.md new file mode 100644 index 0000000000..776c0af9a6 --- /dev/null +++ b/docs/reference/functions/table_resetHeaderSizeInfo.md @@ -0,0 +1,36 @@ +--- +id: table_resetHeaderSizeInfo +title: table_resetHeaderSizeInfo +--- + +# Function: table\_resetHeaderSizeInfo() + +```ts +function table_resetHeaderSizeInfo(table, defaultState?): void; +``` + +Defined in: [features/column-resizing/columnResizingFeature.utils.ts:226](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L226) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### defaultState? + +`boolean` + +## Returns + +`void` diff --git a/docs/reference/functions/table_resetPageIndex.md b/docs/reference/functions/table_resetPageIndex.md new file mode 100644 index 0000000000..affab42ebb --- /dev/null +++ b/docs/reference/functions/table_resetPageIndex.md @@ -0,0 +1,36 @@ +--- +id: table_resetPageIndex +title: table_resetPageIndex +--- + +# Function: table\_resetPageIndex() + +```ts +function table_resetPageIndex(table, defaultState?): void; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:77](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L77) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### defaultState? + +`boolean` + +## Returns + +`void` diff --git a/docs/reference/functions/table_resetPageSize.md b/docs/reference/functions/table_resetPageSize.md new file mode 100644 index 0000000000..38fbe43662 --- /dev/null +++ b/docs/reference/functions/table_resetPageSize.md @@ -0,0 +1,36 @@ +--- +id: table_resetPageSize +title: table_resetPageSize +--- + +# Function: table\_resetPageSize() + +```ts +function table_resetPageSize(table, defaultState?): void; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:89](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L89) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### defaultState? + +`boolean` + +## Returns + +`void` diff --git a/docs/reference/functions/table_resetPagination.md b/docs/reference/functions/table_resetPagination.md new file mode 100644 index 0000000000..498e798574 --- /dev/null +++ b/docs/reference/functions/table_resetPagination.md @@ -0,0 +1,36 @@ +--- +id: table_resetPagination +title: table_resetPagination +--- + +# Function: table\_resetPagination() + +```ts +function table_resetPagination(table, defaultState?): void; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:43](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L43) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### defaultState? + +`boolean` + +## Returns + +`void` diff --git a/docs/reference/functions/table_resetRowPinning.md b/docs/reference/functions/table_resetRowPinning.md new file mode 100644 index 0000000000..5a3fec2b65 --- /dev/null +++ b/docs/reference/functions/table_resetRowPinning.md @@ -0,0 +1,36 @@ +--- +id: table_resetRowPinning +title: table_resetRowPinning +--- + +# Function: table\_resetRowPinning() + +```ts +function table_resetRowPinning(table, defaultState?): void; +``` + +Defined in: [features/row-pinning/rowPinningFeature.utils.ts:31](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L31) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### defaultState? + +`boolean` + +## Returns + +`void` diff --git a/docs/reference/functions/table_resetRowSelection.md b/docs/reference/functions/table_resetRowSelection.md new file mode 100644 index 0000000000..3b26e10215 --- /dev/null +++ b/docs/reference/functions/table_resetRowSelection.md @@ -0,0 +1,36 @@ +--- +id: table_resetRowSelection +title: table_resetRowSelection +--- + +# Function: table\_resetRowSelection() + +```ts +function table_resetRowSelection(table, defaultState?): void; +``` + +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:24](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L24) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### defaultState? + +`boolean` + +## Returns + +`void` diff --git a/docs/reference/functions/table_resetSorting.md b/docs/reference/functions/table_resetSorting.md new file mode 100644 index 0000000000..430ee9571e --- /dev/null +++ b/docs/reference/functions/table_resetSorting.md @@ -0,0 +1,36 @@ +--- +id: table_resetSorting +title: table_resetSorting +--- + +# Function: table\_resetSorting() + +```ts +function table_resetSorting(table, defaultState?): void; +``` + +Defined in: [features/row-sorting/rowSortingFeature.utils.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L26) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### defaultState? + +`boolean` + +## Returns + +`void` diff --git a/docs/reference/functions/table_setColumnFilters.md b/docs/reference/functions/table_setColumnFilters.md new file mode 100644 index 0000000000..7f99000024 --- /dev/null +++ b/docs/reference/functions/table_setColumnFilters.md @@ -0,0 +1,36 @@ +--- +id: table_setColumnFilters +title: table_setColumnFilters +--- + +# Function: table\_setColumnFilters() + +```ts +function table_setColumnFilters(table, updater): void; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:156](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L156) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### updater + +[`Updater`](../type-aliases/Updater.md)\<[`ColumnFiltersState`](../type-aliases/ColumnFiltersState.md)\> + +## Returns + +`void` diff --git a/docs/reference/functions/table_setColumnOrder.md b/docs/reference/functions/table_setColumnOrder.md new file mode 100644 index 0000000000..ef3b2542cd --- /dev/null +++ b/docs/reference/functions/table_setColumnOrder.md @@ -0,0 +1,36 @@ +--- +id: table_setColumnOrder +title: table_setColumnOrder +--- + +# Function: table\_setColumnOrder() + +```ts +function table_setColumnOrder(table, updater): void; +``` + +Defined in: [features/column-ordering/columnOrderingFeature.utils.ts:50](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L50) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### updater + +[`Updater`](../type-aliases/Updater.md)\<[`ColumnOrderState`](../type-aliases/ColumnOrderState.md)\> + +## Returns + +`void` diff --git a/docs/reference/functions/table_setColumnPinning.md b/docs/reference/functions/table_setColumnPinning.md new file mode 100644 index 0000000000..6f139e9347 --- /dev/null +++ b/docs/reference/functions/table_setColumnPinning.md @@ -0,0 +1,36 @@ +--- +id: table_setColumnPinning +title: table_setColumnPinning +--- + +# Function: table\_setColumnPinning() + +```ts +function table_setColumnPinning(table, updater): void; +``` + +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:177](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L177) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### updater + +[`Updater`](../type-aliases/Updater.md)\<[`ColumnPinningState`](../interfaces/ColumnPinningState.md)\> + +## Returns + +`void` diff --git a/docs/reference/functions/table_setColumnResizing.md b/docs/reference/functions/table_setColumnResizing.md new file mode 100644 index 0000000000..1472bbbed2 --- /dev/null +++ b/docs/reference/functions/table_setColumnResizing.md @@ -0,0 +1,36 @@ +--- +id: table_setColumnResizing +title: table_setColumnResizing +--- + +# Function: table\_setColumnResizing() + +```ts +function table_setColumnResizing(table, updater): void; +``` + +Defined in: [features/column-resizing/columnResizingFeature.utils.ts:216](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L216) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### updater + +[`Updater`](../type-aliases/Updater.md)\<[`columnResizingState`](../interfaces/columnResizingState.md)\> + +## Returns + +`void` diff --git a/docs/reference/functions/table_setColumnSizing.md b/docs/reference/functions/table_setColumnSizing.md new file mode 100644 index 0000000000..40553648e4 --- /dev/null +++ b/docs/reference/functions/table_setColumnSizing.md @@ -0,0 +1,36 @@ +--- +id: table_setColumnSizing +title: table_setColumnSizing +--- + +# Function: table\_setColumnSizing() + +```ts +function table_setColumnSizing(table, updater): void; +``` + +Defined in: [features/column-sizing/columnSizingFeature.utils.ts:137](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L137) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### updater + +[`Updater`](../type-aliases/Updater.md)\<[`ColumnSizingState`](../type-aliases/ColumnSizingState.md)\> + +## Returns + +`void` diff --git a/docs/reference/functions/table_setColumnVisibility.md b/docs/reference/functions/table_setColumnVisibility.md new file mode 100644 index 0000000000..d3fdb3b74a --- /dev/null +++ b/docs/reference/functions/table_setColumnVisibility.md @@ -0,0 +1,36 @@ +--- +id: table_setColumnVisibility +title: table_setColumnVisibility +--- + +# Function: table\_setColumnVisibility() + +```ts +function table_setColumnVisibility(table, updater): void; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:112](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L112) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### updater + +[`Updater`](../type-aliases/Updater.md)\<[`ColumnVisibilityState`](../type-aliases/ColumnVisibilityState.md)\> + +## Returns + +`void` diff --git a/docs/reference/functions/table_setExpanded.md b/docs/reference/functions/table_setExpanded.md new file mode 100644 index 0000000000..dab47fb281 --- /dev/null +++ b/docs/reference/functions/table_setExpanded.md @@ -0,0 +1,36 @@ +--- +id: table_setExpanded +title: table_setExpanded +--- + +# Function: table\_setExpanded() + +```ts +function table_setExpanded(table, updater): void; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L27) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### updater + +[`Updater`](../type-aliases/Updater.md)\<[`ExpandedState`](../type-aliases/ExpandedState.md)\> + +## Returns + +`void` diff --git a/docs/reference/functions/table_setGlobalFilter.md b/docs/reference/functions/table_setGlobalFilter.md new file mode 100644 index 0000000000..4405ffe0ce --- /dev/null +++ b/docs/reference/functions/table_setGlobalFilter.md @@ -0,0 +1,36 @@ +--- +id: table_setGlobalFilter +title: table_setGlobalFilter +--- + +# Function: table\_setGlobalFilter() + +```ts +function table_setGlobalFilter(table, updater): void; +``` + +Defined in: [features/global-filtering/globalFilteringFeature.utils.ts:45](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.utils.ts#L45) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### updater + +`any` + +## Returns + +`void` diff --git a/docs/reference/functions/table_setGrouping.md b/docs/reference/functions/table_setGrouping.md new file mode 100644 index 0000000000..2f830a010c --- /dev/null +++ b/docs/reference/functions/table_setGrouping.md @@ -0,0 +1,36 @@ +--- +id: table_setGrouping +title: table_setGrouping +--- + +# Function: table\_setGrouping() + +```ts +function table_setGrouping(table, updater): void; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:113](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L113) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### updater + +[`Updater`](../type-aliases/Updater.md)\<[`GroupingState`](../type-aliases/GroupingState.md)\> + +## Returns + +`void` diff --git a/docs/reference/functions/table_setOptions.md b/docs/reference/functions/table_setOptions.md new file mode 100644 index 0000000000..fb947a6249 --- /dev/null +++ b/docs/reference/functions/table_setOptions.md @@ -0,0 +1,36 @@ +--- +id: table_setOptions +title: table_setOptions +--- + +# Function: table\_setOptions() + +```ts +function table_setOptions(table, updater): void; +``` + +Defined in: [core/table/coreTablesFeature.utils.ts:31](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.utils.ts#L31) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### updater + +[`Updater`](../type-aliases/Updater.md)\<[`TableOptions`](../type-aliases/TableOptions.md)\<`TFeatures`, `TData`\>\> + +## Returns + +`void` diff --git a/docs/reference/functions/table_setPageIndex.md b/docs/reference/functions/table_setPageIndex.md new file mode 100644 index 0000000000..1b8ccdec18 --- /dev/null +++ b/docs/reference/functions/table_setPageIndex.md @@ -0,0 +1,36 @@ +--- +id: table_setPageIndex +title: table_setPageIndex +--- + +# Function: table\_setPageIndex() + +```ts +function table_setPageIndex(table, updater): void; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:55](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L55) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### updater + +[`Updater`](../type-aliases/Updater.md)\<`number`\> + +## Returns + +`void` diff --git a/docs/reference/functions/table_setPageSize.md b/docs/reference/functions/table_setPageSize.md new file mode 100644 index 0000000000..65a82fa862 --- /dev/null +++ b/docs/reference/functions/table_setPageSize.md @@ -0,0 +1,36 @@ +--- +id: table_setPageSize +title: table_setPageSize +--- + +# Function: table\_setPageSize() + +```ts +function table_setPageSize(table, updater): void; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:101](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L101) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### updater + +[`Updater`](../type-aliases/Updater.md)\<`number`\> + +## Returns + +`void` diff --git a/docs/reference/functions/table_setPagination.md b/docs/reference/functions/table_setPagination.md new file mode 100644 index 0000000000..d0752fa6e0 --- /dev/null +++ b/docs/reference/functions/table_setPagination.md @@ -0,0 +1,36 @@ +--- +id: table_setPagination +title: table_setPagination +--- + +# Function: table\_setPagination() + +```ts +function table_setPagination(table, updater): void | undefined; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L30) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### updater + +[`Updater`](../type-aliases/Updater.md)\<[`PaginationState`](../interfaces/PaginationState.md)\> + +## Returns + +`void` \| `undefined` diff --git a/docs/reference/functions/table_setRowPinning.md b/docs/reference/functions/table_setRowPinning.md new file mode 100644 index 0000000000..dc70b2d079 --- /dev/null +++ b/docs/reference/functions/table_setRowPinning.md @@ -0,0 +1,36 @@ +--- +id: table_setRowPinning +title: table_setRowPinning +--- + +# Function: table\_setRowPinning() + +```ts +function table_setRowPinning(table, updater): void; +``` + +Defined in: [features/row-pinning/rowPinningFeature.utils.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L21) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### updater + +[`Updater`](../type-aliases/Updater.md)\<[`RowPinningState`](../interfaces/RowPinningState.md)\> + +## Returns + +`void` diff --git a/docs/reference/functions/table_setRowSelection.md b/docs/reference/functions/table_setRowSelection.md new file mode 100644 index 0000000000..a60e39c33b --- /dev/null +++ b/docs/reference/functions/table_setRowSelection.md @@ -0,0 +1,36 @@ +--- +id: table_setRowSelection +title: table_setRowSelection +--- + +# Function: table\_setRowSelection() + +```ts +function table_setRowSelection(table, updater): void; +``` + +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L14) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### updater + +[`Updater`](../type-aliases/Updater.md)\<[`RowSelectionState`](../type-aliases/RowSelectionState.md)\> + +## Returns + +`void` diff --git a/docs/reference/functions/table_setSorting.md b/docs/reference/functions/table_setSorting.md new file mode 100644 index 0000000000..384ea33bfc --- /dev/null +++ b/docs/reference/functions/table_setSorting.md @@ -0,0 +1,36 @@ +--- +id: table_setSorting +title: table_setSorting +--- + +# Function: table\_setSorting() + +```ts +function table_setSorting(table, updater): void; +``` + +Defined in: [features/row-sorting/rowSortingFeature.utils.ts:19](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L19) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### updater + +[`Updater`](../type-aliases/Updater.md)\<[`SortingState`](../type-aliases/SortingState.md)\> + +## Returns + +`void` diff --git a/docs/reference/functions/table_toggleAllColumnsVisible.md b/docs/reference/functions/table_toggleAllColumnsVisible.md new file mode 100644 index 0000000000..bccc4ac8a4 --- /dev/null +++ b/docs/reference/functions/table_toggleAllColumnsVisible.md @@ -0,0 +1,36 @@ +--- +id: table_toggleAllColumnsVisible +title: table_toggleAllColumnsVisible +--- + +# Function: table\_toggleAllColumnsVisible() + +```ts +function table_toggleAllColumnsVisible(table, value?): void; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:132](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L132) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### value? + +`boolean` + +## Returns + +`void` diff --git a/docs/reference/functions/table_toggleAllPageRowsSelected.md b/docs/reference/functions/table_toggleAllPageRowsSelected.md new file mode 100644 index 0000000000..43cf3869cf --- /dev/null +++ b/docs/reference/functions/table_toggleAllPageRowsSelected.md @@ -0,0 +1,36 @@ +--- +id: table_toggleAllPageRowsSelected +title: table_toggleAllPageRowsSelected +--- + +# Function: table\_toggleAllPageRowsSelected() + +```ts +function table_toggleAllPageRowsSelected(table, value?): void; +``` + +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:67](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L67) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### value? + +`boolean` + +## Returns + +`void` diff --git a/docs/reference/functions/table_toggleAllRowsExpanded.md b/docs/reference/functions/table_toggleAllRowsExpanded.md new file mode 100644 index 0000000000..c122626644 --- /dev/null +++ b/docs/reference/functions/table_toggleAllRowsExpanded.md @@ -0,0 +1,36 @@ +--- +id: table_toggleAllRowsExpanded +title: table_toggleAllRowsExpanded +--- + +# Function: table\_toggleAllRowsExpanded() + +```ts +function table_toggleAllRowsExpanded(table, expanded?): void; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L34) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### expanded? + +`boolean` + +## Returns + +`void` diff --git a/docs/reference/functions/table_toggleAllRowsSelected.md b/docs/reference/functions/table_toggleAllRowsSelected.md new file mode 100644 index 0000000000..e4c7740e78 --- /dev/null +++ b/docs/reference/functions/table_toggleAllRowsSelected.md @@ -0,0 +1,36 @@ +--- +id: table_toggleAllRowsSelected +title: table_toggleAllRowsSelected +--- + +# Function: table\_toggleAllRowsSelected() + +```ts +function table_toggleAllRowsSelected(table, value?): void; +``` + +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:36](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L36) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Parameters + +### table + +[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> + +### value? + +`boolean` + +## Returns + +`void` diff --git a/docs/reference/index.md b/docs/reference/index.md new file mode 100644 index 0000000000..8ffe4a5d17 --- /dev/null +++ b/docs/reference/index.md @@ -0,0 +1,644 @@ +--- +id: "@tanstack/table-core" +title: "@tanstack/table-core" +--- + +# @tanstack/table-core + +## Namespaces + +- [filterFn\_arrIncludes](@tanstack/namespaces/filterFn_arrIncludes/index.md) +- [filterFn\_arrIncludesAll](@tanstack/namespaces/filterFn_arrIncludesAll/index.md) +- [filterFn\_arrIncludesSome](@tanstack/namespaces/filterFn_arrIncludesSome/index.md) +- [filterFn\_equals](@tanstack/namespaces/filterFn_equals/index.md) +- [filterFn\_equalsString](@tanstack/namespaces/filterFn_equalsString/index.md) +- [filterFn\_equalsStringSensitive](@tanstack/namespaces/filterFn_equalsStringSensitive/index.md) +- [filterFn\_greaterThan](@tanstack/namespaces/filterFn_greaterThan/index.md) +- [filterFn\_greaterThanOrEqualTo](@tanstack/namespaces/filterFn_greaterThanOrEqualTo/index.md) +- [filterFn\_includesString](@tanstack/namespaces/filterFn_includesString/index.md) +- [filterFn\_includesStringSensitive](@tanstack/namespaces/filterFn_includesStringSensitive/index.md) +- [filterFn\_inNumberRange](@tanstack/namespaces/filterFn_inNumberRange/index.md) +- [filterFn\_lessThan](@tanstack/namespaces/filterFn_lessThan/index.md) +- [filterFn\_lessThanOrEqualTo](@tanstack/namespaces/filterFn_lessThanOrEqualTo/index.md) +- [filterFn\_weakEquals](@tanstack/namespaces/filterFn_weakEquals/index.md) + +## Interfaces + +- [AggregationFns](interfaces/AggregationFns.md) +- [API](interfaces/API.md) +- [CachedRowModel\_Core](interfaces/CachedRowModel_Core.md) +- [CachedRowModel\_Expanded](interfaces/CachedRowModel_Expanded.md) +- [CachedRowModel\_Faceted](interfaces/CachedRowModel_Faceted.md) +- [CachedRowModel\_Filtered](interfaces/CachedRowModel_Filtered.md) +- [CachedRowModel\_Grouped](interfaces/CachedRowModel_Grouped.md) +- [CachedRowModel\_Paginated](interfaces/CachedRowModel_Paginated.md) +- [CachedRowModel\_Plugins](interfaces/CachedRowModel_Plugins.md) +- [CachedRowModel\_Sorted](interfaces/CachedRowModel_Sorted.md) +- [CachedRowModels\_Plugins](interfaces/CachedRowModels_Plugins.md) +- [Cell\_Cell](interfaces/Cell_Cell.md) +- [Cell\_ColumnGrouping](interfaces/Cell_ColumnGrouping.md) +- [Cell\_Core](interfaces/Cell_Core.md) +- [Cell\_CoreProperties](interfaces/Cell_CoreProperties.md) +- [Cell\_Plugins](interfaces/Cell_Plugins.md) +- [CellContext](interfaces/CellContext.md) +- [Column\_Column](interfaces/Column_Column.md) +- [Column\_ColumnFaceting](interfaces/Column_ColumnFaceting.md) +- [Column\_ColumnFiltering](interfaces/Column_ColumnFiltering.md) +- [Column\_ColumnGrouping](interfaces/Column_ColumnGrouping.md) +- [Column\_ColumnOrdering](interfaces/Column_ColumnOrdering.md) +- [Column\_ColumnPinning](interfaces/Column_ColumnPinning.md) +- [Column\_ColumnResizing](interfaces/Column_ColumnResizing.md) +- [Column\_ColumnSizing](interfaces/Column_ColumnSizing.md) +- [Column\_ColumnVisibility](interfaces/Column_ColumnVisibility.md) +- [Column\_Core](interfaces/Column_Core.md) +- [Column\_CoreProperties](interfaces/Column_CoreProperties.md) +- [Column\_GlobalFiltering](interfaces/Column_GlobalFiltering.md) +- [Column\_Plugins](interfaces/Column_Plugins.md) +- [Column\_RowSorting](interfaces/Column_RowSorting.md) +- [ColumnDef\_ColumnFiltering](interfaces/ColumnDef_ColumnFiltering.md) +- [ColumnDef\_ColumnGrouping](interfaces/ColumnDef_ColumnGrouping.md) +- [ColumnDef\_ColumnPinning](interfaces/ColumnDef_ColumnPinning.md) +- [ColumnDef\_ColumnResizing](interfaces/ColumnDef_ColumnResizing.md) +- [ColumnDef\_ColumnSizing](interfaces/ColumnDef_ColumnSizing.md) +- [ColumnDef\_ColumnVisibility](interfaces/ColumnDef_ColumnVisibility.md) +- [ColumnDef\_GlobalFiltering](interfaces/ColumnDef_GlobalFiltering.md) +- [ColumnDef\_Plugins](interfaces/ColumnDef_Plugins.md) +- [ColumnDef\_RowSorting](interfaces/ColumnDef_RowSorting.md) +- [ColumnDefaultOptions](interfaces/ColumnDefaultOptions.md) +- [ColumnFilter](interfaces/ColumnFilter.md) +- [ColumnMeta](interfaces/ColumnMeta.md) +- [ColumnOrderDefaultOptions](interfaces/ColumnOrderDefaultOptions.md) +- [ColumnPinningDefaultOptions](interfaces/ColumnPinningDefaultOptions.md) +- [ColumnPinningState](interfaces/ColumnPinningState.md) +- [columnResizingState](interfaces/columnResizingState.md) +- [ColumnSort](interfaces/ColumnSort.md) +- [CoreFeatures](interfaces/CoreFeatures.md) +- [CreateRowModel\_Core](interfaces/CreateRowModel_Core.md) +- [CreateRowModel\_Expanded](interfaces/CreateRowModel_Expanded.md) +- [CreateRowModel\_Faceted](interfaces/CreateRowModel_Faceted.md) +- [CreateRowModel\_Filtered](interfaces/CreateRowModel_Filtered.md) +- [CreateRowModel\_Grouped](interfaces/CreateRowModel_Grouped.md) +- [CreateRowModel\_Paginated](interfaces/CreateRowModel_Paginated.md) +- [CreateRowModel\_Plugins](interfaces/CreateRowModel_Plugins.md) +- [CreateRowModel\_Sorted](interfaces/CreateRowModel_Sorted.md) +- [CreateRowModels\_Plugins](interfaces/CreateRowModels_Plugins.md) +- [FilterFn](interfaces/FilterFn.md) +- [FilterFns](interfaces/FilterFns.md) +- [FilterMeta](interfaces/FilterMeta.md) +- [Header\_ColumnResizing](interfaces/Header_ColumnResizing.md) +- [Header\_ColumnSizing](interfaces/Header_ColumnSizing.md) +- [Header\_Core](interfaces/Header_Core.md) +- [Header\_CoreProperties](interfaces/Header_CoreProperties.md) +- [Header\_Header](interfaces/Header_Header.md) +- [Header\_Plugins](interfaces/Header_Plugins.md) +- [HeaderContext](interfaces/HeaderContext.md) +- [HeaderGroup\_Core](interfaces/HeaderGroup_Core.md) +- [HeaderGroup\_Header](interfaces/HeaderGroup_Header.md) +- [HeaderGroup\_Plugins](interfaces/HeaderGroup_Plugins.md) +- [IdIdentifier](interfaces/IdIdentifier.md) +- [PaginationDefaultOptions](interfaces/PaginationDefaultOptions.md) +- [PaginationState](interfaces/PaginationState.md) +- [Plugins](interfaces/Plugins.md) +- [PrototypeAPI](interfaces/PrototypeAPI.md) +- [ResolvedColumnFilter](interfaces/ResolvedColumnFilter.md) +- [Row\_ColumnFiltering](interfaces/Row_ColumnFiltering.md) +- [Row\_ColumnGrouping](interfaces/Row_ColumnGrouping.md) +- [Row\_ColumnPinning](interfaces/Row_ColumnPinning.md) +- [Row\_ColumnVisibility](interfaces/Row_ColumnVisibility.md) +- [Row\_Core](interfaces/Row_Core.md) +- [Row\_CoreProperties](interfaces/Row_CoreProperties.md) +- [Row\_Plugins](interfaces/Row_Plugins.md) +- [Row\_Row](interfaces/Row_Row.md) +- [Row\_RowExpanding](interfaces/Row_RowExpanding.md) +- [Row\_RowPinning](interfaces/Row_RowPinning.md) +- [Row\_RowSelection](interfaces/Row_RowSelection.md) +- [RowModel](interfaces/RowModel.md) +- [RowModelFns\_ColumnFiltering](interfaces/RowModelFns_ColumnFiltering.md) +- [RowModelFns\_ColumnGrouping](interfaces/RowModelFns_ColumnGrouping.md) +- [RowModelFns\_Core](interfaces/RowModelFns_Core.md) +- [RowModelFns\_Plugins](interfaces/RowModelFns_Plugins.md) +- [RowModelFns\_RowSorting](interfaces/RowModelFns_RowSorting.md) +- [RowPinningDefaultOptions](interfaces/RowPinningDefaultOptions.md) +- [RowPinningState](interfaces/RowPinningState.md) +- [SortFn](interfaces/SortFn.md) +- [SortFns](interfaces/SortFns.md) +- [StockFeatures](interfaces/StockFeatures.md) +- [StringHeaderIdentifier](interfaces/StringHeaderIdentifier.md) +- [Table\_ColumnFaceting](interfaces/Table_ColumnFaceting.md) +- [Table\_ColumnFiltering](interfaces/Table_ColumnFiltering.md) +- [Table\_ColumnGrouping](interfaces/Table_ColumnGrouping.md) +- [Table\_ColumnOrdering](interfaces/Table_ColumnOrdering.md) +- [Table\_ColumnPinning](interfaces/Table_ColumnPinning.md) +- [Table\_ColumnResizing](interfaces/Table_ColumnResizing.md) +- [Table\_Columns](interfaces/Table_Columns.md) +- [Table\_ColumnSizing](interfaces/Table_ColumnSizing.md) +- [Table\_ColumnVisibility](interfaces/Table_ColumnVisibility.md) +- [Table\_CoreProperties](interfaces/Table_CoreProperties.md) +- [Table\_GlobalFiltering](interfaces/Table_GlobalFiltering.md) +- [Table\_Headers](interfaces/Table_Headers.md) +- [Table\_Plugins](interfaces/Table_Plugins.md) +- [Table\_RowExpanding](interfaces/Table_RowExpanding.md) +- [Table\_RowModels\_Core](interfaces/Table_RowModels_Core.md) +- [Table\_RowModels\_Expanded](interfaces/Table_RowModels_Expanded.md) +- [Table\_RowModels\_Faceted](interfaces/Table_RowModels_Faceted.md) +- [Table\_RowModels\_Filtered](interfaces/Table_RowModels_Filtered.md) +- [Table\_RowModels\_Grouped](interfaces/Table_RowModels_Grouped.md) +- [Table\_RowModels\_Paginated](interfaces/Table_RowModels_Paginated.md) +- [Table\_RowModels\_Sorted](interfaces/Table_RowModels_Sorted.md) +- [Table\_RowPagination](interfaces/Table_RowPagination.md) +- [Table\_RowPinning](interfaces/Table_RowPinning.md) +- [Table\_Rows](interfaces/Table_Rows.md) +- [Table\_RowSelection](interfaces/Table_RowSelection.md) +- [Table\_RowSorting](interfaces/Table_RowSorting.md) +- [Table\_Table](interfaces/Table_Table.md) +- [TableFeature](interfaces/TableFeature.md) +- [TableFeatures](interfaces/TableFeatures.md) +- [TableMeta](interfaces/TableMeta.md) +- [TableOptions\_Cell](interfaces/TableOptions_Cell.md) +- [TableOptions\_ColumnFiltering](interfaces/TableOptions_ColumnFiltering.md) +- [TableOptions\_ColumnGrouping](interfaces/TableOptions_ColumnGrouping.md) +- [TableOptions\_ColumnOrdering](interfaces/TableOptions_ColumnOrdering.md) +- [TableOptions\_ColumnPinning](interfaces/TableOptions_ColumnPinning.md) +- [TableOptions\_ColumnResizing](interfaces/TableOptions_ColumnResizing.md) +- [TableOptions\_Columns](interfaces/TableOptions_Columns.md) +- [TableOptions\_ColumnSizing](interfaces/TableOptions_ColumnSizing.md) +- [TableOptions\_ColumnVisibility](interfaces/TableOptions_ColumnVisibility.md) +- [TableOptions\_Core](interfaces/TableOptions_Core.md) +- [TableOptions\_GlobalFiltering](interfaces/TableOptions_GlobalFiltering.md) +- [TableOptions\_Plugins](interfaces/TableOptions_Plugins.md) +- [TableOptions\_RowExpanding](interfaces/TableOptions_RowExpanding.md) +- [TableOptions\_RowPagination](interfaces/TableOptions_RowPagination.md) +- [TableOptions\_RowPinning](interfaces/TableOptions_RowPinning.md) +- [TableOptions\_Rows](interfaces/TableOptions_Rows.md) +- [TableOptions\_RowSelection](interfaces/TableOptions_RowSelection.md) +- [TableOptions\_RowSorting](interfaces/TableOptions_RowSorting.md) +- [TableOptions\_Table](interfaces/TableOptions_Table.md) +- [TableState\_ColumnFiltering](interfaces/TableState_ColumnFiltering.md) +- [TableState\_ColumnGrouping](interfaces/TableState_ColumnGrouping.md) +- [TableState\_ColumnOrdering](interfaces/TableState_ColumnOrdering.md) +- [TableState\_ColumnPinning](interfaces/TableState_ColumnPinning.md) +- [TableState\_ColumnResizing](interfaces/TableState_ColumnResizing.md) +- [TableState\_ColumnSizing](interfaces/TableState_ColumnSizing.md) +- [TableState\_ColumnVisibility](interfaces/TableState_ColumnVisibility.md) +- [TableState\_GlobalFiltering](interfaces/TableState_GlobalFiltering.md) +- [TableState\_Plugins](interfaces/TableState_Plugins.md) +- [TableState\_RowExpanding](interfaces/TableState_RowExpanding.md) +- [TableState\_RowPagination](interfaces/TableState_RowPagination.md) +- [TableState\_RowPinning](interfaces/TableState_RowPinning.md) +- [TableState\_RowSelection](interfaces/TableState_RowSelection.md) +- [TableState\_RowSorting](interfaces/TableState_RowSorting.md) + +## Type Aliases + +- [AccessorColumnDef](type-aliases/AccessorColumnDef.md) +- [AccessorFn](type-aliases/AccessorFn.md) +- [AccessorFnColumnDef](type-aliases/AccessorFnColumnDef.md) +- [AccessorFnColumnDefBase](type-aliases/AccessorFnColumnDefBase.md) +- [AccessorKeyColumnDef](type-aliases/AccessorKeyColumnDef.md) +- [AccessorKeyColumnDefBase](type-aliases/AccessorKeyColumnDefBase.md) +- [AggregationFn](type-aliases/AggregationFn.md) +- [AggregationFnOption](type-aliases/AggregationFnOption.md) +- [APIObject](type-aliases/APIObject.md) +- [AssignCellPrototype](type-aliases/AssignCellPrototype.md) +- [AssignColumnPrototype](type-aliases/AssignColumnPrototype.md) +- [AssignHeaderPrototype](type-aliases/AssignHeaderPrototype.md) +- [AssignRowPrototype](type-aliases/AssignRowPrototype.md) +- [BuiltInAggregationFn](type-aliases/BuiltInAggregationFn.md) +- [BuiltInFilterFn](type-aliases/BuiltInFilterFn.md) +- [BuiltInSortFn](type-aliases/BuiltInSortFn.md) +- [CachedRowModel\_All](type-aliases/CachedRowModel_All.md) +- [CachedRowModels](type-aliases/CachedRowModels.md) +- [Cell](type-aliases/Cell.md) +- [CellData](type-aliases/CellData.md) +- [Column](type-aliases/Column.md) +- [Column\_Internal](type-aliases/Column_Internal.md) +- [ColumnDef](type-aliases/ColumnDef.md) +- [ColumnDefBase](type-aliases/ColumnDefBase.md) +- [ColumnDefBase\_All](type-aliases/ColumnDefBase_All.md) +- [ColumnDefResolved](type-aliases/ColumnDefResolved.md) +- [ColumnDefTemplate](type-aliases/ColumnDefTemplate.md) +- [ColumnFilterAutoRemoveTestFn](type-aliases/ColumnFilterAutoRemoveTestFn.md) +- [ColumnFiltersState](type-aliases/ColumnFiltersState.md) +- [ColumnHelper](type-aliases/ColumnHelper.md) +- [ColumnOrderState](type-aliases/ColumnOrderState.md) +- [ColumnPinningPosition](type-aliases/ColumnPinningPosition.md) +- [ColumnResizeDirection](type-aliases/ColumnResizeDirection.md) +- [ColumnResizeMode](type-aliases/ColumnResizeMode.md) +- [ColumnResizingDefaultOptions](type-aliases/ColumnResizingDefaultOptions.md) +- [ColumnSizingDefaultOptions](type-aliases/ColumnSizingDefaultOptions.md) +- [ColumnSizingState](type-aliases/ColumnSizingState.md) +- [ColumnVisibilityState](type-aliases/ColumnVisibilityState.md) +- [ConstructTableAPIs](type-aliases/ConstructTableAPIs.md) +- [CreateRowModels](type-aliases/CreateRowModels.md) +- [CreateRowModels\_All](type-aliases/CreateRowModels_All.md) +- [CustomAggregationFns](type-aliases/CustomAggregationFns.md) +- [CustomFilterFns](type-aliases/CustomFilterFns.md) +- [CustomSortFns](type-aliases/CustomSortFns.md) +- [DebugOptions](type-aliases/DebugOptions.md) +- [DeepKeys](type-aliases/DeepKeys.md) +- [DeepValue](type-aliases/DeepValue.md) +- [DisplayColumnDef](type-aliases/DisplayColumnDef.md) +- [ExpandedState](type-aliases/ExpandedState.md) +- [ExpandedStateList](type-aliases/ExpandedStateList.md) +- [ExtractFeatureTypes](type-aliases/ExtractFeatureTypes.md) +- [FilterFnOption](type-aliases/FilterFnOption.md) +- [GetDefaultColumnDef](type-aliases/GetDefaultColumnDef.md) +- [GetDefaultStateSelector](type-aliases/GetDefaultStateSelector.md) +- [GetDefaultTableOptions](type-aliases/GetDefaultTableOptions.md) +- [GetInitialState](type-aliases/GetInitialState.md) +- [Getter](type-aliases/Getter.md) +- [GroupColumnDef](type-aliases/GroupColumnDef.md) +- [GroupingColumnMode](type-aliases/GroupingColumnMode.md) +- [GroupingState](type-aliases/GroupingState.md) +- [Header](type-aliases/Header.md) +- [HeaderGroup](type-aliases/HeaderGroup.md) +- [IdentifiedColumnDef](type-aliases/IdentifiedColumnDef.md) +- [InitRowInstanceData](type-aliases/InitRowInstanceData.md) +- [MemoFnMeta](type-aliases/MemoFnMeta.md) +- [NoInfer](type-aliases/NoInfer.md) +- [OnChangeFn](type-aliases/OnChangeFn.md) +- [PartialKeys](type-aliases/PartialKeys.md) +- [Prettify](type-aliases/Prettify.md) +- [PrototypeAPIObject](type-aliases/PrototypeAPIObject.md) +- [RequiredKeys](type-aliases/RequiredKeys.md) +- [Row](type-aliases/Row.md) +- [RowData](type-aliases/RowData.md) +- [RowModelFns](type-aliases/RowModelFns.md) +- [RowModelFns\_All](type-aliases/RowModelFns_All.md) +- [RowPinningPosition](type-aliases/RowPinningPosition.md) +- [RowSelectionState](type-aliases/RowSelectionState.md) +- [SortDirection](type-aliases/SortDirection.md) +- [SortFnOption](type-aliases/SortFnOption.md) +- [SortingState](type-aliases/SortingState.md) +- [StringOrTemplateHeader](type-aliases/StringOrTemplateHeader.md) +- [Table](type-aliases/Table.md) +- [Table\_Core](type-aliases/Table_Core.md) +- [Table\_Internal](type-aliases/Table_Internal.md) +- [Table\_RowModels](type-aliases/Table_RowModels.md) +- [TableHelper\_Core](type-aliases/TableHelper_Core.md) +- [TableHelperOptions](type-aliases/TableHelperOptions.md) +- [TableOptions](type-aliases/TableOptions.md) +- [TableOptions\_All](type-aliases/TableOptions_All.md) +- [TableState](type-aliases/TableState.md) +- [TableState\_All](type-aliases/TableState_All.md) +- [TransformFilterValueFn](type-aliases/TransformFilterValueFn.md) +- [UnionToIntersection](type-aliases/UnionToIntersection.md) +- [Updater](type-aliases/Updater.md) +- [VisibilityDefaultOptions](type-aliases/VisibilityDefaultOptions.md) + +## Variables + +- [$internalMemoFnMeta](variables/$internalMemoFnMeta.md) +- [aggregationFn\_count](variables/aggregationFn_count.md) +- [aggregationFn\_extent](variables/aggregationFn_extent.md) +- [aggregationFn\_max](variables/aggregationFn_max.md) +- [aggregationFn\_mean](variables/aggregationFn_mean.md) +- [aggregationFn\_median](variables/aggregationFn_median.md) +- [aggregationFn\_min](variables/aggregationFn_min.md) +- [aggregationFn\_sum](variables/aggregationFn_sum.md) +- [aggregationFn\_unique](variables/aggregationFn_unique.md) +- [aggregationFn\_uniqueCount](variables/aggregationFn_uniqueCount.md) +- [aggregationFns](variables/aggregationFns.md) +- [columnFacetingFeature](variables/columnFacetingFeature.md) +- [columnFilteringFeature](variables/columnFilteringFeature.md) +- [columnGroupingFeature](variables/columnGroupingFeature.md) +- [columnOrderingFeature](variables/columnOrderingFeature.md) +- [columnPinningFeature](variables/columnPinningFeature.md) +- [columnResizingFeature](variables/columnResizingFeature.md) +- [columnSizingFeature](variables/columnSizingFeature.md) +- [columnVisibilityFeature](variables/columnVisibilityFeature.md) +- [coreCellsFeature](variables/coreCellsFeature.md) +- [coreColumnsFeature](variables/coreColumnsFeature.md) +- [coreFeatures](variables/coreFeatures.md) +- [coreHeadersFeature](variables/coreHeadersFeature.md) +- [coreRowModelsFeature](variables/coreRowModelsFeature.md) +- [coreRowsFeature](variables/coreRowsFeature.md) +- [coreTablesFeature](variables/coreTablesFeature.md) +- [filterFn\_arrHas](variables/filterFn_arrHas.md) +- [filterFn\_arrIncludes](variables/filterFn_arrIncludes.md) +- [filterFn\_arrIncludesAll](variables/filterFn_arrIncludesAll.md) +- [filterFn\_arrIncludesSome](variables/filterFn_arrIncludesSome.md) +- [filterFn\_equals](variables/filterFn_equals.md) +- [filterFn\_equalsString](variables/filterFn_equalsString.md) +- [filterFn\_equalsStringSensitive](variables/filterFn_equalsStringSensitive.md) +- [filterFn\_greaterThan](variables/filterFn_greaterThan.md) +- [filterFn\_greaterThanOrEqualTo](variables/filterFn_greaterThanOrEqualTo.md) +- [filterFn\_includesString](variables/filterFn_includesString.md) +- [filterFn\_includesStringSensitive](variables/filterFn_includesStringSensitive.md) +- [filterFn\_inNumberRange](variables/filterFn_inNumberRange.md) +- [filterFn\_lessThan](variables/filterFn_lessThan.md) +- [filterFn\_lessThanOrEqualTo](variables/filterFn_lessThanOrEqualTo.md) +- [filterFn\_weakEquals](variables/filterFn_weakEquals.md) +- [filterFns](variables/filterFns.md) +- [globalFilteringFeature](variables/globalFilteringFeature.md) +- [reSplitAlphaNumeric](variables/reSplitAlphaNumeric.md) +- [rowExpandingFeature](variables/rowExpandingFeature.md) +- [rowPaginationFeature](variables/rowPaginationFeature.md) +- [rowPinningFeature](variables/rowPinningFeature.md) +- [rowSelectionFeature](variables/rowSelectionFeature.md) +- [rowSortingFeature](variables/rowSortingFeature.md) +- [sortFn\_alphanumeric](variables/sortFn_alphanumeric.md) +- [sortFn\_alphanumericCaseSensitive](variables/sortFn_alphanumericCaseSensitive.md) +- [sortFn\_basic](variables/sortFn_basic.md) +- [sortFn\_datetime](variables/sortFn_datetime.md) +- [sortFn\_text](variables/sortFn_text.md) +- [sortFn\_textCaseSensitive](variables/sortFn_textCaseSensitive.md) +- [sortFns](variables/sortFns.md) +- [stockFeatures](variables/stockFeatures.md) + +## Functions + +- [assignPrototypeAPIs](functions/assignPrototypeAPIs.md) +- [assignTableAPIs](functions/assignTableAPIs.md) +- [buildHeaderGroups](functions/buildHeaderGroups.md) +- [callMemoOrStaticFn](functions/callMemoOrStaticFn.md) +- [cell\_getContext](functions/cell_getContext.md) +- [cell\_getIsAggregated](functions/cell_getIsAggregated.md) +- [cell\_getIsGrouped](functions/cell_getIsGrouped.md) +- [cell\_getIsPlaceholder](functions/cell_getIsPlaceholder.md) +- [cell\_getValue](functions/cell_getValue.md) +- [cell\_renderValue](functions/cell_renderValue.md) +- [column\_clearSorting](functions/column_clearSorting.md) +- [column\_getAfter](functions/column_getAfter.md) +- [column\_getAggregationFn](functions/column_getAggregationFn.md) +- [column\_getAutoAggregationFn](functions/column_getAutoAggregationFn.md) +- [column\_getAutoFilterFn](functions/column_getAutoFilterFn.md) +- [column\_getAutoSortDir](functions/column_getAutoSortDir.md) +- [column\_getAutoSortFn](functions/column_getAutoSortFn.md) +- [column\_getCanFilter](functions/column_getCanFilter.md) +- [column\_getCanGlobalFilter](functions/column_getCanGlobalFilter.md) +- [column\_getCanGroup](functions/column_getCanGroup.md) +- [column\_getCanHide](functions/column_getCanHide.md) +- [column\_getCanMultiSort](functions/column_getCanMultiSort.md) +- [column\_getCanPin](functions/column_getCanPin.md) +- [column\_getCanResize](functions/column_getCanResize.md) +- [column\_getCanSort](functions/column_getCanSort.md) +- [column\_getFacetedMinMaxValues](functions/column_getFacetedMinMaxValues.md) +- [column\_getFacetedRowModel](functions/column_getFacetedRowModel.md) +- [column\_getFacetedUniqueValues](functions/column_getFacetedUniqueValues.md) +- [column\_getFilterFn](functions/column_getFilterFn.md) +- [column\_getFilterIndex](functions/column_getFilterIndex.md) +- [column\_getFilterValue](functions/column_getFilterValue.md) +- [column\_getFirstSortDir](functions/column_getFirstSortDir.md) +- [column\_getFlatColumns](functions/column_getFlatColumns.md) +- [column\_getGroupedIndex](functions/column_getGroupedIndex.md) +- [column\_getIndex](functions/column_getIndex.md) +- [column\_getIsFiltered](functions/column_getIsFiltered.md) +- [column\_getIsFirstColumn](functions/column_getIsFirstColumn.md) +- [column\_getIsGrouped](functions/column_getIsGrouped.md) +- [column\_getIsLastColumn](functions/column_getIsLastColumn.md) +- [column\_getIsPinned](functions/column_getIsPinned.md) +- [column\_getIsResizing](functions/column_getIsResizing.md) +- [column\_getIsSorted](functions/column_getIsSorted.md) +- [column\_getIsVisible](functions/column_getIsVisible.md) +- [column\_getLeafColumns](functions/column_getLeafColumns.md) +- [column\_getNextSortingOrder](functions/column_getNextSortingOrder.md) +- [column\_getPinnedIndex](functions/column_getPinnedIndex.md) +- [column\_getSize](functions/column_getSize.md) +- [column\_getSortFn](functions/column_getSortFn.md) +- [column\_getSortIndex](functions/column_getSortIndex.md) +- [column\_getStart](functions/column_getStart.md) +- [column\_getToggleGroupingHandler](functions/column_getToggleGroupingHandler.md) +- [column\_getToggleSortingHandler](functions/column_getToggleSortingHandler.md) +- [column\_getToggleVisibilityHandler](functions/column_getToggleVisibilityHandler.md) +- [column\_pin](functions/column_pin.md) +- [column\_resetSize](functions/column_resetSize.md) +- [column\_setFilterValue](functions/column_setFilterValue.md) +- [column\_toggleGrouping](functions/column_toggleGrouping.md) +- [column\_toggleSorting](functions/column_toggleSorting.md) +- [column\_toggleVisibility](functions/column_toggleVisibility.md) +- [constructCell](functions/constructCell.md) +- [constructColumn](functions/constructColumn.md) +- [constructColumnFacetingFeature](functions/constructColumnFacetingFeature.md) +- [constructColumnFilteringFeature](functions/constructColumnFilteringFeature.md) +- [constructColumnGroupingFeature](functions/constructColumnGroupingFeature.md) +- [constructColumnOrderingFeature](functions/constructColumnOrderingFeature.md) +- [constructColumnPinningFeature](functions/constructColumnPinningFeature.md) +- [constructColumnResizingFeature](functions/constructColumnResizingFeature.md) +- [constructColumnSizingFeature](functions/constructColumnSizingFeature.md) +- [constructColumnVisibilityFeature](functions/constructColumnVisibilityFeature.md) +- [constructCoreCellsFeature](functions/constructCoreCellsFeature.md) +- [constructCoreColumnsFeature](functions/constructCoreColumnsFeature.md) +- [constructCoreHeadersFeature](functions/constructCoreHeadersFeature.md) +- [constructCoreRowModelsFeature](functions/constructCoreRowModelsFeature.md) +- [constructCoreRowsFeature](functions/constructCoreRowsFeature.md) +- [constructCoreTablesFeature](functions/constructCoreTablesFeature.md) +- [constructGlobalFilteringFeature](functions/constructGlobalFilteringFeature.md) +- [constructHeader](functions/constructHeader.md) +- [constructRow](functions/constructRow.md) +- [constructRowExpandingFeature](functions/constructRowExpandingFeature.md) +- [constructRowPaginationFeature](functions/constructRowPaginationFeature.md) +- [constructRowPinningFeature](functions/constructRowPinningFeature.md) +- [constructRowSelectionFeature](functions/constructRowSelectionFeature.md) +- [constructRowSortingFeature](functions/constructRowSortingFeature.md) +- [constructTable](functions/constructTable.md) +- [constructTableHelper](functions/constructTableHelper.md) +- [createColumnHelper](functions/createColumnHelper.md) +- [createCoreRowModel](functions/createCoreRowModel.md) +- [createExpandedRowModel](functions/createExpandedRowModel.md) +- [createFacetedMinMaxValues](functions/createFacetedMinMaxValues.md) +- [createFacetedRowModel](functions/createFacetedRowModel.md) +- [createFacetedUniqueValues](functions/createFacetedUniqueValues.md) +- [createFilteredRowModel](functions/createFilteredRowModel.md) +- [createGroupedRowModel](functions/createGroupedRowModel.md) +- [createPaginatedRowModel](functions/createPaginatedRowModel.md) +- [createSortedRowModel](functions/createSortedRowModel.md) +- [createTableStore](functions/createTableStore.md) +- [expandRows](functions/expandRows.md) +- [flattenBy](functions/flattenBy.md) +- [functionalUpdate](functions/functionalUpdate.md) +- [getDefaultColumnFiltersState](functions/getDefaultColumnFiltersState.md) +- [getDefaultColumnOrderState](functions/getDefaultColumnOrderState.md) +- [getDefaultColumnPinningState](functions/getDefaultColumnPinningState.md) +- [getDefaultColumnResizingState](functions/getDefaultColumnResizingState.md) +- [getDefaultColumnSizingColumnDef](functions/getDefaultColumnSizingColumnDef.md) +- [getDefaultColumnSizingState](functions/getDefaultColumnSizingState.md) +- [getDefaultColumnVisibilityState](functions/getDefaultColumnVisibilityState.md) +- [getDefaultExpandedState](functions/getDefaultExpandedState.md) +- [getDefaultGroupingState](functions/getDefaultGroupingState.md) +- [getDefaultPaginationState](functions/getDefaultPaginationState.md) +- [getDefaultRowPinningState](functions/getDefaultRowPinningState.md) +- [getDefaultRowSelectionState](functions/getDefaultRowSelectionState.md) +- [getDefaultSortingState](functions/getDefaultSortingState.md) +- [getFunctionNameInfo](functions/getFunctionNameInfo.md) +- [getInitialTableState](functions/getInitialTableState.md) +- [getMemoFnMeta](functions/getMemoFnMeta.md) +- [header\_getContext](functions/header_getContext.md) +- [header\_getLeafHeaders](functions/header_getLeafHeaders.md) +- [header\_getResizeHandler](functions/header_getResizeHandler.md) +- [header\_getSize](functions/header_getSize.md) +- [header\_getStart](functions/header_getStart.md) +- [isFunction](functions/isFunction.md) +- [isNumberArray](functions/isNumberArray.md) +- [isRowSelected](functions/isRowSelected.md) +- [isSubRowSelected](functions/isSubRowSelected.md) +- [isTouchStartEvent](functions/isTouchStartEvent.md) +- [makeStateUpdater](functions/makeStateUpdater.md) +- [memo](functions/memo.md) +- [noop](functions/noop.md) +- [orderColumns](functions/orderColumns.md) +- [passiveEventSupported](functions/passiveEventSupported.md) +- [row\_getAllCells](functions/row_getAllCells.md) +- [row\_getAllCellsByColumnId](functions/row_getAllCellsByColumnId.md) +- [row\_getAllVisibleCells](functions/row_getAllVisibleCells.md) +- [row\_getCanExpand](functions/row_getCanExpand.md) +- [row\_getCanMultiSelect](functions/row_getCanMultiSelect.md) +- [row\_getCanPin](functions/row_getCanPin.md) +- [row\_getCanSelect](functions/row_getCanSelect.md) +- [row\_getCanSelectSubRows](functions/row_getCanSelectSubRows.md) +- [row\_getCenterVisibleCells](functions/row_getCenterVisibleCells.md) +- [row\_getGroupingValue](functions/row_getGroupingValue.md) +- [row\_getIsAllParentsExpanded](functions/row_getIsAllParentsExpanded.md) +- [row\_getIsAllSubRowsSelected](functions/row_getIsAllSubRowsSelected.md) +- [row\_getIsExpanded](functions/row_getIsExpanded.md) +- [row\_getIsGrouped](functions/row_getIsGrouped.md) +- [row\_getIsPinned](functions/row_getIsPinned.md) +- [row\_getIsSelected](functions/row_getIsSelected.md) +- [row\_getIsSomeSelected](functions/row_getIsSomeSelected.md) +- [row\_getLeafRows](functions/row_getLeafRows.md) +- [row\_getLeftVisibleCells](functions/row_getLeftVisibleCells.md) +- [row\_getParentRow](functions/row_getParentRow.md) +- [row\_getParentRows](functions/row_getParentRows.md) +- [row\_getPinnedIndex](functions/row_getPinnedIndex.md) +- [row\_getRightVisibleCells](functions/row_getRightVisibleCells.md) +- [row\_getToggleExpandedHandler](functions/row_getToggleExpandedHandler.md) +- [row\_getToggleSelectedHandler](functions/row_getToggleSelectedHandler.md) +- [row\_getUniqueValues](functions/row_getUniqueValues.md) +- [row\_getValue](functions/row_getValue.md) +- [row\_getVisibleCells](functions/row_getVisibleCells.md) +- [row\_pin](functions/row_pin.md) +- [row\_renderValue](functions/row_renderValue.md) +- [row\_toggleExpanded](functions/row_toggleExpanded.md) +- [row\_toggleSelected](functions/row_toggleSelected.md) +- [selectRowsFn](functions/selectRowsFn.md) +- [shouldAutoRemoveFilter](functions/shouldAutoRemoveFilter.md) +- [table\_autoResetExpanded](functions/table_autoResetExpanded.md) +- [table\_autoResetPageIndex](functions/table_autoResetPageIndex.md) +- [table\_firstPage](functions/table_firstPage.md) +- [table\_getAllColumns](functions/table_getAllColumns.md) +- [table\_getAllFlatColumns](functions/table_getAllFlatColumns.md) +- [table\_getAllFlatColumnsById](functions/table_getAllFlatColumnsById.md) +- [table\_getAllLeafColumns](functions/table_getAllLeafColumns.md) +- [table\_getBottomRows](functions/table_getBottomRows.md) +- [table\_getCanNextPage](functions/table_getCanNextPage.md) +- [table\_getCanPreviousPage](functions/table_getCanPreviousPage.md) +- [table\_getCanSomeRowsExpand](functions/table_getCanSomeRowsExpand.md) +- [table\_getCenterFlatHeaders](functions/table_getCenterFlatHeaders.md) +- [table\_getCenterFooterGroups](functions/table_getCenterFooterGroups.md) +- [table\_getCenterHeaderGroups](functions/table_getCenterHeaderGroups.md) +- [table\_getCenterLeafColumns](functions/table_getCenterLeafColumns.md) +- [table\_getCenterLeafHeaders](functions/table_getCenterLeafHeaders.md) +- [table\_getCenterRows](functions/table_getCenterRows.md) +- [table\_getCenterTotalSize](functions/table_getCenterTotalSize.md) +- [table\_getCenterVisibleLeafColumns](functions/table_getCenterVisibleLeafColumns.md) +- [table\_getColumn](functions/table_getColumn.md) +- [table\_getCoreRowModel](functions/table_getCoreRowModel.md) +- [table\_getDefaultColumnDef](functions/table_getDefaultColumnDef.md) +- [table\_getExpandedDepth](functions/table_getExpandedDepth.md) +- [table\_getExpandedRowModel](functions/table_getExpandedRowModel.md) +- [table\_getFilteredRowModel](functions/table_getFilteredRowModel.md) +- [table\_getFilteredSelectedRowModel](functions/table_getFilteredSelectedRowModel.md) +- [table\_getFlatHeaders](functions/table_getFlatHeaders.md) +- [table\_getFooterGroups](functions/table_getFooterGroups.md) +- [table\_getGlobalAutoFilterFn](functions/table_getGlobalAutoFilterFn.md) +- [table\_getGlobalFacetedMinMaxValues](functions/table_getGlobalFacetedMinMaxValues.md) +- [table\_getGlobalFacetedRowModel](functions/table_getGlobalFacetedRowModel.md) +- [table\_getGlobalFacetedUniqueValues](functions/table_getGlobalFacetedUniqueValues.md) +- [table\_getGlobalFilterFn](functions/table_getGlobalFilterFn.md) +- [table\_getGroupedRowModel](functions/table_getGroupedRowModel.md) +- [table\_getGroupedSelectedRowModel](functions/table_getGroupedSelectedRowModel.md) +- [table\_getHeaderGroups](functions/table_getHeaderGroups.md) +- [table\_getIsAllColumnsVisible](functions/table_getIsAllColumnsVisible.md) +- [table\_getIsAllPageRowsSelected](functions/table_getIsAllPageRowsSelected.md) +- [table\_getIsAllRowsExpanded](functions/table_getIsAllRowsExpanded.md) +- [table\_getIsAllRowsSelected](functions/table_getIsAllRowsSelected.md) +- [table\_getIsSomeColumnsPinned](functions/table_getIsSomeColumnsPinned.md) +- [table\_getIsSomeColumnsVisible](functions/table_getIsSomeColumnsVisible.md) +- [table\_getIsSomePageRowsSelected](functions/table_getIsSomePageRowsSelected.md) +- [table\_getIsSomeRowsExpanded](functions/table_getIsSomeRowsExpanded.md) +- [table\_getIsSomeRowsPinned](functions/table_getIsSomeRowsPinned.md) +- [table\_getIsSomeRowsSelected](functions/table_getIsSomeRowsSelected.md) +- [table\_getLeafHeaders](functions/table_getLeafHeaders.md) +- [table\_getLeftFlatHeaders](functions/table_getLeftFlatHeaders.md) +- [table\_getLeftFooterGroups](functions/table_getLeftFooterGroups.md) +- [table\_getLeftHeaderGroups](functions/table_getLeftHeaderGroups.md) +- [table\_getLeftLeafColumns](functions/table_getLeftLeafColumns.md) +- [table\_getLeftLeafHeaders](functions/table_getLeftLeafHeaders.md) +- [table\_getLeftTotalSize](functions/table_getLeftTotalSize.md) +- [table\_getLeftVisibleLeafColumns](functions/table_getLeftVisibleLeafColumns.md) +- [table\_getOrderColumnsFn](functions/table_getOrderColumnsFn.md) +- [table\_getPageCount](functions/table_getPageCount.md) +- [table\_getPageOptions](functions/table_getPageOptions.md) +- [table\_getPaginatedRowModel](functions/table_getPaginatedRowModel.md) +- [table\_getPinnedLeafColumns](functions/table_getPinnedLeafColumns.md) +- [table\_getPinnedVisibleLeafColumns](functions/table_getPinnedVisibleLeafColumns.md) +- [table\_getPreExpandedRowModel](functions/table_getPreExpandedRowModel.md) +- [table\_getPreFilteredRowModel](functions/table_getPreFilteredRowModel.md) +- [table\_getPreGroupedRowModel](functions/table_getPreGroupedRowModel.md) +- [table\_getPrePaginatedRowModel](functions/table_getPrePaginatedRowModel.md) +- [table\_getPreSelectedRowModel](functions/table_getPreSelectedRowModel.md) +- [table\_getPreSortedRowModel](functions/table_getPreSortedRowModel.md) +- [table\_getRightFlatHeaders](functions/table_getRightFlatHeaders.md) +- [table\_getRightFooterGroups](functions/table_getRightFooterGroups.md) +- [table\_getRightHeaderGroups](functions/table_getRightHeaderGroups.md) +- [table\_getRightLeafColumns](functions/table_getRightLeafColumns.md) +- [table\_getRightLeafHeaders](functions/table_getRightLeafHeaders.md) +- [table\_getRightTotalSize](functions/table_getRightTotalSize.md) +- [table\_getRightVisibleLeafColumns](functions/table_getRightVisibleLeafColumns.md) +- [table\_getRow](functions/table_getRow.md) +- [table\_getRowCount](functions/table_getRowCount.md) +- [table\_getRowId](functions/table_getRowId.md) +- [table\_getRowModel](functions/table_getRowModel.md) +- [table\_getSelectedRowModel](functions/table_getSelectedRowModel.md) +- [table\_getSortedRowModel](functions/table_getSortedRowModel.md) +- [table\_getToggleAllColumnsVisibilityHandler](functions/table_getToggleAllColumnsVisibilityHandler.md) +- [table\_getToggleAllPageRowsSelectedHandler](functions/table_getToggleAllPageRowsSelectedHandler.md) +- [table\_getToggleAllRowsExpandedHandler](functions/table_getToggleAllRowsExpandedHandler.md) +- [table\_getToggleAllRowsSelectedHandler](functions/table_getToggleAllRowsSelectedHandler.md) +- [table\_getTopRows](functions/table_getTopRows.md) +- [table\_getTotalSize](functions/table_getTotalSize.md) +- [table\_getVisibleFlatColumns](functions/table_getVisibleFlatColumns.md) +- [table\_getVisibleLeafColumns](functions/table_getVisibleLeafColumns.md) +- [table\_lastPage](functions/table_lastPage.md) +- [table\_mergeOptions](functions/table_mergeOptions.md) +- [table\_nextPage](functions/table_nextPage.md) +- [table\_previousPage](functions/table_previousPage.md) +- [table\_reset](functions/table_reset.md) +- [table\_resetColumnFilters](functions/table_resetColumnFilters.md) +- [table\_resetColumnOrder](functions/table_resetColumnOrder.md) +- [table\_resetColumnPinning](functions/table_resetColumnPinning.md) +- [table\_resetColumnSizing](functions/table_resetColumnSizing.md) +- [table\_resetColumnVisibility](functions/table_resetColumnVisibility.md) +- [table\_resetExpanded](functions/table_resetExpanded.md) +- [table\_resetGlobalFilter](functions/table_resetGlobalFilter.md) +- [table\_resetGrouping](functions/table_resetGrouping.md) +- [table\_resetHeaderSizeInfo](functions/table_resetHeaderSizeInfo.md) +- [table\_resetPageIndex](functions/table_resetPageIndex.md) +- [table\_resetPageSize](functions/table_resetPageSize.md) +- [table\_resetPagination](functions/table_resetPagination.md) +- [table\_resetRowPinning](functions/table_resetRowPinning.md) +- [table\_resetRowSelection](functions/table_resetRowSelection.md) +- [table\_resetSorting](functions/table_resetSorting.md) +- [table\_setColumnFilters](functions/table_setColumnFilters.md) +- [table\_setColumnOrder](functions/table_setColumnOrder.md) +- [table\_setColumnPinning](functions/table_setColumnPinning.md) +- [table\_setColumnResizing](functions/table_setColumnResizing.md) +- [table\_setColumnSizing](functions/table_setColumnSizing.md) +- [table\_setColumnVisibility](functions/table_setColumnVisibility.md) +- [table\_setExpanded](functions/table_setExpanded.md) +- [table\_setGlobalFilter](functions/table_setGlobalFilter.md) +- [table\_setGrouping](functions/table_setGrouping.md) +- [table\_setOptions](functions/table_setOptions.md) +- [table\_setPageIndex](functions/table_setPageIndex.md) +- [table\_setPageSize](functions/table_setPageSize.md) +- [table\_setPagination](functions/table_setPagination.md) +- [table\_setRowPinning](functions/table_setRowPinning.md) +- [table\_setRowSelection](functions/table_setRowSelection.md) +- [table\_setSorting](functions/table_setSorting.md) +- [table\_toggleAllColumnsVisible](functions/table_toggleAllColumnsVisible.md) +- [table\_toggleAllPageRowsSelected](functions/table_toggleAllPageRowsSelected.md) +- [table\_toggleAllRowsExpanded](functions/table_toggleAllRowsExpanded.md) +- [table\_toggleAllRowsSelected](functions/table_toggleAllRowsSelected.md) +- [tableFeatures](functions/tableFeatures.md) +- [tableMemo](functions/tableMemo.md) +- [tableOptions](functions/tableOptions.md) diff --git a/docs/reference/interfaces/API.md b/docs/reference/interfaces/API.md new file mode 100644 index 0000000000..0db647d0fb --- /dev/null +++ b/docs/reference/interfaces/API.md @@ -0,0 +1,58 @@ +--- +id: API +title: API +--- + +# Interface: API\ + +Defined in: [utils.ts:267](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L267) + +## Type Parameters + +### TDeps + +`TDeps` *extends* `ReadonlyArray`\<`any`\> + +### TDepArgs + +`TDepArgs` + +## Properties + +### fn() + +```ts +fn: (...args) => any; +``` + +Defined in: [utils.ts:268](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L268) + +#### Parameters + +##### args + +...`any` + +#### Returns + +`any` + +*** + +### memoDeps()? + +```ts +optional memoDeps: (depArgs?) => any[] | undefined; +``` + +Defined in: [utils.ts:269](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L269) + +#### Parameters + +##### depArgs? + +`any` + +#### Returns + +`any`[] \| `undefined` diff --git a/docs/reference/interfaces/AggregationFns.md b/docs/reference/interfaces/AggregationFns.md new file mode 100644 index 0000000000..a342522625 --- /dev/null +++ b/docs/reference/interfaces/AggregationFns.md @@ -0,0 +1,8 @@ +--- +id: AggregationFns +title: AggregationFns +--- + +# Interface: AggregationFns + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:28](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L28) diff --git a/docs/reference/interfaces/CachedRowModel_Core.md b/docs/reference/interfaces/CachedRowModel_Core.md new file mode 100644 index 0000000000..720835d910 --- /dev/null +++ b/docs/reference/interfaces/CachedRowModel_Core.md @@ -0,0 +1,36 @@ +--- +id: CachedRowModel_Core +title: CachedRowModel_Core +--- + +# Interface: CachedRowModel\_Core\ + +Defined in: [core/row-models/coreRowModelsFeature.types.ts:37](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.types.ts#L37) + +## Extends + +- [`CachedRowModel_Plugins`](CachedRowModel_Plugins.md) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### coreRowModel() + +```ts +coreRowModel: () => RowModel; +``` + +Defined in: [core/row-models/coreRowModelsFeature.types.ts:41](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.types.ts#L41) + +#### Returns + +[`RowModel`](RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/interfaces/CachedRowModel_Expanded.md b/docs/reference/interfaces/CachedRowModel_Expanded.md new file mode 100644 index 0000000000..f6928a1e16 --- /dev/null +++ b/docs/reference/interfaces/CachedRowModel_Expanded.md @@ -0,0 +1,32 @@ +--- +id: CachedRowModel_Expanded +title: CachedRowModel_Expanded +--- + +# Interface: CachedRowModel\_Expanded\ + +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:136](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L136) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### expandedRowModel() + +```ts +expandedRowModel: () => RowModel; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:140](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L140) + +#### Returns + +[`RowModel`](RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/interfaces/CachedRowModel_Faceted.md b/docs/reference/interfaces/CachedRowModel_Faceted.md new file mode 100644 index 0000000000..63354e1300 --- /dev/null +++ b/docs/reference/interfaces/CachedRowModel_Faceted.md @@ -0,0 +1,84 @@ +--- +id: CachedRowModel_Faceted +title: CachedRowModel_Faceted +--- + +# Interface: CachedRowModel\_Faceted\ + +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:72](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L72) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### facetedMinMaxValues()? + +```ts +optional facetedMinMaxValues: (columnId) => [number, number]; +``` + +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:77](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L77) + +#### Parameters + +##### columnId + +`string` + +#### Returns + +\[`number`, `number`\] + +*** + +### facetedRowModel()? + +```ts +optional facetedRowModel: (columnId) => () => RowModel; +``` + +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:76](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L76) + +#### Parameters + +##### columnId + +`string` + +#### Returns + +```ts +(): RowModel; +``` + +##### Returns + +[`RowModel`](RowModel.md)\<`TFeatures`, `TData`\> + +*** + +### facetedUniqueValues()? + +```ts +optional facetedUniqueValues: (columnId) => Map; +``` + +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:78](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L78) + +#### Parameters + +##### columnId + +`string` + +#### Returns + +`Map`\<`any`, `number`\> diff --git a/docs/reference/interfaces/CachedRowModel_Filtered.md b/docs/reference/interfaces/CachedRowModel_Filtered.md new file mode 100644 index 0000000000..4c61767176 --- /dev/null +++ b/docs/reference/interfaces/CachedRowModel_Filtered.md @@ -0,0 +1,32 @@ +--- +id: CachedRowModel_Filtered +title: CachedRowModel_Filtered +--- + +# Interface: CachedRowModel\_Filtered\ + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:214](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L214) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### filteredRowModel() + +```ts +filteredRowModel: () => RowModel; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:218](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L218) + +#### Returns + +[`RowModel`](RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/interfaces/CachedRowModel_Grouped.md b/docs/reference/interfaces/CachedRowModel_Grouped.md new file mode 100644 index 0000000000..0193aa521a --- /dev/null +++ b/docs/reference/interfaces/CachedRowModel_Grouped.md @@ -0,0 +1,32 @@ +--- +id: CachedRowModel_Grouped +title: CachedRowModel_Grouped +--- + +# Interface: CachedRowModel\_Grouped\ + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:213](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L213) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### groupedRowModel() + +```ts +groupedRowModel: () => RowModel; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:217](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L217) + +#### Returns + +[`RowModel`](RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/interfaces/CachedRowModel_Paginated.md b/docs/reference/interfaces/CachedRowModel_Paginated.md new file mode 100644 index 0000000000..65397dd426 --- /dev/null +++ b/docs/reference/interfaces/CachedRowModel_Paginated.md @@ -0,0 +1,32 @@ +--- +id: CachedRowModel_Paginated +title: CachedRowModel_Paginated +--- + +# Interface: CachedRowModel\_Paginated\ + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:136](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L136) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### paginatedRowModel() + +```ts +paginatedRowModel: () => RowModel; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:140](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L140) + +#### Returns + +[`RowModel`](RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/interfaces/CachedRowModel_Plugins.md b/docs/reference/interfaces/CachedRowModel_Plugins.md new file mode 100644 index 0000000000..22445fe2e2 --- /dev/null +++ b/docs/reference/interfaces/CachedRowModel_Plugins.md @@ -0,0 +1,12 @@ +--- +id: CachedRowModel_Plugins +title: CachedRowModel_Plugins +--- + +# Interface: CachedRowModel\_Plugins + +Defined in: [core/row-models/coreRowModelsFeature.types.ts:35](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.types.ts#L35) + +## Extended by + +- [`CachedRowModel_Core`](CachedRowModel_Core.md) diff --git a/docs/reference/interfaces/CachedRowModel_Sorted.md b/docs/reference/interfaces/CachedRowModel_Sorted.md new file mode 100644 index 0000000000..56ed9e74ce --- /dev/null +++ b/docs/reference/interfaces/CachedRowModel_Sorted.md @@ -0,0 +1,32 @@ +--- +id: CachedRowModel_Sorted +title: CachedRowModel_Sorted +--- + +# Interface: CachedRowModel\_Sorted\ + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:224](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L224) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### sortedRowModel() + +```ts +sortedRowModel: () => RowModel; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:228](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L228) + +#### Returns + +[`RowModel`](RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/interfaces/CachedRowModels_Plugins.md b/docs/reference/interfaces/CachedRowModels_Plugins.md new file mode 100644 index 0000000000..178e9a9cfc --- /dev/null +++ b/docs/reference/interfaces/CachedRowModels_Plugins.md @@ -0,0 +1,18 @@ +--- +id: CachedRowModels_Plugins +title: CachedRowModels_Plugins +--- + +# Interface: CachedRowModels\_Plugins\ + +Defined in: [types/RowModel.ts:87](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/RowModel.ts#L87) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) diff --git a/docs/reference/interfaces/CellContext.md b/docs/reference/interfaces/CellContext.md new file mode 100644 index 0000000000..cddb9a6e7c --- /dev/null +++ b/docs/reference/interfaces/CellContext.md @@ -0,0 +1,82 @@ +--- +id: CellContext +title: CellContext +--- + +# Interface: CellContext\ + +Defined in: [core/cells/coreCellsFeature.types.ts:8](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L8) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](../type-aliases/CellData.md) = [`CellData`](../type-aliases/CellData.md) + +## Properties + +### cell + +```ts +cell: Cell; +``` + +Defined in: [core/cells/coreCellsFeature.types.ts:13](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L13) + +*** + +### column + +```ts +column: Column; +``` + +Defined in: [core/cells/coreCellsFeature.types.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L14) + +*** + +### getValue + +```ts +getValue: Getter; +``` + +Defined in: [core/cells/coreCellsFeature.types.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L15) + +*** + +### renderValue + +```ts +renderValue: Getter; +``` + +Defined in: [core/cells/coreCellsFeature.types.ts:16](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L16) + +*** + +### row + +```ts +row: Row; +``` + +Defined in: [core/cells/coreCellsFeature.types.ts:17](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L17) + +*** + +### table + +```ts +table: Table; +``` + +Defined in: [core/cells/coreCellsFeature.types.ts:18](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L18) diff --git a/docs/reference/interfaces/Cell_Cell.md b/docs/reference/interfaces/Cell_Cell.md new file mode 100644 index 0000000000..e2fe107a6b --- /dev/null +++ b/docs/reference/interfaces/Cell_Cell.md @@ -0,0 +1,134 @@ +--- +id: Cell_Cell +title: Cell_Cell +--- + +# Interface: Cell\_Cell\ + +Defined in: [core/cells/coreCellsFeature.types.ts:44](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L44) + +## Extends + +- [`Cell_CoreProperties`](Cell_CoreProperties.md)\<`TFeatures`, `TData`, `TValue`\> + +## Extended by + +- [`Cell_Core`](Cell_Core.md) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](../type-aliases/CellData.md) = [`CellData`](../type-aliases/CellData.md) + +## Properties + +### column + +```ts +column: Column; +``` + +Defined in: [core/cells/coreCellsFeature.types.ts:29](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L29) + +The associated Column object for the cell. + +#### Inherited from + +[`Cell_CoreProperties`](Cell_CoreProperties.md).[`column`](Cell_CoreProperties.md#column) + +*** + +### getContext() + +```ts +getContext: () => CellContext; +``` + +Defined in: [core/cells/coreCellsFeature.types.ts:52](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L52) + +Returns the rendering context (or props) for cell-based components like cells and aggregated cells. Use these props with your framework's `flexRender` utility to render these using the template of your choice: + +#### Returns + +[`CellContext`](CellContext.md)\<`TFeatures`, `TData`, `TValue`\> + +*** + +### getValue + +```ts +getValue: Getter; +``` + +Defined in: [core/cells/coreCellsFeature.types.ts:56](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L56) + +Returns the value for the cell, accessed via the associated column's accessor key or accessor function. + +*** + +### id + +```ts +id: string; +``` + +Defined in: [core/cells/coreCellsFeature.types.ts:33](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L33) + +The unique ID for the cell across the entire table. + +#### Inherited from + +[`Cell_CoreProperties`](Cell_CoreProperties.md).[`id`](Cell_CoreProperties.md#id) + +*** + +### renderValue + +```ts +renderValue: Getter; +``` + +Defined in: [core/cells/coreCellsFeature.types.ts:60](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L60) + +Renders the value for a cell the same as `getValue`, but will return the `renderFallbackValue` if no value is found. + +*** + +### row + +```ts +row: Row; +``` + +Defined in: [core/cells/coreCellsFeature.types.ts:37](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L37) + +The associated Row object for the cell. + +#### Inherited from + +[`Cell_CoreProperties`](Cell_CoreProperties.md).[`row`](Cell_CoreProperties.md#row) + +*** + +### table + +```ts +table: Table_Internal; +``` + +Defined in: [core/cells/coreCellsFeature.types.ts:41](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L41) + +Reference to the parent table instance. + +#### Inherited from + +[`Cell_CoreProperties`](Cell_CoreProperties.md).[`table`](Cell_CoreProperties.md#table) diff --git a/docs/reference/interfaces/Cell_ColumnGrouping.md b/docs/reference/interfaces/Cell_ColumnGrouping.md new file mode 100644 index 0000000000..e4b7682d8f --- /dev/null +++ b/docs/reference/interfaces/Cell_ColumnGrouping.md @@ -0,0 +1,56 @@ +--- +id: Cell_ColumnGrouping +title: Cell_ColumnGrouping +--- + +# Interface: Cell\_ColumnGrouping + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:132](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L132) + +## Properties + +### getIsAggregated() + +```ts +getIsAggregated: () => boolean; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:136](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L136) + +Returns whether or not the cell is currently aggregated. + +#### Returns + +`boolean` + +*** + +### getIsGrouped() + +```ts +getIsGrouped: () => boolean; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:140](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L140) + +Returns whether or not the cell is currently grouped. + +#### Returns + +`boolean` + +*** + +### getIsPlaceholder() + +```ts +getIsPlaceholder: () => boolean; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:144](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L144) + +Returns whether or not the cell is currently a placeholder cell. + +#### Returns + +`boolean` diff --git a/docs/reference/interfaces/Cell_Core.md b/docs/reference/interfaces/Cell_Core.md new file mode 100644 index 0000000000..fa1c036d2e --- /dev/null +++ b/docs/reference/interfaces/Cell_Core.md @@ -0,0 +1,142 @@ +--- +id: Cell_Core +title: Cell_Core +--- + +# Interface: Cell\_Core\ + +Defined in: [types/Cell.ts:16](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Cell.ts#L16) + +## Extends + +- [`Cell_Cell`](Cell_Cell.md)\<`TFeatures`, `TData`, `TValue`\> + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](../type-aliases/CellData.md) = [`CellData`](../type-aliases/CellData.md) + +## Properties + +### column + +```ts +column: Column; +``` + +Defined in: [core/cells/coreCellsFeature.types.ts:29](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L29) + +The associated Column object for the cell. + +#### Inherited from + +[`Cell_Cell`](Cell_Cell.md).[`column`](Cell_Cell.md#column) + +*** + +### getContext() + +```ts +getContext: () => CellContext; +``` + +Defined in: [core/cells/coreCellsFeature.types.ts:52](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L52) + +Returns the rendering context (or props) for cell-based components like cells and aggregated cells. Use these props with your framework's `flexRender` utility to render these using the template of your choice: + +#### Returns + +[`CellContext`](CellContext.md)\<`TFeatures`, `TData`, `TValue`\> + +#### Inherited from + +[`Cell_Cell`](Cell_Cell.md).[`getContext`](Cell_Cell.md#getcontext) + +*** + +### getValue + +```ts +getValue: Getter; +``` + +Defined in: [core/cells/coreCellsFeature.types.ts:56](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L56) + +Returns the value for the cell, accessed via the associated column's accessor key or accessor function. + +#### Inherited from + +[`Cell_Cell`](Cell_Cell.md).[`getValue`](Cell_Cell.md#getvalue) + +*** + +### id + +```ts +id: string; +``` + +Defined in: [core/cells/coreCellsFeature.types.ts:33](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L33) + +The unique ID for the cell across the entire table. + +#### Inherited from + +[`Cell_Cell`](Cell_Cell.md).[`id`](Cell_Cell.md#id) + +*** + +### renderValue + +```ts +renderValue: Getter; +``` + +Defined in: [core/cells/coreCellsFeature.types.ts:60](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L60) + +Renders the value for a cell the same as `getValue`, but will return the `renderFallbackValue` if no value is found. + +#### Inherited from + +[`Cell_Cell`](Cell_Cell.md).[`renderValue`](Cell_Cell.md#rendervalue) + +*** + +### row + +```ts +row: Row; +``` + +Defined in: [core/cells/coreCellsFeature.types.ts:37](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L37) + +The associated Row object for the cell. + +#### Inherited from + +[`Cell_Cell`](Cell_Cell.md).[`row`](Cell_Cell.md#row) + +*** + +### table + +```ts +table: Table_Internal; +``` + +Defined in: [core/cells/coreCellsFeature.types.ts:41](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L41) + +Reference to the parent table instance. + +#### Inherited from + +[`Cell_Cell`](Cell_Cell.md).[`table`](Cell_Cell.md#table) diff --git a/docs/reference/interfaces/Cell_CoreProperties.md b/docs/reference/interfaces/Cell_CoreProperties.md new file mode 100644 index 0000000000..67a3293126 --- /dev/null +++ b/docs/reference/interfaces/Cell_CoreProperties.md @@ -0,0 +1,74 @@ +--- +id: Cell_CoreProperties +title: Cell_CoreProperties +--- + +# Interface: Cell\_CoreProperties\ + +Defined in: [core/cells/coreCellsFeature.types.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L21) + +## Extended by + +- [`Cell_Cell`](Cell_Cell.md) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](../type-aliases/CellData.md) = [`CellData`](../type-aliases/CellData.md) + +## Properties + +### column + +```ts +column: Column; +``` + +Defined in: [core/cells/coreCellsFeature.types.ts:29](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L29) + +The associated Column object for the cell. + +*** + +### id + +```ts +id: string; +``` + +Defined in: [core/cells/coreCellsFeature.types.ts:33](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L33) + +The unique ID for the cell across the entire table. + +*** + +### row + +```ts +row: Row; +``` + +Defined in: [core/cells/coreCellsFeature.types.ts:37](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L37) + +The associated Row object for the cell. + +*** + +### table + +```ts +table: Table_Internal; +``` + +Defined in: [core/cells/coreCellsFeature.types.ts:41](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L41) + +Reference to the parent table instance. diff --git a/docs/reference/interfaces/Cell_Plugins.md b/docs/reference/interfaces/Cell_Plugins.md new file mode 100644 index 0000000000..a751054438 --- /dev/null +++ b/docs/reference/interfaces/Cell_Plugins.md @@ -0,0 +1,25 @@ +--- +id: Cell_Plugins +title: Cell_Plugins +--- + +# Interface: Cell\_Plugins\ + +Defined in: [types/Cell.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Cell.ts#L10) + +Use this interface as a target for declaration merging to add your own plugin properties. +Note: This will affect the types of all tables in your project. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](../type-aliases/CellData.md) = [`CellData`](../type-aliases/CellData.md) diff --git a/docs/reference/interfaces/ColumnDef_ColumnFiltering.md b/docs/reference/interfaces/ColumnDef_ColumnFiltering.md new file mode 100644 index 0000000000..3128dc63b7 --- /dev/null +++ b/docs/reference/interfaces/ColumnDef_ColumnFiltering.md @@ -0,0 +1,42 @@ +--- +id: ColumnDef_ColumnFiltering +title: ColumnDef_ColumnFiltering +--- + +# Interface: ColumnDef\_ColumnFiltering\ + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:81](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L81) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### enableColumnFilter? + +```ts +optional enableColumnFilter: boolean; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:88](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L88) + +Enables/disables the **column** filter for this column. + +*** + +### filterFn? + +```ts +optional filterFn: FilterFnOption; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:92](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L92) + +The filter function to use with this column. Can be the name of a built-in filter function or a custom filter function. diff --git a/docs/reference/interfaces/ColumnDef_ColumnGrouping.md b/docs/reference/interfaces/ColumnDef_ColumnGrouping.md new file mode 100644 index 0000000000..e1d57d7f83 --- /dev/null +++ b/docs/reference/interfaces/ColumnDef_ColumnGrouping.md @@ -0,0 +1,80 @@ +--- +id: ColumnDef_ColumnGrouping +title: ColumnDef_ColumnGrouping +--- + +# Interface: ColumnDef\_ColumnGrouping\ + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:53](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L53) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](../type-aliases/CellData.md) = [`CellData`](../type-aliases/CellData.md) + +## Properties + +### aggregatedCell? + +```ts +optional aggregatedCell: ColumnDefTemplate["getContext"]>>; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:61](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L61) + +The cell to display each row for the column if the cell is an aggregate. If a function is passed, it will be passed a props object with the context of the cell and should return the property type for your adapter (the exact type depends on the adapter being used). + +*** + +### aggregationFn? + +```ts +optional aggregationFn: AggregationFnOption; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:67](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L67) + +The resolved aggregation function for the column. + +*** + +### enableGrouping? + +```ts +optional enableGrouping: boolean; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:71](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L71) + +Enables/disables grouping for this column. + +*** + +### getGroupingValue()? + +```ts +optional getGroupingValue: (row) => any; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L75) + +Specify a value to be used for grouping rows on this column. If this option is not specified, the value derived from `accessorKey` / `accessorFn` will be used instead. + +#### Parameters + +##### row + +`TData` + +#### Returns + +`any` diff --git a/docs/reference/interfaces/ColumnDef_ColumnPinning.md b/docs/reference/interfaces/ColumnDef_ColumnPinning.md new file mode 100644 index 0000000000..b57243b7dd --- /dev/null +++ b/docs/reference/interfaces/ColumnDef_ColumnPinning.md @@ -0,0 +1,20 @@ +--- +id: ColumnDef_ColumnPinning +title: ColumnDef_ColumnPinning +--- + +# Interface: ColumnDef\_ColumnPinning + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L34) + +## Properties + +### enablePinning? + +```ts +optional enablePinning: boolean; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:38](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L38) + +Enables/disables column pinning for this column. Defaults to `true`. diff --git a/docs/reference/interfaces/ColumnDef_ColumnResizing.md b/docs/reference/interfaces/ColumnDef_ColumnResizing.md new file mode 100644 index 0000000000..f5f22b7ef6 --- /dev/null +++ b/docs/reference/interfaces/ColumnDef_ColumnResizing.md @@ -0,0 +1,20 @@ +--- +id: ColumnDef_ColumnResizing +title: ColumnDef_ColumnResizing +--- + +# Interface: ColumnDef\_ColumnResizing + +Defined in: [features/column-resizing/columnResizingFeature.types.ts:55](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L55) + +## Properties + +### enableResizing? + +```ts +optional enableResizing: boolean; +``` + +Defined in: [features/column-resizing/columnResizingFeature.types.ts:59](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L59) + +Enables or disables column resizing for the column. diff --git a/docs/reference/interfaces/ColumnDef_ColumnSizing.md b/docs/reference/interfaces/ColumnDef_ColumnSizing.md new file mode 100644 index 0000000000..6180e9f82d --- /dev/null +++ b/docs/reference/interfaces/ColumnDef_ColumnSizing.md @@ -0,0 +1,44 @@ +--- +id: ColumnDef_ColumnSizing +title: ColumnDef_ColumnSizing +--- + +# Interface: ColumnDef\_ColumnSizing + +Defined in: [features/column-sizing/columnSizingFeature.types.ts:49](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L49) + +## Properties + +### maxSize? + +```ts +optional maxSize: number; +``` + +Defined in: [features/column-sizing/columnSizingFeature.types.ts:53](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L53) + +The maximum allowed size for the column + +*** + +### minSize? + +```ts +optional minSize: number; +``` + +Defined in: [features/column-sizing/columnSizingFeature.types.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L57) + +The minimum allowed size for the column + +*** + +### size? + +```ts +optional size: number; +``` + +Defined in: [features/column-sizing/columnSizingFeature.types.ts:61](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L61) + +The desired size for the column diff --git a/docs/reference/interfaces/ColumnDef_ColumnVisibility.md b/docs/reference/interfaces/ColumnDef_ColumnVisibility.md new file mode 100644 index 0000000000..b435ce2963 --- /dev/null +++ b/docs/reference/interfaces/ColumnDef_ColumnVisibility.md @@ -0,0 +1,20 @@ +--- +id: ColumnDef_ColumnVisibility +title: ColumnDef_ColumnVisibility +--- + +# Interface: ColumnDef\_ColumnVisibility + +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:66](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L66) + +## Properties + +### enableHiding? + +```ts +optional enableHiding: boolean; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:70](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L70) + +Enables/disables column hiding for this column. Defaults to `true`. diff --git a/docs/reference/interfaces/ColumnDef_GlobalFiltering.md b/docs/reference/interfaces/ColumnDef_GlobalFiltering.md new file mode 100644 index 0000000000..b55f87b831 --- /dev/null +++ b/docs/reference/interfaces/ColumnDef_GlobalFiltering.md @@ -0,0 +1,20 @@ +--- +id: ColumnDef_GlobalFiltering +title: ColumnDef_GlobalFiltering +--- + +# Interface: ColumnDef\_GlobalFiltering + +Defined in: [features/global-filtering/globalFilteringFeature.types.ts:18](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L18) + +## Properties + +### enableGlobalFilter? + +```ts +optional enableGlobalFilter: boolean; +``` + +Defined in: [features/global-filtering/globalFilteringFeature.types.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L22) + +Enables/disables the **global** filter for this column. diff --git a/docs/reference/interfaces/ColumnDef_Plugins.md b/docs/reference/interfaces/ColumnDef_Plugins.md new file mode 100644 index 0000000000..0f739f438f --- /dev/null +++ b/docs/reference/interfaces/ColumnDef_Plugins.md @@ -0,0 +1,25 @@ +--- +id: ColumnDef_Plugins +title: ColumnDef_Plugins +--- + +# Interface: ColumnDef\_Plugins\ + +Defined in: [types/ColumnDef.ts:18](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L18) + +Use this interface as a target for declaration merging to add your own plugin properties. +Note: This will affect the types of all tables in your project. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](../type-aliases/CellData.md) = [`CellData`](../type-aliases/CellData.md) diff --git a/docs/reference/interfaces/ColumnDef_RowSorting.md b/docs/reference/interfaces/ColumnDef_RowSorting.md new file mode 100644 index 0000000000..c4d521db93 --- /dev/null +++ b/docs/reference/interfaces/ColumnDef_RowSorting.md @@ -0,0 +1,98 @@ +--- +id: ColumnDef_RowSorting +title: ColumnDef_RowSorting +--- + +# Interface: ColumnDef\_RowSorting\ + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:51](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L51) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### enableMultiSort? + +```ts +optional enableMultiSort: boolean; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:58](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L58) + +Enables/Disables multi-sorting for this column. + +*** + +### enableSorting? + +```ts +optional enableSorting: boolean; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:62](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L62) + +Enables/Disables sorting for this column. + +*** + +### invertSorting? + +```ts +optional invertSorting: boolean; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:66](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L66) + +Inverts the order of the sorting for this column. This is useful for values that have an inverted best/worst scale where lower numbers are better, eg. a ranking (1st, 2nd, 3rd) or golf-like scoring + +*** + +### sortDescFirst? + +```ts +optional sortDescFirst: boolean; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:70](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L70) + +Set to `true` for sorting toggles on this column to start in the descending direction. + +*** + +### sortFn? + +```ts +optional sortFn: SortFnOption; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:76](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L76) + +The sorting function to use with this column. +- A `string` referencing a built-in sorting function +- A custom sorting function + +*** + +### sortUndefined? + +```ts +optional sortUndefined: false | 1 | -1 | "first" | "last"; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:86](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L86) + +The priority of undefined values when sorting this column. +- `false` + - Undefined values will be considered tied and need to be sorted by the next column filter or original index (whichever applies) +- `-1` + - Undefined values will be sorted with higher priority (ascending) (if ascending, undefined will appear on the beginning of the list) +- `1` + - Undefined values will be sorted with lower priority (descending) (if ascending, undefined will appear on the end of the list) diff --git a/docs/reference/interfaces/ColumnDefaultOptions.md b/docs/reference/interfaces/ColumnDefaultOptions.md new file mode 100644 index 0000000000..9acb1cbd8d --- /dev/null +++ b/docs/reference/interfaces/ColumnDefaultOptions.md @@ -0,0 +1,28 @@ +--- +id: ColumnDefaultOptions +title: ColumnDefaultOptions +--- + +# Interface: ColumnDefaultOptions + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:147](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L147) + +## Properties + +### enableGrouping + +```ts +enableGrouping: boolean; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:148](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L148) + +*** + +### onGroupingChange + +```ts +onGroupingChange: OnChangeFn; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:149](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L149) diff --git a/docs/reference/interfaces/ColumnFilter.md b/docs/reference/interfaces/ColumnFilter.md new file mode 100644 index 0000000000..d19677e9c5 --- /dev/null +++ b/docs/reference/interfaces/ColumnFilter.md @@ -0,0 +1,28 @@ +--- +id: ColumnFilter +title: ColumnFilter +--- + +# Interface: ColumnFilter + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:24](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L24) + +## Properties + +### id + +```ts +id: string; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:25](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L25) + +*** + +### value + +```ts +value: unknown; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L26) diff --git a/docs/reference/interfaces/ColumnMeta.md b/docs/reference/interfaces/ColumnMeta.md new file mode 100644 index 0000000000..9ecede6d4e --- /dev/null +++ b/docs/reference/interfaces/ColumnMeta.md @@ -0,0 +1,22 @@ +--- +id: ColumnMeta +title: ColumnMeta +--- + +# Interface: ColumnMeta\ + +Defined in: [types/ColumnDef.ts:24](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L24) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](../type-aliases/CellData.md) = [`CellData`](../type-aliases/CellData.md) diff --git a/docs/reference/interfaces/ColumnOrderDefaultOptions.md b/docs/reference/interfaces/ColumnOrderDefaultOptions.md new file mode 100644 index 0000000000..edf1bd0337 --- /dev/null +++ b/docs/reference/interfaces/ColumnOrderDefaultOptions.md @@ -0,0 +1,18 @@ +--- +id: ColumnOrderDefaultOptions +title: ColumnOrderDefaultOptions +--- + +# Interface: ColumnOrderDefaultOptions + +Defined in: [features/column-ordering/columnOrderingFeature.types.ts:33](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L33) + +## Properties + +### onColumnOrderChange + +```ts +onColumnOrderChange: OnChangeFn; +``` + +Defined in: [features/column-ordering/columnOrderingFeature.types.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L34) diff --git a/docs/reference/interfaces/ColumnPinningDefaultOptions.md b/docs/reference/interfaces/ColumnPinningDefaultOptions.md new file mode 100644 index 0000000000..0e6bf24b07 --- /dev/null +++ b/docs/reference/interfaces/ColumnPinningDefaultOptions.md @@ -0,0 +1,18 @@ +--- +id: ColumnPinningDefaultOptions +title: ColumnPinningDefaultOptions +--- + +# Interface: ColumnPinningDefaultOptions + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L30) + +## Properties + +### onColumnPinningChange + +```ts +onColumnPinningChange: OnChangeFn; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:31](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L31) diff --git a/docs/reference/interfaces/ColumnPinningState.md b/docs/reference/interfaces/ColumnPinningState.md new file mode 100644 index 0000000000..7e30ac30ab --- /dev/null +++ b/docs/reference/interfaces/ColumnPinningState.md @@ -0,0 +1,28 @@ +--- +id: ColumnPinningState +title: ColumnPinningState +--- + +# Interface: ColumnPinningState + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L10) + +## Properties + +### left + +```ts +left: string[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L11) + +*** + +### right + +```ts +right: string[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:12](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L12) diff --git a/docs/reference/interfaces/ColumnSort.md b/docs/reference/interfaces/ColumnSort.md new file mode 100644 index 0000000000..0737a1eba0 --- /dev/null +++ b/docs/reference/interfaces/ColumnSort.md @@ -0,0 +1,28 @@ +--- +id: ColumnSort +title: ColumnSort +--- + +# Interface: ColumnSort + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L10) + +## Properties + +### desc + +```ts +desc: boolean; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L11) + +*** + +### id + +```ts +id: string; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:12](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L12) diff --git a/docs/reference/interfaces/Column_Column.md b/docs/reference/interfaces/Column_Column.md new file mode 100644 index 0000000000..64e4ed69d8 --- /dev/null +++ b/docs/reference/interfaces/Column_Column.md @@ -0,0 +1,177 @@ +--- +id: Column_Column +title: Column_Column +--- + +# Interface: Column\_Column\ + +Defined in: [core/columns/coreColumnsFeature.types.ts:45](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L45) + +## Extends + +- [`Column_CoreProperties`](Column_CoreProperties.md)\<`TFeatures`, `TData`, `TValue`\> + +## Extended by + +- [`Column_Core`](Column_Core.md) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](../type-aliases/CellData.md) = [`CellData`](../type-aliases/CellData.md) + +## Properties + +### accessorFn? + +```ts +optional accessorFn: AccessorFn; +``` + +Defined in: [core/columns/coreColumnsFeature.types.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L15) + +The resolved accessor function to use when extracting the value for the column from each row. Will only be defined if the column def has a valid accessor key or function defined. + +#### Inherited from + +[`Column_CoreProperties`](Column_CoreProperties.md).[`accessorFn`](Column_CoreProperties.md#accessorfn) + +*** + +### columnDef + +```ts +columnDef: ColumnDef; +``` + +Defined in: [core/columns/coreColumnsFeature.types.ts:19](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L19) + +The original column def used to create the column. + +#### Inherited from + +[`Column_CoreProperties`](Column_CoreProperties.md).[`columnDef`](Column_CoreProperties.md#columndef) + +*** + +### columns + +```ts +columns: Column[]; +``` + +Defined in: [core/columns/coreColumnsFeature.types.ts:23](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L23) + +The child column (if the column is a group column). Will be an empty array if the column is not a group column. + +#### Inherited from + +[`Column_CoreProperties`](Column_CoreProperties.md).[`columns`](Column_CoreProperties.md#columns) + +*** + +### depth + +```ts +depth: number; +``` + +Defined in: [core/columns/coreColumnsFeature.types.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L27) + +The depth of the column (if grouped) relative to the root column def array. + +#### Inherited from + +[`Column_CoreProperties`](Column_CoreProperties.md).[`depth`](Column_CoreProperties.md#depth) + +*** + +### getFlatColumns() + +```ts +getFlatColumns: () => Column[]; +``` + +Defined in: [core/columns/coreColumnsFeature.types.ts:53](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L53) + +Returns the flattened array of this column and all child/grand-child columns for this column. + +#### Returns + +[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `TValue`\>[] + +*** + +### getLeafColumns() + +```ts +getLeafColumns: () => Column[]; +``` + +Defined in: [core/columns/coreColumnsFeature.types.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L57) + +Returns an array of all leaf-node columns for this column. If a column has no children, it is considered the only leaf-node column. + +#### Returns + +[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `TValue`\>[] + +*** + +### id + +```ts +id: string; +``` + +Defined in: [core/columns/coreColumnsFeature.types.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L34) + +The resolved unique identifier for the column resolved in this priority: + - A manual `id` property from the column def + - The accessor key from the column def + - The header string from the column def + +#### Inherited from + +[`Column_CoreProperties`](Column_CoreProperties.md).[`id`](Column_CoreProperties.md#id) + +*** + +### parent? + +```ts +optional parent: Column; +``` + +Defined in: [core/columns/coreColumnsFeature.types.ts:38](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L38) + +The parent column for this column. Will be undefined if this is a root column. + +#### Inherited from + +[`Column_CoreProperties`](Column_CoreProperties.md).[`parent`](Column_CoreProperties.md#parent) + +*** + +### table + +```ts +table: Table_Internal; +``` + +Defined in: [core/columns/coreColumnsFeature.types.ts:42](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L42) + +Reference to the parent table instance. + +#### Inherited from + +[`Column_CoreProperties`](Column_CoreProperties.md).[`table`](Column_CoreProperties.md#table) diff --git a/docs/reference/interfaces/Column_ColumnFaceting.md b/docs/reference/interfaces/Column_ColumnFaceting.md new file mode 100644 index 0000000000..4aa49e99c3 --- /dev/null +++ b/docs/reference/interfaces/Column_ColumnFaceting.md @@ -0,0 +1,66 @@ +--- +id: Column_ColumnFaceting +title: Column_ColumnFaceting +--- + +# Interface: Column\_ColumnFaceting\ + +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:6](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L6) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### getFacetedMinMaxValues() + +```ts +getFacetedMinMaxValues: () => [number, number] | undefined; +``` + +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:13](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L13) + +A function that **computes and returns** a min/max tuple derived from `column.getFacetedRowModel`. Useful for displaying faceted result values. + +#### Returns + +\[`number`, `number`\] \| `undefined` + +*** + +### getFacetedRowModel() + +```ts +getFacetedRowModel: () => RowModel; +``` + +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:17](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L17) + +A function that **computes and returns** a row model with all other column filters applied, excluding its own filter. Useful for displaying faceted result counts. + +#### Returns + +[`RowModel`](RowModel.md)\<`TFeatures`, `TData`\> + +*** + +### getFacetedUniqueValues() + +```ts +getFacetedUniqueValues: () => Map; +``` + +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L21) + +Returns a `Map` of unique values and their occurrences derived from `column.getFacetedRowModel`. Useful for displaying faceted result values. + +#### Returns + +`Map`\<`any`, `number`\> diff --git a/docs/reference/interfaces/Column_ColumnFiltering.md b/docs/reference/interfaces/Column_ColumnFiltering.md new file mode 100644 index 0000000000..6370e2c50c --- /dev/null +++ b/docs/reference/interfaces/Column_ColumnFiltering.md @@ -0,0 +1,136 @@ +--- +id: Column_ColumnFiltering +title: Column_ColumnFiltering +--- + +# Interface: Column\_ColumnFiltering\ + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:95](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L95) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### getAutoFilterFn() + +```ts +getAutoFilterFn: () => FilterFn; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:102](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L102) + +Returns an automatically calculated filter function for the column based off of the columns first known value. + +#### Returns + +[`FilterFn`](FilterFn.md)\<`TFeatures`, `TData`\> + +*** + +### getCanFilter() + +```ts +getCanFilter: () => boolean; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:106](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L106) + +Returns whether or not the column can be **column** filtered. + +#### Returns + +`boolean` + +*** + +### getFilterFn() + +```ts +getFilterFn: () => FilterFn; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:110](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L110) + +Returns the filter function (either user-defined or automatic, depending on configuration) for the columnId specified. + +#### Returns + +[`FilterFn`](FilterFn.md)\<`TFeatures`, `TData`\> + +*** + +### getFilterIndex() + +```ts +getFilterIndex: () => number; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:114](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L114) + +Returns the index (including `-1`) of the column filter in the table's `state.columnFilters` array. + +#### Returns + +`number` + +*** + +### getFilterValue() + +```ts +getFilterValue: () => unknown; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:118](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L118) + +Returns the current filter value for the column. + +#### Returns + +`unknown` + +*** + +### getIsFiltered() + +```ts +getIsFiltered: () => boolean; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:122](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L122) + +Returns whether or not the column is currently filtered. + +#### Returns + +`boolean` + +*** + +### setFilterValue() + +```ts +setFilterValue: (updater) => void; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:126](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L126) + +A function that sets the current filter value for the column. You can pass it a value or an updater function for immutability-safe operations on existing values. + +#### Parameters + +##### updater + +`any` + +#### Returns + +`void` diff --git a/docs/reference/interfaces/Column_ColumnGrouping.md b/docs/reference/interfaces/Column_ColumnGrouping.md new file mode 100644 index 0000000000..e7aef8f88b --- /dev/null +++ b/docs/reference/interfaces/Column_ColumnGrouping.md @@ -0,0 +1,142 @@ +--- +id: Column_ColumnGrouping +title: Column_ColumnGrouping +--- + +# Interface: Column\_ColumnGrouping\ + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:78](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L78) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### getAggregationFn() + +```ts +getAggregationFn: () => + | AggregationFn + | undefined; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:85](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L85) + +Returns the aggregation function for the column. + +#### Returns + + \| [`AggregationFn`](../type-aliases/AggregationFn.md)\<`TFeatures`, `TData`\> + \| `undefined` + +*** + +### getAutoAggregationFn() + +```ts +getAutoAggregationFn: () => + | AggregationFn + | undefined; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:89](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L89) + +Returns the automatically inferred aggregation function for the column. + +#### Returns + + \| [`AggregationFn`](../type-aliases/AggregationFn.md)\<`TFeatures`, `TData`\> + \| `undefined` + +*** + +### getCanGroup() + +```ts +getCanGroup: () => boolean; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:93](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L93) + +Returns whether or not the column can be grouped. + +#### Returns + +`boolean` + +*** + +### getGroupedIndex() + +```ts +getGroupedIndex: () => number; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:97](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L97) + +Returns the index of the column in the grouping state. + +#### Returns + +`number` + +*** + +### getIsGrouped() + +```ts +getIsGrouped: () => boolean; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:101](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L101) + +Returns whether or not the column is currently grouped. + +#### Returns + +`boolean` + +*** + +### getToggleGroupingHandler() + +```ts +getToggleGroupingHandler: () => () => void; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:105](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L105) + +Returns a function that toggles the grouping state of the column. This is useful for passing to the `onClick` prop of a button. + +#### Returns + +```ts +(): void; +``` + +##### Returns + +`void` + +*** + +### toggleGrouping() + +```ts +toggleGrouping: () => void; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:109](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L109) + +Toggles the grouping state of the column. + +#### Returns + +`void` diff --git a/docs/reference/interfaces/Column_ColumnOrdering.md b/docs/reference/interfaces/Column_ColumnOrdering.md new file mode 100644 index 0000000000..87c4f17d34 --- /dev/null +++ b/docs/reference/interfaces/Column_ColumnOrdering.md @@ -0,0 +1,74 @@ +--- +id: Column_ColumnOrdering +title: Column_ColumnOrdering +--- + +# Interface: Column\_ColumnOrdering + +Defined in: [features/column-ordering/columnOrderingFeature.types.ts:18](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L18) + +## Properties + +### getIndex() + +```ts +getIndex: (position?) => number; +``` + +Defined in: [features/column-ordering/columnOrderingFeature.types.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L22) + +Returns the index of the column in the order of the visible columns. Optionally pass a `position` parameter to get the index of the column in a sub-section of the table + +#### Parameters + +##### position? + +[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) | `"center"` + +#### Returns + +`number` + +*** + +### getIsFirstColumn() + +```ts +getIsFirstColumn: (position?) => boolean; +``` + +Defined in: [features/column-ordering/columnOrderingFeature.types.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L26) + +Returns `true` if the column is the first column in the order of the visible columns. Optionally pass a `position` parameter to check if the column is the first in a sub-section of the table. + +#### Parameters + +##### position? + +[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) | `"center"` + +#### Returns + +`boolean` + +*** + +### getIsLastColumn() + +```ts +getIsLastColumn: (position?) => boolean; +``` + +Defined in: [features/column-ordering/columnOrderingFeature.types.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L30) + +Returns `true` if the column is the last column in the order of the visible columns. Optionally pass a `position` parameter to check if the column is the last in a sub-section of the table. + +#### Parameters + +##### position? + +[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) | `"center"` + +#### Returns + +`boolean` diff --git a/docs/reference/interfaces/Column_ColumnPinning.md b/docs/reference/interfaces/Column_ColumnPinning.md new file mode 100644 index 0000000000..462ed38be5 --- /dev/null +++ b/docs/reference/interfaces/Column_ColumnPinning.md @@ -0,0 +1,78 @@ +--- +id: Column_ColumnPinning +title: Column_ColumnPinning +--- + +# Interface: Column\_ColumnPinning + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:41](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L41) + +## Properties + +### getCanPin() + +```ts +getCanPin: () => boolean; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:45](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L45) + +Returns whether or not the column can be pinned. + +#### Returns + +`boolean` + +*** + +### getIsPinned() + +```ts +getIsPinned: () => ColumnPinningPosition; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:49](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L49) + +Returns the pinned position of the column. (`'left'`, `'right'` or `false`) + +#### Returns + +[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) + +*** + +### getPinnedIndex() + +```ts +getPinnedIndex: () => number; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:53](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L53) + +Returns the numeric pinned index of the column within a pinned column group. + +#### Returns + +`number` + +*** + +### pin() + +```ts +pin: (position) => void; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L57) + +Pins a column to the `'left'` or `'right'`, or unpins the column to the center if `false` is passed. + +#### Parameters + +##### position + +[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) + +#### Returns + +`void` diff --git a/docs/reference/interfaces/Column_ColumnResizing.md b/docs/reference/interfaces/Column_ColumnResizing.md new file mode 100644 index 0000000000..65f5cdb51c --- /dev/null +++ b/docs/reference/interfaces/Column_ColumnResizing.md @@ -0,0 +1,40 @@ +--- +id: Column_ColumnResizing +title: Column_ColumnResizing +--- + +# Interface: Column\_ColumnResizing + +Defined in: [features/column-resizing/columnResizingFeature.types.ts:62](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L62) + +## Properties + +### getCanResize() + +```ts +getCanResize: () => boolean; +``` + +Defined in: [features/column-resizing/columnResizingFeature.types.ts:66](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L66) + +Returns `true` if the column can be resized. + +#### Returns + +`boolean` + +*** + +### getIsResizing() + +```ts +getIsResizing: () => boolean; +``` + +Defined in: [features/column-resizing/columnResizingFeature.types.ts:70](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L70) + +Returns `true` if the column is currently being resized. + +#### Returns + +`boolean` diff --git a/docs/reference/interfaces/Column_ColumnSizing.md b/docs/reference/interfaces/Column_ColumnSizing.md new file mode 100644 index 0000000000..5f7eb98c76 --- /dev/null +++ b/docs/reference/interfaces/Column_ColumnSizing.md @@ -0,0 +1,84 @@ +--- +id: Column_ColumnSizing +title: Column_ColumnSizing +--- + +# Interface: Column\_ColumnSizing + +Defined in: [features/column-sizing/columnSizingFeature.types.ts:64](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L64) + +## Properties + +### getAfter() + +```ts +getAfter: (position?) => number; +``` + +Defined in: [features/column-sizing/columnSizingFeature.types.ts:68](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L68) + +Returns the offset measurement along the row-axis (usually the x-axis for standard tables) for the header. This is effectively a sum of the offset measurements of all succeeding (right) headers in relation to the current column. + +#### Parameters + +##### position? + +[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) | `"center"` + +#### Returns + +`number` + +*** + +### getSize() + +```ts +getSize: () => number; +``` + +Defined in: [features/column-sizing/columnSizingFeature.types.ts:72](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L72) + +Returns the current size of the column. + +#### Returns + +`number` + +*** + +### getStart() + +```ts +getStart: (position?) => number; +``` + +Defined in: [features/column-sizing/columnSizingFeature.types.ts:76](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L76) + +Returns the offset measurement along the row-axis (usually the x-axis for standard tables) for the header. This is effectively a sum of the offset measurements of all preceding (left) headers in relation to the current column. + +#### Parameters + +##### position? + +[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) | `"center"` + +#### Returns + +`number` + +*** + +### resetSize() + +```ts +resetSize: () => void; +``` + +Defined in: [features/column-sizing/columnSizingFeature.types.ts:80](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L80) + +Resets the column to its initial size. + +#### Returns + +`void` diff --git a/docs/reference/interfaces/Column_ColumnVisibility.md b/docs/reference/interfaces/Column_ColumnVisibility.md new file mode 100644 index 0000000000..d9a4fd2cb3 --- /dev/null +++ b/docs/reference/interfaces/Column_ColumnVisibility.md @@ -0,0 +1,90 @@ +--- +id: Column_ColumnVisibility +title: Column_ColumnVisibility +--- + +# Interface: Column\_ColumnVisibility + +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:84](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L84) + +## Properties + +### getCanHide() + +```ts +getCanHide: () => boolean; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:88](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L88) + +Returns whether the column can be hidden + +#### Returns + +`boolean` + +*** + +### getIsVisible() + +```ts +getIsVisible: () => boolean; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:92](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L92) + +Returns whether the column is visible + +#### Returns + +`boolean` + +*** + +### getToggleVisibilityHandler() + +```ts +getToggleVisibilityHandler: () => (event) => void; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:96](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L96) + +Returns a function that can be used to toggle the column visibility. This function can be used to bind to an event handler to a checkbox. + +#### Returns + +```ts +(event): void; +``` + +##### Parameters + +###### event + +`unknown` + +##### Returns + +`void` + +*** + +### toggleVisibility() + +```ts +toggleVisibility: (value?) => void; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:100](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L100) + +Toggles the visibility of the column. + +#### Parameters + +##### value? + +`boolean` + +#### Returns + +`void` diff --git a/docs/reference/interfaces/Column_Core.md b/docs/reference/interfaces/Column_Core.md new file mode 100644 index 0000000000..19778f5f47 --- /dev/null +++ b/docs/reference/interfaces/Column_Core.md @@ -0,0 +1,181 @@ +--- +id: Column_Core +title: Column_Core +--- + +# Interface: Column\_Core\ + +Defined in: [types/Column.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Column.ts#L26) + +## Extends + +- [`Column_Column`](Column_Column.md)\<`TFeatures`, `TData`, `TValue`\> + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` = `unknown` + +## Properties + +### accessorFn? + +```ts +optional accessorFn: AccessorFn; +``` + +Defined in: [core/columns/coreColumnsFeature.types.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L15) + +The resolved accessor function to use when extracting the value for the column from each row. Will only be defined if the column def has a valid accessor key or function defined. + +#### Inherited from + +[`Column_Column`](Column_Column.md).[`accessorFn`](Column_Column.md#accessorfn) + +*** + +### columnDef + +```ts +columnDef: ColumnDef; +``` + +Defined in: [core/columns/coreColumnsFeature.types.ts:19](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L19) + +The original column def used to create the column. + +#### Inherited from + +[`Column_Column`](Column_Column.md).[`columnDef`](Column_Column.md#columndef) + +*** + +### columns + +```ts +columns: Column[]; +``` + +Defined in: [core/columns/coreColumnsFeature.types.ts:23](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L23) + +The child column (if the column is a group column). Will be an empty array if the column is not a group column. + +#### Inherited from + +[`Column_Column`](Column_Column.md).[`columns`](Column_Column.md#columns) + +*** + +### depth + +```ts +depth: number; +``` + +Defined in: [core/columns/coreColumnsFeature.types.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L27) + +The depth of the column (if grouped) relative to the root column def array. + +#### Inherited from + +[`Column_Column`](Column_Column.md).[`depth`](Column_Column.md#depth) + +*** + +### getFlatColumns() + +```ts +getFlatColumns: () => Column[]; +``` + +Defined in: [core/columns/coreColumnsFeature.types.ts:53](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L53) + +Returns the flattened array of this column and all child/grand-child columns for this column. + +#### Returns + +[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `TValue`\>[] + +#### Inherited from + +[`Column_Column`](Column_Column.md).[`getFlatColumns`](Column_Column.md#getflatcolumns) + +*** + +### getLeafColumns() + +```ts +getLeafColumns: () => Column[]; +``` + +Defined in: [core/columns/coreColumnsFeature.types.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L57) + +Returns an array of all leaf-node columns for this column. If a column has no children, it is considered the only leaf-node column. + +#### Returns + +[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `TValue`\>[] + +#### Inherited from + +[`Column_Column`](Column_Column.md).[`getLeafColumns`](Column_Column.md#getleafcolumns) + +*** + +### id + +```ts +id: string; +``` + +Defined in: [core/columns/coreColumnsFeature.types.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L34) + +The resolved unique identifier for the column resolved in this priority: + - A manual `id` property from the column def + - The accessor key from the column def + - The header string from the column def + +#### Inherited from + +[`Column_Column`](Column_Column.md).[`id`](Column_Column.md#id) + +*** + +### parent? + +```ts +optional parent: Column; +``` + +Defined in: [core/columns/coreColumnsFeature.types.ts:38](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L38) + +The parent column for this column. Will be undefined if this is a root column. + +#### Inherited from + +[`Column_Column`](Column_Column.md).[`parent`](Column_Column.md#parent) + +*** + +### table + +```ts +table: Table_Internal; +``` + +Defined in: [core/columns/coreColumnsFeature.types.ts:42](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L42) + +Reference to the parent table instance. + +#### Inherited from + +[`Column_Column`](Column_Column.md).[`table`](Column_Column.md#table) diff --git a/docs/reference/interfaces/Column_CoreProperties.md b/docs/reference/interfaces/Column_CoreProperties.md new file mode 100644 index 0000000000..7fbb00c16d --- /dev/null +++ b/docs/reference/interfaces/Column_CoreProperties.md @@ -0,0 +1,113 @@ +--- +id: Column_CoreProperties +title: Column_CoreProperties +--- + +# Interface: Column\_CoreProperties\ + +Defined in: [core/columns/coreColumnsFeature.types.ts:7](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L7) + +## Extended by + +- [`Column_Column`](Column_Column.md) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](../type-aliases/CellData.md) = [`CellData`](../type-aliases/CellData.md) + +## Properties + +### accessorFn? + +```ts +optional accessorFn: AccessorFn; +``` + +Defined in: [core/columns/coreColumnsFeature.types.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L15) + +The resolved accessor function to use when extracting the value for the column from each row. Will only be defined if the column def has a valid accessor key or function defined. + +*** + +### columnDef + +```ts +columnDef: ColumnDef; +``` + +Defined in: [core/columns/coreColumnsFeature.types.ts:19](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L19) + +The original column def used to create the column. + +*** + +### columns + +```ts +columns: Column[]; +``` + +Defined in: [core/columns/coreColumnsFeature.types.ts:23](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L23) + +The child column (if the column is a group column). Will be an empty array if the column is not a group column. + +*** + +### depth + +```ts +depth: number; +``` + +Defined in: [core/columns/coreColumnsFeature.types.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L27) + +The depth of the column (if grouped) relative to the root column def array. + +*** + +### id + +```ts +id: string; +``` + +Defined in: [core/columns/coreColumnsFeature.types.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L34) + +The resolved unique identifier for the column resolved in this priority: + - A manual `id` property from the column def + - The accessor key from the column def + - The header string from the column def + +*** + +### parent? + +```ts +optional parent: Column; +``` + +Defined in: [core/columns/coreColumnsFeature.types.ts:38](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L38) + +The parent column for this column. Will be undefined if this is a root column. + +*** + +### table + +```ts +table: Table_Internal; +``` + +Defined in: [core/columns/coreColumnsFeature.types.ts:42](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L42) + +Reference to the parent table instance. diff --git a/docs/reference/interfaces/Column_GlobalFiltering.md b/docs/reference/interfaces/Column_GlobalFiltering.md new file mode 100644 index 0000000000..2f0e9d98b7 --- /dev/null +++ b/docs/reference/interfaces/Column_GlobalFiltering.md @@ -0,0 +1,24 @@ +--- +id: Column_GlobalFiltering +title: Column_GlobalFiltering +--- + +# Interface: Column\_GlobalFiltering + +Defined in: [features/global-filtering/globalFilteringFeature.types.ts:25](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L25) + +## Properties + +### getCanGlobalFilter() + +```ts +getCanGlobalFilter: () => boolean; +``` + +Defined in: [features/global-filtering/globalFilteringFeature.types.ts:29](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L29) + +Returns whether or not the column can be **globally** filtered. Set to `false` to disable a column from being scanned during global filtering. + +#### Returns + +`boolean` diff --git a/docs/reference/interfaces/Column_Plugins.md b/docs/reference/interfaces/Column_Plugins.md new file mode 100644 index 0000000000..1034f8f551 --- /dev/null +++ b/docs/reference/interfaces/Column_Plugins.md @@ -0,0 +1,25 @@ +--- +id: Column_Plugins +title: Column_Plugins +--- + +# Interface: Column\_Plugins\ + +Defined in: [types/Column.ts:20](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Column.ts#L20) + +Use this interface as a target for declaration merging to add your own plugin properties. +Note: This will affect the types of all tables in your project. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` = `unknown` diff --git a/docs/reference/interfaces/Column_RowSorting.md b/docs/reference/interfaces/Column_RowSorting.md new file mode 100644 index 0000000000..52460eb9af --- /dev/null +++ b/docs/reference/interfaces/Column_RowSorting.md @@ -0,0 +1,220 @@ +--- +id: Column_RowSorting +title: Column_RowSorting +--- + +# Interface: Column\_RowSorting\ + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:89](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L89) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### clearSorting() + +```ts +clearSorting: () => void; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:96](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L96) + +Removes this column from the table's sorting state + +#### Returns + +`void` + +*** + +### getAutoSortDir() + +```ts +getAutoSortDir: () => SortDirection; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:100](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L100) + +Returns a sort direction automatically inferred based on the columns values. + +#### Returns + +[`SortDirection`](../type-aliases/SortDirection.md) + +*** + +### getAutoSortFn() + +```ts +getAutoSortFn: () => SortFn; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:104](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L104) + +Returns a sorting function automatically inferred based on the columns values. + +#### Returns + +[`SortFn`](SortFn.md)\<`TFeatures`, `TData`\> + +*** + +### getCanMultiSort() + +```ts +getCanMultiSort: () => boolean; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:108](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L108) + +Returns whether this column can be multi-sorted. + +#### Returns + +`boolean` + +*** + +### getCanSort() + +```ts +getCanSort: () => boolean; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:112](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L112) + +Returns whether this column can be sorted. + +#### Returns + +`boolean` + +*** + +### getFirstSortDir() + +```ts +getFirstSortDir: () => SortDirection; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:116](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L116) + +Returns the first direction that should be used when sorting this column. + +#### Returns + +[`SortDirection`](../type-aliases/SortDirection.md) + +*** + +### getIsSorted() + +```ts +getIsSorted: () => false | SortDirection; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:120](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L120) + +Returns the current sort direction of this column. + +#### Returns + +`false` \| [`SortDirection`](../type-aliases/SortDirection.md) + +*** + +### getNextSortingOrder() + +```ts +getNextSortingOrder: () => false | SortDirection; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:124](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L124) + +Returns the next sorting order. + +#### Returns + +`false` \| [`SortDirection`](../type-aliases/SortDirection.md) + +*** + +### getSortFn() + +```ts +getSortFn: () => SortFn; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:132](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L132) + +Returns the resolved sorting function to be used for this column + +#### Returns + +[`SortFn`](SortFn.md)\<`TFeatures`, `TData`\> + +*** + +### getSortIndex() + +```ts +getSortIndex: () => number; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:128](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L128) + +Returns the index position of this column's sorting within the sorting state + +#### Returns + +`number` + +*** + +### getToggleSortingHandler() + +```ts +getToggleSortingHandler: () => (event) => void | undefined; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:136](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L136) + +Returns a function that can be used to toggle this column's sorting state. This is useful for attaching a click handler to the column header. + +#### Returns + +(`event`) => `void` \| `undefined` + +*** + +### toggleSorting() + +```ts +toggleSorting: (desc?, isMulti?) => void; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:140](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L140) + +Toggles this columns sorting state. If `desc` is provided, it will force the sort direction to that value. If `isMulti` is provided, it will additivity multi-sort the column (or toggle it if it is already sorted). + +#### Parameters + +##### desc? + +`boolean` + +##### isMulti? + +`boolean` + +#### Returns + +`void` diff --git a/docs/reference/interfaces/CoreFeatures.md b/docs/reference/interfaces/CoreFeatures.md new file mode 100644 index 0000000000..1491971a10 --- /dev/null +++ b/docs/reference/interfaces/CoreFeatures.md @@ -0,0 +1,68 @@ +--- +id: CoreFeatures +title: CoreFeatures +--- + +# Interface: CoreFeatures + +Defined in: [core/coreFeatures.ts:8](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/coreFeatures.ts#L8) + +## Properties + +### coreCellsFeature + +```ts +coreCellsFeature: TableFeature>; +``` + +Defined in: [core/coreFeatures.ts:9](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/coreFeatures.ts#L9) + +*** + +### coreColumnsFeature + +```ts +coreColumnsFeature: TableFeature>; +``` + +Defined in: [core/coreFeatures.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/coreFeatures.ts#L10) + +*** + +### coreHeadersFeature + +```ts +coreHeadersFeature: TableFeature>; +``` + +Defined in: [core/coreFeatures.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/coreFeatures.ts#L11) + +*** + +### coreRowModelsFeature + +```ts +coreRowModelsFeature: TableFeature>; +``` + +Defined in: [core/coreFeatures.ts:12](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/coreFeatures.ts#L12) + +*** + +### coreRowsFeature + +```ts +coreRowsFeature: TableFeature>; +``` + +Defined in: [core/coreFeatures.ts:13](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/coreFeatures.ts#L13) + +*** + +### coreTablesFeature + +```ts +coreTablesFeature: TableFeature>; +``` + +Defined in: [core/coreFeatures.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/coreFeatures.ts#L14) diff --git a/docs/reference/interfaces/CreateRowModel_Core.md b/docs/reference/interfaces/CreateRowModel_Core.md new file mode 100644 index 0000000000..0d1fae943c --- /dev/null +++ b/docs/reference/interfaces/CreateRowModel_Core.md @@ -0,0 +1,50 @@ +--- +id: CreateRowModel_Core +title: CreateRowModel_Core +--- + +# Interface: CreateRowModel\_Core\ + +Defined in: [core/row-models/coreRowModelsFeature.types.ts:23](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.types.ts#L23) + +## Extends + +- [`CreateRowModel_Plugins`](CreateRowModel_Plugins.md) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### coreRowModel()? + +```ts +optional coreRowModel: (table) => () => RowModel; +``` + +Defined in: [core/row-models/coreRowModelsFeature.types.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.types.ts#L30) + +This required option is a factory for a function that computes and returns the core row model for the table. + +#### Parameters + +##### table + +[`Table`](../type-aliases/Table.md)\<`TFeatures`, `TData`\> + +#### Returns + +```ts +(): RowModel; +``` + +##### Returns + +[`RowModel`](RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/interfaces/CreateRowModel_Expanded.md b/docs/reference/interfaces/CreateRowModel_Expanded.md new file mode 100644 index 0000000000..727b7f8894 --- /dev/null +++ b/docs/reference/interfaces/CreateRowModel_Expanded.md @@ -0,0 +1,46 @@ +--- +id: CreateRowModel_Expanded +title: CreateRowModel_Expanded +--- + +# Interface: CreateRowModel\_Expanded\ + +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:124](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L124) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### expandedRowModel()? + +```ts +optional expandedRowModel: (table) => () => RowModel; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:131](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L131) + +This function is responsible for returning the expanded row model. If this function is not provided, the table will not expand rows. You can use the default exported `getExpandedRowModel` function to get the expanded row model or implement your own. + +#### Parameters + +##### table + +[`Table`](../type-aliases/Table.md)\<`TFeatures`, `TData`\> + +#### Returns + +```ts +(): RowModel; +``` + +##### Returns + +[`RowModel`](RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/interfaces/CreateRowModel_Faceted.md b/docs/reference/interfaces/CreateRowModel_Faceted.md new file mode 100644 index 0000000000..a9f1bef027 --- /dev/null +++ b/docs/reference/interfaces/CreateRowModel_Faceted.md @@ -0,0 +1,114 @@ +--- +id: CreateRowModel_Faceted +title: CreateRowModel_Faceted +--- + +# Interface: CreateRowModel\_Faceted\ + +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:45](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L45) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### facetedMinMaxValues()? + +```ts +optional facetedMinMaxValues: (table, columnId) => () => [number, number] | undefined; +``` + +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:52](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L52) + +This function is used to retrieve the faceted min/max values. If using server-side faceting, this function is not required. To use client-side faceting, pass the exported `getFacetedMinMaxValues()` from your adapter to your table or implement your own. + +#### Parameters + +##### table + +[`Table`](../type-aliases/Table.md)\<`TFeatures`, `TData`\> + +##### columnId + +`string` + +#### Returns + +```ts +(): [number, number] | undefined; +``` + +##### Returns + +\[`number`, `number`\] \| `undefined` + +*** + +### facetedRowModel()? + +```ts +optional facetedRowModel: (table, columnId) => () => RowModel; +``` + +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:59](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L59) + +This function is used to retrieve the faceted row model. If using server-side faceting, this function is not required. To use client-side faceting, pass the exported `getFacetedRowModel()` from your adapter to your table or implement your own. + +#### Parameters + +##### table + +[`Table`](../type-aliases/Table.md)\<`TFeatures`, `TData`\> + +##### columnId + +`string` + +#### Returns + +```ts +(): RowModel; +``` + +##### Returns + +[`RowModel`](RowModel.md)\<`TFeatures`, `TData`\> + +*** + +### facetedUniqueValues()? + +```ts +optional facetedUniqueValues: (table, columnId) => () => Map; +``` + +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:66](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L66) + +This function is used to retrieve the faceted unique values. If using server-side faceting, this function is not required. To use client-side faceting, pass the exported `getFacetedUniqueValues()` from your adapter to your table or implement your own. + +#### Parameters + +##### table + +[`Table`](../type-aliases/Table.md)\<`TFeatures`, `TData`\> + +##### columnId + +`string` + +#### Returns + +```ts +(): Map; +``` + +##### Returns + +`Map`\<`any`, `number`\> diff --git a/docs/reference/interfaces/CreateRowModel_Filtered.md b/docs/reference/interfaces/CreateRowModel_Filtered.md new file mode 100644 index 0000000000..f7de330af1 --- /dev/null +++ b/docs/reference/interfaces/CreateRowModel_Filtered.md @@ -0,0 +1,48 @@ +--- +id: CreateRowModel_Filtered +title: CreateRowModel_Filtered +--- + +# Interface: CreateRowModel\_Filtered\ + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:200](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L200) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### filteredRowModel()? + +```ts +optional filteredRowModel: (table) => () => RowModel; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:209](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L209) + +If provided, this function is called **once** per table and should return a **new function** which will calculate and return the row model for the table when it's filtered. +- For server-side filtering, this function is unnecessary and can be ignored since the server should already return the filtered row model. +- For client-side filtering, this function is required. A default implementation is provided via any table adapter's `{ getFilteredRowModel }` export. + +#### Parameters + +##### table + +[`Table`](../type-aliases/Table.md)\<`TFeatures`, `TData`\> + +#### Returns + +```ts +(): RowModel; +``` + +##### Returns + +[`RowModel`](RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/interfaces/CreateRowModel_Grouped.md b/docs/reference/interfaces/CreateRowModel_Grouped.md new file mode 100644 index 0000000000..294cb33fa0 --- /dev/null +++ b/docs/reference/interfaces/CreateRowModel_Grouped.md @@ -0,0 +1,46 @@ +--- +id: CreateRowModel_Grouped +title: CreateRowModel_Grouped +--- + +# Interface: CreateRowModel\_Grouped\ + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:201](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L201) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### groupedRowModel()? + +```ts +optional groupedRowModel: (table) => () => RowModel; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:208](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L208) + +Returns the row model after grouping has taken place, but no further. + +#### Parameters + +##### table + +[`Table`](../type-aliases/Table.md)\<`TFeatures`, `TData`\> + +#### Returns + +```ts +(): RowModel; +``` + +##### Returns + +[`RowModel`](RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/interfaces/CreateRowModel_Paginated.md b/docs/reference/interfaces/CreateRowModel_Paginated.md new file mode 100644 index 0000000000..7a71b9d7f6 --- /dev/null +++ b/docs/reference/interfaces/CreateRowModel_Paginated.md @@ -0,0 +1,47 @@ +--- +id: CreateRowModel_Paginated +title: CreateRowModel_Paginated +--- + +# Interface: CreateRowModel\_Paginated\ + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:123](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L123) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### paginatedRowModel()? + +```ts +optional paginatedRowModel: (table) => () => RowModel; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:131](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L131) + +Returns the row model after pagination has taken place, but no further. +Pagination columns are automatically reordered by default to the start of the columns list. If you would rather remove them or leave them as-is, set the appropriate mode here. + +#### Parameters + +##### table + +[`Table`](../type-aliases/Table.md)\<`TFeatures`, `TData`\> + +#### Returns + +```ts +(): RowModel; +``` + +##### Returns + +[`RowModel`](RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/interfaces/CreateRowModel_Plugins.md b/docs/reference/interfaces/CreateRowModel_Plugins.md new file mode 100644 index 0000000000..d548153f1b --- /dev/null +++ b/docs/reference/interfaces/CreateRowModel_Plugins.md @@ -0,0 +1,12 @@ +--- +id: CreateRowModel_Plugins +title: CreateRowModel_Plugins +--- + +# Interface: CreateRowModel\_Plugins + +Defined in: [core/row-models/coreRowModelsFeature.types.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.types.ts#L21) + +## Extended by + +- [`CreateRowModel_Core`](CreateRowModel_Core.md) diff --git a/docs/reference/interfaces/CreateRowModel_Sorted.md b/docs/reference/interfaces/CreateRowModel_Sorted.md new file mode 100644 index 0000000000..49e2047721 --- /dev/null +++ b/docs/reference/interfaces/CreateRowModel_Sorted.md @@ -0,0 +1,46 @@ +--- +id: CreateRowModel_Sorted +title: CreateRowModel_Sorted +--- + +# Interface: CreateRowModel\_Sorted\ + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:212](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L212) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### sortedRowModel()? + +```ts +optional sortedRowModel: (table) => () => RowModel; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:219](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L219) + +This function is used to retrieve the sorted row model. If using server-side sorting, this function is not required. To use client-side sorting, pass the exported `getSortedRowModel()` from your adapter to your table or implement your own. + +#### Parameters + +##### table + +[`Table`](../type-aliases/Table.md)\<`TFeatures`, `TData`\> + +#### Returns + +```ts +(): RowModel; +``` + +##### Returns + +[`RowModel`](RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/interfaces/CreateRowModels_Plugins.md b/docs/reference/interfaces/CreateRowModels_Plugins.md new file mode 100644 index 0000000000..6604e4bdfa --- /dev/null +++ b/docs/reference/interfaces/CreateRowModels_Plugins.md @@ -0,0 +1,21 @@ +--- +id: CreateRowModels_Plugins +title: CreateRowModels_Plugins +--- + +# Interface: CreateRowModels\_Plugins\ + +Defined in: [types/RowModel.ts:37](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/RowModel.ts#L37) + +Use this interface as a target for declaration merging to add your own plugin properties. +Note: This will affect the types of all tables in your project. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) diff --git a/docs/reference/interfaces/FilterFn.md b/docs/reference/interfaces/FilterFn.md new file mode 100644 index 0000000000..3bfeb7a15f --- /dev/null +++ b/docs/reference/interfaces/FilterFn.md @@ -0,0 +1,70 @@ +--- +id: FilterFn +title: FilterFn +--- + +# Interface: FilterFn()\ + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:45](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L45) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +```ts +FilterFn( + row, + columnId, + filterValue, + addMeta?): boolean; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:49](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L49) + +## Parameters + +### row + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +### columnId + +`string` + +### filterValue + +`any` + +### addMeta? + +(`meta`) => `void` + +## Returns + +`boolean` + +## Properties + +### autoRemove? + +```ts +optional autoRemove: ColumnFilterAutoRemoveTestFn; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:55](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L55) + +*** + +### resolveFilterValue? + +```ts +optional resolveFilterValue: TransformFilterValueFn; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:56](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L56) diff --git a/docs/reference/interfaces/FilterFns.md b/docs/reference/interfaces/FilterFns.md new file mode 100644 index 0000000000..48e1d51a89 --- /dev/null +++ b/docs/reference/interfaces/FilterFns.md @@ -0,0 +1,8 @@ +--- +id: FilterFns +title: FilterFns +--- + +# Interface: FilterFns + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:16](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L16) diff --git a/docs/reference/interfaces/FilterMeta.md b/docs/reference/interfaces/FilterMeta.md new file mode 100644 index 0000000000..75b2577be3 --- /dev/null +++ b/docs/reference/interfaces/FilterMeta.md @@ -0,0 +1,8 @@ +--- +id: FilterMeta +title: FilterMeta +--- + +# Interface: FilterMeta + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L14) diff --git a/docs/reference/interfaces/HeaderContext.md b/docs/reference/interfaces/HeaderContext.md new file mode 100644 index 0000000000..20f0236561 --- /dev/null +++ b/docs/reference/interfaces/HeaderContext.md @@ -0,0 +1,58 @@ +--- +id: HeaderContext +title: HeaderContext +--- + +# Interface: HeaderContext\ + +Defined in: [core/headers/coreHeadersFeature.types.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L30) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](../type-aliases/CellData.md) = [`CellData`](../type-aliases/CellData.md) + +## Properties + +### column + +```ts +column: Column; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:38](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L38) + +An instance of a column. + +*** + +### header + +```ts +header: Header; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:42](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L42) + +An instance of a header. + +*** + +### table + +```ts +table: Table; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:46](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L46) + +The table instance. diff --git a/docs/reference/interfaces/HeaderGroup_Core.md b/docs/reference/interfaces/HeaderGroup_Core.md new file mode 100644 index 0000000000..99cf395801 --- /dev/null +++ b/docs/reference/interfaces/HeaderGroup_Core.md @@ -0,0 +1,64 @@ +--- +id: HeaderGroup_Core +title: HeaderGroup_Core +--- + +# Interface: HeaderGroup\_Core\ + +Defined in: [types/HeaderGroup.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/HeaderGroup.ts#L14) + +## Extends + +- [`HeaderGroup_Header`](HeaderGroup_Header.md)\<`TFeatures`, `TData`\> + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### depth + +```ts +depth: number; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:120](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L120) + +#### Inherited from + +[`HeaderGroup_Header`](HeaderGroup_Header.md).[`depth`](HeaderGroup_Header.md#depth) + +*** + +### headers + +```ts +headers: Header[]; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:121](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L121) + +#### Inherited from + +[`HeaderGroup_Header`](HeaderGroup_Header.md).[`headers`](HeaderGroup_Header.md#headers) + +*** + +### id + +```ts +id: string; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:122](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L122) + +#### Inherited from + +[`HeaderGroup_Header`](HeaderGroup_Header.md).[`id`](HeaderGroup_Header.md#id) diff --git a/docs/reference/interfaces/HeaderGroup_Header.md b/docs/reference/interfaces/HeaderGroup_Header.md new file mode 100644 index 0000000000..5bd51a846d --- /dev/null +++ b/docs/reference/interfaces/HeaderGroup_Header.md @@ -0,0 +1,56 @@ +--- +id: HeaderGroup_Header +title: HeaderGroup_Header +--- + +# Interface: HeaderGroup\_Header\ + +Defined in: [core/headers/coreHeadersFeature.types.ts:115](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L115) + +## Extended by + +- [`HeaderGroup_Core`](HeaderGroup_Core.md) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](../type-aliases/CellData.md) = [`CellData`](../type-aliases/CellData.md) + +## Properties + +### depth + +```ts +depth: number; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:120](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L120) + +*** + +### headers + +```ts +headers: Header[]; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:121](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L121) + +*** + +### id + +```ts +id: string; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:122](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L122) diff --git a/docs/reference/interfaces/HeaderGroup_Plugins.md b/docs/reference/interfaces/HeaderGroup_Plugins.md new file mode 100644 index 0000000000..0852efdc72 --- /dev/null +++ b/docs/reference/interfaces/HeaderGroup_Plugins.md @@ -0,0 +1,21 @@ +--- +id: HeaderGroup_Plugins +title: HeaderGroup_Plugins +--- + +# Interface: HeaderGroup\_Plugins\ + +Defined in: [types/HeaderGroup.ts:9](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/HeaderGroup.ts#L9) + +Use this interface as a target for declaration merging to add your own plugin properties. +Note: This will affect the types of all tables in your project. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) diff --git a/docs/reference/interfaces/Header_ColumnResizing.md b/docs/reference/interfaces/Header_ColumnResizing.md new file mode 100644 index 0000000000..4ab017b240 --- /dev/null +++ b/docs/reference/interfaces/Header_ColumnResizing.md @@ -0,0 +1,45 @@ +--- +id: Header_ColumnResizing +title: Header_ColumnResizing +--- + +# Interface: Header\_ColumnResizing + +Defined in: [features/column-resizing/columnResizingFeature.types.ts:73](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L73) + +## Properties + +### getResizeHandler() + +```ts +getResizeHandler: (context?) => (event) => void; +``` + +Defined in: [features/column-resizing/columnResizingFeature.types.ts:80](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L80) + +Returns an event handler function that can be used to resize the header. It can be used as an: +- `onMouseDown` handler +- `onTouchStart` handler +The dragging and release events are automatically handled for you. + +#### Parameters + +##### context? + +`Document` + +#### Returns + +```ts +(event): void; +``` + +##### Parameters + +###### event + +`unknown` + +##### Returns + +`void` diff --git a/docs/reference/interfaces/Header_ColumnSizing.md b/docs/reference/interfaces/Header_ColumnSizing.md new file mode 100644 index 0000000000..d47d6cb662 --- /dev/null +++ b/docs/reference/interfaces/Header_ColumnSizing.md @@ -0,0 +1,46 @@ +--- +id: Header_ColumnSizing +title: Header_ColumnSizing +--- + +# Interface: Header\_ColumnSizing + +Defined in: [features/column-sizing/columnSizingFeature.types.ts:83](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L83) + +## Properties + +### getSize() + +```ts +getSize: () => number; +``` + +Defined in: [features/column-sizing/columnSizingFeature.types.ts:87](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L87) + +Returns the current size of the header. + +#### Returns + +`number` + +*** + +### getStart() + +```ts +getStart: (position?) => number; +``` + +Defined in: [features/column-sizing/columnSizingFeature.types.ts:91](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L91) + +Returns the offset measurement along the row-axis (usually the x-axis for standard tables) for the header. This is effectively a sum of the offset measurements of all preceding headers. + +#### Parameters + +##### position? + +[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) + +#### Returns + +`number` diff --git a/docs/reference/interfaces/Header_Core.md b/docs/reference/interfaces/Header_Core.md new file mode 100644 index 0000000000..fd4980f9ba --- /dev/null +++ b/docs/reference/interfaces/Header_Core.md @@ -0,0 +1,244 @@ +--- +id: Header_Core +title: Header_Core +--- + +# Interface: Header\_Core\ + +Defined in: [types/Header.ts:17](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Header.ts#L17) + +## Extends + +- [`Header_Header`](Header_Header.md)\<`TFeatures`, `TData`, `TValue`\> + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](../type-aliases/CellData.md) = [`CellData`](../type-aliases/CellData.md) + +## Properties + +### colSpan + +```ts +colSpan: number; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L57) + +The col-span for the header. + +#### Inherited from + +[`Header_Header`](Header_Header.md).[`colSpan`](Header_Header.md#colspan) + +*** + +### column + +```ts +column: Column; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:61](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L61) + +The header's associated column object. + +#### Inherited from + +[`Header_Header`](Header_Header.md).[`column`](Header_Header.md#column) + +*** + +### depth + +```ts +depth: number; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:65](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L65) + +The depth of the header, zero-indexed based. + +#### Inherited from + +[`Header_Header`](Header_Header.md).[`depth`](Header_Header.md#depth) + +*** + +### getContext() + +```ts +getContext: () => HeaderContext; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:108](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L108) + +Returns the rendering context (or props) for column-based components like headers, footers and filters. + +#### Returns + +[`HeaderContext`](HeaderContext.md)\<`TFeatures`, `TData`, `TValue`\> + +#### Inherited from + +[`Header_Header`](Header_Header.md).[`getContext`](Header_Header.md#getcontext) + +*** + +### getLeafHeaders() + +```ts +getLeafHeaders: () => Header[]; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:112](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L112) + +Returns the leaf headers hierarchically nested under this header. + +#### Returns + +[`Header`](../type-aliases/Header.md)\<`TFeatures`, `TData`, `TValue`\>[] + +#### Inherited from + +[`Header_Header`](Header_Header.md).[`getLeafHeaders`](Header_Header.md#getleafheaders) + +*** + +### headerGroup + +```ts +headerGroup: + | HeaderGroup + | null; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:69](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L69) + +The header's associated header group object. + +#### Inherited from + +[`Header_Header`](Header_Header.md).[`headerGroup`](Header_Header.md#headergroup) + +*** + +### id + +```ts +id: string; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:73](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L73) + +The unique identifier for the header. + +#### Inherited from + +[`Header_Header`](Header_Header.md).[`id`](Header_Header.md#id) + +*** + +### index + +```ts +index: number; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:77](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L77) + +The index for the header within the header group. + +#### Inherited from + +[`Header_Header`](Header_Header.md).[`index`](Header_Header.md#index) + +*** + +### isPlaceholder + +```ts +isPlaceholder: boolean; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:81](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L81) + +A boolean denoting if the header is a placeholder header. + +#### Inherited from + +[`Header_Header`](Header_Header.md).[`isPlaceholder`](Header_Header.md#isplaceholder) + +*** + +### placeholderId? + +```ts +optional placeholderId: string; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:85](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L85) + +If the header is a placeholder header, this will be a unique header ID that does not conflict with any other headers across the table. + +#### Inherited from + +[`Header_Header`](Header_Header.md).[`placeholderId`](Header_Header.md#placeholderid) + +*** + +### rowSpan + +```ts +rowSpan: number; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:89](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L89) + +The row-span for the header. + +#### Inherited from + +[`Header_Header`](Header_Header.md).[`rowSpan`](Header_Header.md#rowspan) + +*** + +### subHeaders + +```ts +subHeaders: Header[]; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:93](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L93) + +The header's hierarchical sub/child headers. Will be empty if the header's associated column is a leaf-column. + +#### Inherited from + +[`Header_Header`](Header_Header.md).[`subHeaders`](Header_Header.md#subheaders) + +*** + +### table + +```ts +table: Table; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:97](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L97) + +Reference to the parent table instance. + +#### Inherited from + +[`Header_Header`](Header_Header.md).[`table`](Header_Header.md#table) diff --git a/docs/reference/interfaces/Header_CoreProperties.md b/docs/reference/interfaces/Header_CoreProperties.md new file mode 100644 index 0000000000..c9510471c6 --- /dev/null +++ b/docs/reference/interfaces/Header_CoreProperties.md @@ -0,0 +1,160 @@ +--- +id: Header_CoreProperties +title: Header_CoreProperties +--- + +# Interface: Header\_CoreProperties\ + +Defined in: [core/headers/coreHeadersFeature.types.ts:49](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L49) + +## Extended by + +- [`Header_Header`](Header_Header.md) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](../type-aliases/CellData.md) = [`CellData`](../type-aliases/CellData.md) + +## Properties + +### colSpan + +```ts +colSpan: number; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L57) + +The col-span for the header. + +*** + +### column + +```ts +column: Column; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:61](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L61) + +The header's associated column object. + +*** + +### depth + +```ts +depth: number; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:65](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L65) + +The depth of the header, zero-indexed based. + +*** + +### headerGroup + +```ts +headerGroup: + | HeaderGroup + | null; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:69](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L69) + +The header's associated header group object. + +*** + +### id + +```ts +id: string; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:73](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L73) + +The unique identifier for the header. + +*** + +### index + +```ts +index: number; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:77](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L77) + +The index for the header within the header group. + +*** + +### isPlaceholder + +```ts +isPlaceholder: boolean; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:81](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L81) + +A boolean denoting if the header is a placeholder header. + +*** + +### placeholderId? + +```ts +optional placeholderId: string; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:85](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L85) + +If the header is a placeholder header, this will be a unique header ID that does not conflict with any other headers across the table. + +*** + +### rowSpan + +```ts +rowSpan: number; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:89](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L89) + +The row-span for the header. + +*** + +### subHeaders + +```ts +subHeaders: Header[]; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:93](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L93) + +The header's hierarchical sub/child headers. Will be empty if the header's associated column is a leaf-column. + +*** + +### table + +```ts +table: Table; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:97](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L97) + +Reference to the parent table instance. diff --git a/docs/reference/interfaces/Header_Header.md b/docs/reference/interfaces/Header_Header.md new file mode 100644 index 0000000000..ce794fb2bb --- /dev/null +++ b/docs/reference/interfaces/Header_Header.md @@ -0,0 +1,240 @@ +--- +id: Header_Header +title: Header_Header +--- + +# Interface: Header\_Header\ + +Defined in: [core/headers/coreHeadersFeature.types.ts:100](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L100) + +## Extends + +- [`Header_CoreProperties`](Header_CoreProperties.md)\<`TFeatures`, `TData`, `TValue`\> + +## Extended by + +- [`Header_Core`](Header_Core.md) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](../type-aliases/CellData.md) = [`CellData`](../type-aliases/CellData.md) + +## Properties + +### colSpan + +```ts +colSpan: number; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L57) + +The col-span for the header. + +#### Inherited from + +[`Header_CoreProperties`](Header_CoreProperties.md).[`colSpan`](Header_CoreProperties.md#colspan) + +*** + +### column + +```ts +column: Column; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:61](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L61) + +The header's associated column object. + +#### Inherited from + +[`Header_CoreProperties`](Header_CoreProperties.md).[`column`](Header_CoreProperties.md#column) + +*** + +### depth + +```ts +depth: number; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:65](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L65) + +The depth of the header, zero-indexed based. + +#### Inherited from + +[`Header_CoreProperties`](Header_CoreProperties.md).[`depth`](Header_CoreProperties.md#depth) + +*** + +### getContext() + +```ts +getContext: () => HeaderContext; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:108](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L108) + +Returns the rendering context (or props) for column-based components like headers, footers and filters. + +#### Returns + +[`HeaderContext`](HeaderContext.md)\<`TFeatures`, `TData`, `TValue`\> + +*** + +### getLeafHeaders() + +```ts +getLeafHeaders: () => Header[]; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:112](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L112) + +Returns the leaf headers hierarchically nested under this header. + +#### Returns + +[`Header`](../type-aliases/Header.md)\<`TFeatures`, `TData`, `TValue`\>[] + +*** + +### headerGroup + +```ts +headerGroup: + | HeaderGroup + | null; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:69](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L69) + +The header's associated header group object. + +#### Inherited from + +[`Header_CoreProperties`](Header_CoreProperties.md).[`headerGroup`](Header_CoreProperties.md#headergroup) + +*** + +### id + +```ts +id: string; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:73](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L73) + +The unique identifier for the header. + +#### Inherited from + +[`Header_CoreProperties`](Header_CoreProperties.md).[`id`](Header_CoreProperties.md#id) + +*** + +### index + +```ts +index: number; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:77](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L77) + +The index for the header within the header group. + +#### Inherited from + +[`Header_CoreProperties`](Header_CoreProperties.md).[`index`](Header_CoreProperties.md#index) + +*** + +### isPlaceholder + +```ts +isPlaceholder: boolean; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:81](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L81) + +A boolean denoting if the header is a placeholder header. + +#### Inherited from + +[`Header_CoreProperties`](Header_CoreProperties.md).[`isPlaceholder`](Header_CoreProperties.md#isplaceholder) + +*** + +### placeholderId? + +```ts +optional placeholderId: string; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:85](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L85) + +If the header is a placeholder header, this will be a unique header ID that does not conflict with any other headers across the table. + +#### Inherited from + +[`Header_CoreProperties`](Header_CoreProperties.md).[`placeholderId`](Header_CoreProperties.md#placeholderid) + +*** + +### rowSpan + +```ts +rowSpan: number; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:89](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L89) + +The row-span for the header. + +#### Inherited from + +[`Header_CoreProperties`](Header_CoreProperties.md).[`rowSpan`](Header_CoreProperties.md#rowspan) + +*** + +### subHeaders + +```ts +subHeaders: Header[]; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:93](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L93) + +The header's hierarchical sub/child headers. Will be empty if the header's associated column is a leaf-column. + +#### Inherited from + +[`Header_CoreProperties`](Header_CoreProperties.md).[`subHeaders`](Header_CoreProperties.md#subheaders) + +*** + +### table + +```ts +table: Table; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:97](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L97) + +Reference to the parent table instance. + +#### Inherited from + +[`Header_CoreProperties`](Header_CoreProperties.md).[`table`](Header_CoreProperties.md#table) diff --git a/docs/reference/interfaces/Header_Plugins.md b/docs/reference/interfaces/Header_Plugins.md new file mode 100644 index 0000000000..c1e09c4777 --- /dev/null +++ b/docs/reference/interfaces/Header_Plugins.md @@ -0,0 +1,25 @@ +--- +id: Header_Plugins +title: Header_Plugins +--- + +# Interface: Header\_Plugins\ + +Defined in: [types/Header.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Header.ts#L11) + +Use this interface as a target for declaration merging to add your own plugin properties. +Note: This will affect the types of all tables in your project. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](../type-aliases/CellData.md) = [`CellData`](../type-aliases/CellData.md) diff --git a/docs/reference/interfaces/IdIdentifier.md b/docs/reference/interfaces/IdIdentifier.md new file mode 100644 index 0000000000..49bb4140c3 --- /dev/null +++ b/docs/reference/interfaces/IdIdentifier.md @@ -0,0 +1,42 @@ +--- +id: IdIdentifier +title: IdIdentifier +--- + +# Interface: IdIdentifier\ + +Defined in: [types/ColumnDef.ts:50](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L50) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](../type-aliases/CellData.md) = [`CellData`](../type-aliases/CellData.md) + +## Properties + +### header? + +```ts +optional header: ColumnDefTemplate>; +``` + +Defined in: [types/ColumnDef.ts:56](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L56) + +*** + +### id + +```ts +id: string; +``` + +Defined in: [types/ColumnDef.ts:55](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L55) diff --git a/docs/reference/interfaces/PaginationDefaultOptions.md b/docs/reference/interfaces/PaginationDefaultOptions.md new file mode 100644 index 0000000000..8cd73c9c07 --- /dev/null +++ b/docs/reference/interfaces/PaginationDefaultOptions.md @@ -0,0 +1,18 @@ +--- +id: PaginationDefaultOptions +title: PaginationDefaultOptions +--- + +# Interface: PaginationDefaultOptions + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:38](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L38) + +## Properties + +### onPaginationChange + +```ts +onPaginationChange: OnChangeFn; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:39](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L39) diff --git a/docs/reference/interfaces/PaginationState.md b/docs/reference/interfaces/PaginationState.md new file mode 100644 index 0000000000..9b07030209 --- /dev/null +++ b/docs/reference/interfaces/PaginationState.md @@ -0,0 +1,28 @@ +--- +id: PaginationState +title: PaginationState +--- + +# Interface: PaginationState + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:6](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L6) + +## Properties + +### pageIndex + +```ts +pageIndex: number; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:7](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L7) + +*** + +### pageSize + +```ts +pageSize: number; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:8](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L8) diff --git a/docs/reference/interfaces/Plugins.md b/docs/reference/interfaces/Plugins.md new file mode 100644 index 0000000000..a923a8a653 --- /dev/null +++ b/docs/reference/interfaces/Plugins.md @@ -0,0 +1,8 @@ +--- +id: Plugins +title: Plugins +--- + +# Interface: Plugins + +Defined in: [types/TableFeatures.ts:40](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L40) diff --git a/docs/reference/interfaces/PrototypeAPI.md b/docs/reference/interfaces/PrototypeAPI.md new file mode 100644 index 0000000000..d20ace6d67 --- /dev/null +++ b/docs/reference/interfaces/PrototypeAPI.md @@ -0,0 +1,66 @@ +--- +id: PrototypeAPI +title: PrototypeAPI +--- + +# Interface: PrototypeAPI\ + +Defined in: [utils.ts:322](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L322) + +## Type Parameters + +### TDeps + +`TDeps` *extends* `ReadonlyArray`\<`any`\> + +### TDepArgs + +`TDepArgs` + +## Properties + +### fn() + +```ts +fn: (self, ...args) => any; +``` + +Defined in: [utils.ts:323](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L323) + +#### Parameters + +##### self + +`any` + +##### args + +...`any` + +#### Returns + +`any` + +*** + +### memoDeps()? + +```ts +optional memoDeps: (self, depArgs?) => any[] | undefined; +``` + +Defined in: [utils.ts:324](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L324) + +#### Parameters + +##### self + +`any` + +##### depArgs? + +`any` + +#### Returns + +`any`[] \| `undefined` diff --git a/docs/reference/interfaces/ResolvedColumnFilter.md b/docs/reference/interfaces/ResolvedColumnFilter.md new file mode 100644 index 0000000000..121659ae70 --- /dev/null +++ b/docs/reference/interfaces/ResolvedColumnFilter.md @@ -0,0 +1,48 @@ +--- +id: ResolvedColumnFilter +title: ResolvedColumnFilter +--- + +# Interface: ResolvedColumnFilter\ + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:29](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L29) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### filterFn + +```ts +filterFn: FilterFn; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:33](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L33) + +*** + +### id + +```ts +id: string; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L34) + +*** + +### resolvedValue + +```ts +resolvedValue: unknown; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:35](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L35) diff --git a/docs/reference/interfaces/RowModel.md b/docs/reference/interfaces/RowModel.md new file mode 100644 index 0000000000..299c831f98 --- /dev/null +++ b/docs/reference/interfaces/RowModel.md @@ -0,0 +1,48 @@ +--- +id: RowModel +title: RowModel +--- + +# Interface: RowModel\ + +Defined in: [core/row-models/coreRowModelsFeature.types.ts:12](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.types.ts#L12) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### flatRows + +```ts +flatRows: Row[]; +``` + +Defined in: [core/row-models/coreRowModelsFeature.types.ts:17](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.types.ts#L17) + +*** + +### rows + +```ts +rows: Row[]; +``` + +Defined in: [core/row-models/coreRowModelsFeature.types.ts:16](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.types.ts#L16) + +*** + +### rowsById + +```ts +rowsById: Record>; +``` + +Defined in: [core/row-models/coreRowModelsFeature.types.ts:18](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.types.ts#L18) diff --git a/docs/reference/interfaces/RowModelFns_ColumnFiltering.md b/docs/reference/interfaces/RowModelFns_ColumnFiltering.md new file mode 100644 index 0000000000..e6d142dc70 --- /dev/null +++ b/docs/reference/interfaces/RowModelFns_ColumnFiltering.md @@ -0,0 +1,28 @@ +--- +id: RowModelFns_ColumnFiltering +title: RowModelFns_ColumnFiltering +--- + +# Interface: RowModelFns\_ColumnFiltering\ + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:38](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L38) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### filterFns + +```ts +filterFns: Record>; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:42](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L42) diff --git a/docs/reference/interfaces/RowModelFns_ColumnGrouping.md b/docs/reference/interfaces/RowModelFns_ColumnGrouping.md new file mode 100644 index 0000000000..cf44182b79 --- /dev/null +++ b/docs/reference/interfaces/RowModelFns_ColumnGrouping.md @@ -0,0 +1,28 @@ +--- +id: RowModelFns_ColumnGrouping +title: RowModelFns_ColumnGrouping +--- + +# Interface: RowModelFns\_ColumnGrouping\ + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L21) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### aggregationFns + +```ts +aggregationFns: Record>; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:25](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L25) diff --git a/docs/reference/interfaces/RowModelFns_Core.md b/docs/reference/interfaces/RowModelFns_Core.md new file mode 100644 index 0000000000..61bf61fa25 --- /dev/null +++ b/docs/reference/interfaces/RowModelFns_Core.md @@ -0,0 +1,8 @@ +--- +id: RowModelFns_Core +title: RowModelFns_Core +--- + +# Interface: RowModelFns\_Core + +Defined in: [types/RowModelFns.ts:16](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/RowModelFns.ts#L16) diff --git a/docs/reference/interfaces/RowModelFns_Plugins.md b/docs/reference/interfaces/RowModelFns_Plugins.md new file mode 100644 index 0000000000..ea45a3438f --- /dev/null +++ b/docs/reference/interfaces/RowModelFns_Plugins.md @@ -0,0 +1,21 @@ +--- +id: RowModelFns_Plugins +title: RowModelFns_Plugins +--- + +# Interface: RowModelFns\_Plugins\ + +Defined in: [types/RowModelFns.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/RowModelFns.ts#L11) + +Use this interface as a target for declaration merging to add your own plugin properties. +Note: This will affect the types of all tables in your project. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) diff --git a/docs/reference/interfaces/RowModelFns_RowSorting.md b/docs/reference/interfaces/RowModelFns_RowSorting.md new file mode 100644 index 0000000000..4965e01c44 --- /dev/null +++ b/docs/reference/interfaces/RowModelFns_RowSorting.md @@ -0,0 +1,28 @@ +--- +id: RowModelFns_RowSorting +title: RowModelFns_RowSorting +--- + +# Interface: RowModelFns\_RowSorting\ + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L21) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### sortFns + +```ts +sortFns: Record>; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:25](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L25) diff --git a/docs/reference/interfaces/RowPinningDefaultOptions.md b/docs/reference/interfaces/RowPinningDefaultOptions.md new file mode 100644 index 0000000000..6af186806e --- /dev/null +++ b/docs/reference/interfaces/RowPinningDefaultOptions.md @@ -0,0 +1,18 @@ +--- +id: RowPinningDefaultOptions +title: RowPinningDefaultOptions +--- + +# Interface: RowPinningDefaultOptions + +Defined in: [features/row-pinning/rowPinningFeature.types.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L34) + +## Properties + +### onRowPinningChange + +```ts +onRowPinningChange: OnChangeFn; +``` + +Defined in: [features/row-pinning/rowPinningFeature.types.ts:35](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L35) diff --git a/docs/reference/interfaces/RowPinningState.md b/docs/reference/interfaces/RowPinningState.md new file mode 100644 index 0000000000..05688d6664 --- /dev/null +++ b/docs/reference/interfaces/RowPinningState.md @@ -0,0 +1,28 @@ +--- +id: RowPinningState +title: RowPinningState +--- + +# Interface: RowPinningState + +Defined in: [features/row-pinning/rowPinningFeature.types.ts:7](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L7) + +## Properties + +### bottom + +```ts +bottom: string[]; +``` + +Defined in: [features/row-pinning/rowPinningFeature.types.ts:8](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L8) + +*** + +### top + +```ts +top: string[]; +``` + +Defined in: [features/row-pinning/rowPinningFeature.types.ts:9](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L9) diff --git a/docs/reference/interfaces/Row_ColumnFiltering.md b/docs/reference/interfaces/Row_ColumnFiltering.md new file mode 100644 index 0000000000..8e1e31304b --- /dev/null +++ b/docs/reference/interfaces/Row_ColumnFiltering.md @@ -0,0 +1,42 @@ +--- +id: Row_ColumnFiltering +title: Row_ColumnFiltering +--- + +# Interface: Row\_ColumnFiltering\ + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:129](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L129) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### columnFilters + +```ts +columnFilters: Record; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:136](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L136) + +The column filters map for the row. This object tracks whether a row is passing/failing specific filters by their column ID. + +*** + +### columnFiltersMeta + +```ts +columnFiltersMeta: Record; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:140](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L140) + +The column filters meta map for the row. This object tracks any filter meta for a row as optionally provided during the filtering process. diff --git a/docs/reference/interfaces/Row_ColumnGrouping.md b/docs/reference/interfaces/Row_ColumnGrouping.md new file mode 100644 index 0000000000..b49d60f8ce --- /dev/null +++ b/docs/reference/interfaces/Row_ColumnGrouping.md @@ -0,0 +1,80 @@ +--- +id: Row_ColumnGrouping +title: Row_ColumnGrouping +--- + +# Interface: Row\_ColumnGrouping + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:112](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L112) + +## Properties + +### \_groupingValuesCache + +```ts +_groupingValuesCache: Record; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:113](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L113) + +*** + +### getGroupingValue() + +```ts +getGroupingValue: (columnId) => unknown; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:117](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L117) + +Returns the grouping value for any row and column (including leaf rows). + +#### Parameters + +##### columnId + +`string` + +#### Returns + +`unknown` + +*** + +### getIsGrouped() + +```ts +getIsGrouped: () => boolean; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:121](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L121) + +Returns whether or not the row is currently grouped. + +#### Returns + +`boolean` + +*** + +### groupingColumnId? + +```ts +optional groupingColumnId: string; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:125](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L125) + +If this row is grouped, this is the id of the column that this row is grouped by. + +*** + +### groupingValue? + +```ts +optional groupingValue: unknown; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:129](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L129) + +If this row is grouped, this is the unique/shared value for the `groupingColumnId` for all of the rows in this group. diff --git a/docs/reference/interfaces/Row_ColumnPinning.md b/docs/reference/interfaces/Row_ColumnPinning.md new file mode 100644 index 0000000000..158bbfc663 --- /dev/null +++ b/docs/reference/interfaces/Row_ColumnPinning.md @@ -0,0 +1,66 @@ +--- +id: Row_ColumnPinning +title: Row_ColumnPinning +--- + +# Interface: Row\_ColumnPinning\ + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:60](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L60) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### getCenterVisibleCells() + +```ts +getCenterVisibleCells: () => Cell[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:67](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L67) + +Returns all center pinned (unpinned) leaf cells in the row. + +#### Returns + +[`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `unknown`\>[] + +*** + +### getLeftVisibleCells() + +```ts +getLeftVisibleCells: () => Cell[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:71](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L71) + +Returns all left pinned leaf cells in the row. + +#### Returns + +[`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `unknown`\>[] + +*** + +### getRightVisibleCells() + +```ts +getRightVisibleCells: () => Cell[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L75) + +Returns all right pinned leaf cells in the row. + +#### Returns + +[`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `unknown`\>[] diff --git a/docs/reference/interfaces/Row_ColumnVisibility.md b/docs/reference/interfaces/Row_ColumnVisibility.md new file mode 100644 index 0000000000..1f0217d418 --- /dev/null +++ b/docs/reference/interfaces/Row_ColumnVisibility.md @@ -0,0 +1,48 @@ +--- +id: Row_ColumnVisibility +title: Row_ColumnVisibility +--- + +# Interface: Row\_ColumnVisibility\ + +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:73](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L73) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### getAllVisibleCells() + +```ts +getAllVisibleCells: () => Cell[]; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:77](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L77) + +#### Returns + +[`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `unknown`\>[] + +*** + +### getVisibleCells() + +```ts +getVisibleCells: () => Cell[]; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:81](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L81) + +Returns an array of cells that account for column visibility for the row. + +#### Returns + +[`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `unknown`\>[] diff --git a/docs/reference/interfaces/Row_Core.md b/docs/reference/interfaces/Row_Core.md new file mode 100644 index 0000000000..2a10923465 --- /dev/null +++ b/docs/reference/interfaces/Row_Core.md @@ -0,0 +1,372 @@ +--- +id: Row_Core +title: Row_Core +--- + +# Interface: Row\_Core\ + +Defined in: [types/Row.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Row.ts#L21) + +## Extends + +- [`Row_Row`](Row_Row.md)\<`TFeatures`, `TData`\> + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### \_uniqueValuesCache + +```ts +_uniqueValuesCache: Record; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L11) + +#### Inherited from + +[`Row_Row`](Row_Row.md).[`_uniqueValuesCache`](Row_Row.md#_uniquevaluescache) + +*** + +### \_valuesCache + +```ts +_valuesCache: Record; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:12](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L12) + +#### Inherited from + +[`Row_Row`](Row_Row.md).[`_valuesCache`](Row_Row.md#_valuescache) + +*** + +### depth + +```ts +depth: number; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:16](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L16) + +The depth of the row (if nested or grouped) relative to the root row array. + +#### Inherited from + +[`Row_Row`](Row_Row.md).[`depth`](Row_Row.md#depth) + +*** + +### getAllCells() + +```ts +getAllCells: () => Cell[]; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:55](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L55) + +Returns all of the cells for the row. + +#### Returns + +[`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `unknown`\>[] + +#### Inherited from + +[`Row_Row`](Row_Row.md).[`getAllCells`](Row_Row.md#getallcells) + +*** + +### getAllCellsByColumnId() + +```ts +getAllCellsByColumnId: () => Record>; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:51](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L51) + +#### Returns + +`Record`\<`string`, [`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `unknown`\>\> + +#### Inherited from + +[`Row_Row`](Row_Row.md).[`getAllCellsByColumnId`](Row_Row.md#getallcellsbycolumnid) + +*** + +### getLeafRows() + +```ts +getLeafRows: () => Row[]; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:59](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L59) + +Returns the leaf rows for the row, not including any parent rows. + +#### Returns + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\>[] + +#### Inherited from + +[`Row_Row`](Row_Row.md).[`getLeafRows`](Row_Row.md#getleafrows) + +*** + +### getParentRow() + +```ts +getParentRow: () => Row | undefined; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:63](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L63) + +Returns the parent row for the row, if it exists. + +#### Returns + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> \| `undefined` + +#### Inherited from + +[`Row_Row`](Row_Row.md).[`getParentRow`](Row_Row.md#getparentrow) + +*** + +### getParentRows() + +```ts +getParentRows: () => Row[]; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:67](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L67) + +Returns the parent rows for the row, all the way up to a root row. + +#### Returns + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\>[] + +#### Inherited from + +[`Row_Row`](Row_Row.md).[`getParentRows`](Row_Row.md#getparentrows) + +*** + +### getUniqueValues() + +```ts +getUniqueValues: (columnId) => TValue[]; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:71](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L71) + +Returns a unique array of values from the row for a given columnId. + +#### Type Parameters + +##### TValue + +`TValue` + +#### Parameters + +##### columnId + +`string` + +#### Returns + +`TValue`[] + +#### Inherited from + +[`Row_Row`](Row_Row.md).[`getUniqueValues`](Row_Row.md#getuniquevalues) + +*** + +### getValue() + +```ts +getValue: (columnId) => TValue; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L75) + +Returns the value from the row for a given columnId. + +#### Type Parameters + +##### TValue + +`TValue` + +#### Parameters + +##### columnId + +`string` + +#### Returns + +`TValue` + +#### Inherited from + +[`Row_Row`](Row_Row.md).[`getValue`](Row_Row.md#getvalue) + +*** + +### id + +```ts +id: string; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:20](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L20) + +The resolved unique identifier for the row resolved via the `options.getRowId` option. Defaults to the row's index (or relative index if it is a subRow). + +#### Inherited from + +[`Row_Row`](Row_Row.md).[`id`](Row_Row.md#id) + +*** + +### index + +```ts +index: number; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:24](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L24) + +The index of the row within its parent array (or the root data array). + +#### Inherited from + +[`Row_Row`](Row_Row.md).[`index`](Row_Row.md#index) + +*** + +### original + +```ts +original: TData; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:28](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L28) + +The original row object provided to the table. If the row is a grouped row, the original row object will be the first original in the group. + +#### Inherited from + +[`Row_Row`](Row_Row.md).[`original`](Row_Row.md#original) + +*** + +### originalSubRows? + +```ts +optional originalSubRows: readonly TData[]; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:32](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L32) + +An array of the original subRows as returned by the `options.getSubRows` option. + +#### Inherited from + +[`Row_Row`](Row_Row.md).[`originalSubRows`](Row_Row.md#originalsubrows) + +*** + +### parentId? + +```ts +optional parentId: string; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:36](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L36) + +If nested, this row's parent row id. + +#### Inherited from + +[`Row_Row`](Row_Row.md).[`parentId`](Row_Row.md#parentid) + +*** + +### renderValue() + +```ts +renderValue: (columnId) => TValue; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:79](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L79) + +Renders the value for the row in a given columnId the same as `getValue`, but will return the `renderFallbackValue` if no value is found. + +#### Type Parameters + +##### TValue + +`TValue` + +#### Parameters + +##### columnId + +`string` + +#### Returns + +`TValue` + +#### Inherited from + +[`Row_Row`](Row_Row.md).[`renderValue`](Row_Row.md#rendervalue) + +*** + +### subRows + +```ts +subRows: Row[]; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:40](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L40) + +An array of subRows for the row as returned and created by the `options.getSubRows` option. + +#### Inherited from + +[`Row_Row`](Row_Row.md).[`subRows`](Row_Row.md#subrows) + +*** + +### table + +```ts +table: Table_Internal; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:44](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L44) + +Reference to the parent table instance. + +#### Inherited from + +[`Row_Row`](Row_Row.md).[`table`](Row_Row.md#table) diff --git a/docs/reference/interfaces/Row_CoreProperties.md b/docs/reference/interfaces/Row_CoreProperties.md new file mode 100644 index 0000000000..9c3736a03f --- /dev/null +++ b/docs/reference/interfaces/Row_CoreProperties.md @@ -0,0 +1,138 @@ +--- +id: Row_CoreProperties +title: Row_CoreProperties +--- + +# Interface: Row\_CoreProperties\ + +Defined in: [core/rows/coreRowsFeature.types.ts:7](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L7) + +## Extended by + +- [`Row_Row`](Row_Row.md) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### \_uniqueValuesCache + +```ts +_uniqueValuesCache: Record; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L11) + +*** + +### \_valuesCache + +```ts +_valuesCache: Record; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:12](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L12) + +*** + +### depth + +```ts +depth: number; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:16](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L16) + +The depth of the row (if nested or grouped) relative to the root row array. + +*** + +### id + +```ts +id: string; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:20](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L20) + +The resolved unique identifier for the row resolved via the `options.getRowId` option. Defaults to the row's index (or relative index if it is a subRow). + +*** + +### index + +```ts +index: number; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:24](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L24) + +The index of the row within its parent array (or the root data array). + +*** + +### original + +```ts +original: TData; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:28](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L28) + +The original row object provided to the table. If the row is a grouped row, the original row object will be the first original in the group. + +*** + +### originalSubRows? + +```ts +optional originalSubRows: readonly TData[]; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:32](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L32) + +An array of the original subRows as returned by the `options.getSubRows` option. + +*** + +### parentId? + +```ts +optional parentId: string; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:36](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L36) + +If nested, this row's parent row id. + +*** + +### subRows + +```ts +subRows: Row[]; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:40](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L40) + +An array of subRows for the row as returned and created by the `options.getSubRows` option. + +*** + +### table + +```ts +table: Table_Internal; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:44](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L44) + +Reference to the parent table instance. diff --git a/docs/reference/interfaces/Row_Plugins.md b/docs/reference/interfaces/Row_Plugins.md new file mode 100644 index 0000000000..2c6aa8f40b --- /dev/null +++ b/docs/reference/interfaces/Row_Plugins.md @@ -0,0 +1,21 @@ +--- +id: Row_Plugins +title: Row_Plugins +--- + +# Interface: Row\_Plugins\ + +Defined in: [types/Row.ts:16](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Row.ts#L16) + +Use this interface as a target for declaration merging to add your own plugin properties. +Note: This will affect the types of all tables in your project. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) diff --git a/docs/reference/interfaces/Row_Row.md b/docs/reference/interfaces/Row_Row.md new file mode 100644 index 0000000000..8cd051c2bd --- /dev/null +++ b/docs/reference/interfaces/Row_Row.md @@ -0,0 +1,344 @@ +--- +id: Row_Row +title: Row_Row +--- + +# Interface: Row\_Row\ + +Defined in: [core/rows/coreRowsFeature.types.ts:47](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L47) + +## Extends + +- [`Row_CoreProperties`](Row_CoreProperties.md)\<`TFeatures`, `TData`\> + +## Extended by + +- [`Row_Core`](Row_Core.md) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### \_uniqueValuesCache + +```ts +_uniqueValuesCache: Record; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L11) + +#### Inherited from + +[`Row_CoreProperties`](Row_CoreProperties.md).[`_uniqueValuesCache`](Row_CoreProperties.md#_uniquevaluescache) + +*** + +### \_valuesCache + +```ts +_valuesCache: Record; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:12](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L12) + +#### Inherited from + +[`Row_CoreProperties`](Row_CoreProperties.md).[`_valuesCache`](Row_CoreProperties.md#_valuescache) + +*** + +### depth + +```ts +depth: number; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:16](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L16) + +The depth of the row (if nested or grouped) relative to the root row array. + +#### Inherited from + +[`Row_CoreProperties`](Row_CoreProperties.md).[`depth`](Row_CoreProperties.md#depth) + +*** + +### getAllCells() + +```ts +getAllCells: () => Cell[]; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:55](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L55) + +Returns all of the cells for the row. + +#### Returns + +[`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `unknown`\>[] + +*** + +### getAllCellsByColumnId() + +```ts +getAllCellsByColumnId: () => Record>; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:51](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L51) + +#### Returns + +`Record`\<`string`, [`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `unknown`\>\> + +*** + +### getLeafRows() + +```ts +getLeafRows: () => Row[]; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:59](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L59) + +Returns the leaf rows for the row, not including any parent rows. + +#### Returns + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\>[] + +*** + +### getParentRow() + +```ts +getParentRow: () => Row | undefined; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:63](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L63) + +Returns the parent row for the row, if it exists. + +#### Returns + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> \| `undefined` + +*** + +### getParentRows() + +```ts +getParentRows: () => Row[]; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:67](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L67) + +Returns the parent rows for the row, all the way up to a root row. + +#### Returns + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\>[] + +*** + +### getUniqueValues() + +```ts +getUniqueValues: (columnId) => TValue[]; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:71](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L71) + +Returns a unique array of values from the row for a given columnId. + +#### Type Parameters + +##### TValue + +`TValue` + +#### Parameters + +##### columnId + +`string` + +#### Returns + +`TValue`[] + +*** + +### getValue() + +```ts +getValue: (columnId) => TValue; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L75) + +Returns the value from the row for a given columnId. + +#### Type Parameters + +##### TValue + +`TValue` + +#### Parameters + +##### columnId + +`string` + +#### Returns + +`TValue` + +*** + +### id + +```ts +id: string; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:20](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L20) + +The resolved unique identifier for the row resolved via the `options.getRowId` option. Defaults to the row's index (or relative index if it is a subRow). + +#### Inherited from + +[`Row_CoreProperties`](Row_CoreProperties.md).[`id`](Row_CoreProperties.md#id) + +*** + +### index + +```ts +index: number; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:24](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L24) + +The index of the row within its parent array (or the root data array). + +#### Inherited from + +[`Row_CoreProperties`](Row_CoreProperties.md).[`index`](Row_CoreProperties.md#index) + +*** + +### original + +```ts +original: TData; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:28](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L28) + +The original row object provided to the table. If the row is a grouped row, the original row object will be the first original in the group. + +#### Inherited from + +[`Row_CoreProperties`](Row_CoreProperties.md).[`original`](Row_CoreProperties.md#original) + +*** + +### originalSubRows? + +```ts +optional originalSubRows: readonly TData[]; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:32](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L32) + +An array of the original subRows as returned by the `options.getSubRows` option. + +#### Inherited from + +[`Row_CoreProperties`](Row_CoreProperties.md).[`originalSubRows`](Row_CoreProperties.md#originalsubrows) + +*** + +### parentId? + +```ts +optional parentId: string; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:36](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L36) + +If nested, this row's parent row id. + +#### Inherited from + +[`Row_CoreProperties`](Row_CoreProperties.md).[`parentId`](Row_CoreProperties.md#parentid) + +*** + +### renderValue() + +```ts +renderValue: (columnId) => TValue; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:79](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L79) + +Renders the value for the row in a given columnId the same as `getValue`, but will return the `renderFallbackValue` if no value is found. + +#### Type Parameters + +##### TValue + +`TValue` + +#### Parameters + +##### columnId + +`string` + +#### Returns + +`TValue` + +*** + +### subRows + +```ts +subRows: Row[]; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:40](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L40) + +An array of subRows for the row as returned and created by the `options.getSubRows` option. + +#### Inherited from + +[`Row_CoreProperties`](Row_CoreProperties.md).[`subRows`](Row_CoreProperties.md#subrows) + +*** + +### table + +```ts +table: Table_Internal; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:44](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L44) + +Reference to the parent table instance. + +#### Inherited from + +[`Row_CoreProperties`](Row_CoreProperties.md).[`table`](Row_CoreProperties.md#table) diff --git a/docs/reference/interfaces/Row_RowExpanding.md b/docs/reference/interfaces/Row_RowExpanding.md new file mode 100644 index 0000000000..3f6cbb0431 --- /dev/null +++ b/docs/reference/interfaces/Row_RowExpanding.md @@ -0,0 +1,100 @@ +--- +id: Row_RowExpanding +title: Row_RowExpanding +--- + +# Interface: Row\_RowExpanding + +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L14) + +## Properties + +### getCanExpand() + +```ts +getCanExpand: () => boolean; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:18](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L18) + +Returns whether the row can be expanded. + +#### Returns + +`boolean` + +*** + +### getIsAllParentsExpanded() + +```ts +getIsAllParentsExpanded: () => boolean; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L22) + +Returns whether all parent rows of the row are expanded. + +#### Returns + +`boolean` + +*** + +### getIsExpanded() + +```ts +getIsExpanded: () => boolean; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L26) + +Returns whether the row is expanded. + +#### Returns + +`boolean` + +*** + +### getToggleExpandedHandler() + +```ts +getToggleExpandedHandler: () => () => void; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L30) + +Returns a function that can be used to toggle the expanded state of the row. This function can be used to bind to an event handler to a button. + +#### Returns + +```ts +(): void; +``` + +##### Returns + +`void` + +*** + +### toggleExpanded() + +```ts +toggleExpanded: (expanded?) => void; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L34) + +Toggles the expanded state (or sets it if `expanded` is provided) for the row. + +#### Parameters + +##### expanded? + +`boolean` + +#### Returns + +`void` diff --git a/docs/reference/interfaces/Row_RowPinning.md b/docs/reference/interfaces/Row_RowPinning.md new file mode 100644 index 0000000000..3e0a282398 --- /dev/null +++ b/docs/reference/interfaces/Row_RowPinning.md @@ -0,0 +1,86 @@ +--- +id: Row_RowPinning +title: Row_RowPinning +--- + +# Interface: Row\_RowPinning + +Defined in: [features/row-pinning/rowPinningFeature.types.ts:38](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L38) + +## Properties + +### getCanPin() + +```ts +getCanPin: () => boolean; +``` + +Defined in: [features/row-pinning/rowPinningFeature.types.ts:42](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L42) + +Returns whether or not the row can be pinned. + +#### Returns + +`boolean` + +*** + +### getIsPinned() + +```ts +getIsPinned: () => RowPinningPosition; +``` + +Defined in: [features/row-pinning/rowPinningFeature.types.ts:46](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L46) + +Returns the pinned position of the row. (`'top'`, `'bottom'` or `false`) + +#### Returns + +[`RowPinningPosition`](../type-aliases/RowPinningPosition.md) + +*** + +### getPinnedIndex() + +```ts +getPinnedIndex: () => number; +``` + +Defined in: [features/row-pinning/rowPinningFeature.types.ts:50](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L50) + +Returns the numeric pinned index of the row within a pinned row group. + +#### Returns + +`number` + +*** + +### pin() + +```ts +pin: (position, includeLeafRows?, includeParentRows?) => void; +``` + +Defined in: [features/row-pinning/rowPinningFeature.types.ts:54](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L54) + +Pins a row to the `'top'` or `'bottom'`, or unpins the row to the center if `false` is passed. + +#### Parameters + +##### position + +[`RowPinningPosition`](../type-aliases/RowPinningPosition.md) + +##### includeLeafRows? + +`boolean` + +##### includeParentRows? + +`boolean` + +#### Returns + +`void` diff --git a/docs/reference/interfaces/Row_RowSelection.md b/docs/reference/interfaces/Row_RowSelection.md new file mode 100644 index 0000000000..2aaa594ae2 --- /dev/null +++ b/docs/reference/interfaces/Row_RowSelection.md @@ -0,0 +1,160 @@ +--- +id: Row_RowSelection +title: Row_RowSelection +--- + +# Interface: Row\_RowSelection + +Defined in: [features/row-selection/rowSelectionFeature.types.ts:48](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L48) + +## Properties + +### getCanMultiSelect() + +```ts +getCanMultiSelect: () => boolean; +``` + +Defined in: [features/row-selection/rowSelectionFeature.types.ts:52](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L52) + +Returns whether or not the row can multi-select. + +#### Returns + +`boolean` + +*** + +### getCanSelect() + +```ts +getCanSelect: () => boolean; +``` + +Defined in: [features/row-selection/rowSelectionFeature.types.ts:56](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L56) + +Returns whether or not the row can be selected. + +#### Returns + +`boolean` + +*** + +### getCanSelectSubRows() + +```ts +getCanSelectSubRows: () => boolean; +``` + +Defined in: [features/row-selection/rowSelectionFeature.types.ts:60](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L60) + +Returns whether or not the row can select sub rows automatically when the parent row is selected. + +#### Returns + +`boolean` + +*** + +### getIsAllSubRowsSelected() + +```ts +getIsAllSubRowsSelected: () => boolean; +``` + +Defined in: [features/row-selection/rowSelectionFeature.types.ts:64](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L64) + +Returns whether or not all of the row's sub rows are selected. + +#### Returns + +`boolean` + +*** + +### getIsSelected() + +```ts +getIsSelected: () => boolean; +``` + +Defined in: [features/row-selection/rowSelectionFeature.types.ts:68](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L68) + +Returns whether or not the row is selected. + +#### Returns + +`boolean` + +*** + +### getIsSomeSelected() + +```ts +getIsSomeSelected: () => boolean; +``` + +Defined in: [features/row-selection/rowSelectionFeature.types.ts:72](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L72) + +Returns whether or not some of the row's sub rows are selected. + +#### Returns + +`boolean` + +*** + +### getToggleSelectedHandler() + +```ts +getToggleSelectedHandler: () => (event) => void; +``` + +Defined in: [features/row-selection/rowSelectionFeature.types.ts:76](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L76) + +Returns a handler that can be used to toggle the row. + +#### Returns + +```ts +(event): void; +``` + +##### Parameters + +###### event + +`unknown` + +##### Returns + +`void` + +*** + +### toggleSelected() + +```ts +toggleSelected: (value?, opts?) => void; +``` + +Defined in: [features/row-selection/rowSelectionFeature.types.ts:80](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L80) + +Selects/deselects the row. + +#### Parameters + +##### value? + +`boolean` + +##### opts? + +###### selectChildren? + +`boolean` + +#### Returns + +`void` diff --git a/docs/reference/interfaces/SortFn.md b/docs/reference/interfaces/SortFn.md new file mode 100644 index 0000000000..0b8acdf8f9 --- /dev/null +++ b/docs/reference/interfaces/SortFn.md @@ -0,0 +1,45 @@ +--- +id: SortFn +title: SortFn +--- + +# Interface: SortFn()\ + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L30) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +```ts +SortFn( + rowA, + rowB, + columnId): number; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L34) + +## Parameters + +### rowA + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +### rowB + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +### columnId + +`string` + +## Returns + +`number` diff --git a/docs/reference/interfaces/SortFns.md b/docs/reference/interfaces/SortFns.md new file mode 100644 index 0000000000..ded705adcf --- /dev/null +++ b/docs/reference/interfaces/SortFns.md @@ -0,0 +1,8 @@ +--- +id: SortFns +title: SortFns +--- + +# Interface: SortFns + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:28](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L28) diff --git a/docs/reference/interfaces/StockFeatures.md b/docs/reference/interfaces/StockFeatures.md new file mode 100644 index 0000000000..c8a8f99e48 --- /dev/null +++ b/docs/reference/interfaces/StockFeatures.md @@ -0,0 +1,148 @@ +--- +id: StockFeatures +title: StockFeatures +--- + +# Interface: StockFeatures + +Defined in: [features/stockFeatures.ts:16](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L16) + +## Properties + +### columnFacetingFeature + +```ts +columnFacetingFeature: TableFeature>; +``` + +Defined in: [features/stockFeatures.ts:17](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L17) + +*** + +### columnFilteringFeature + +```ts +columnFilteringFeature: TableFeature>; +``` + +Defined in: [features/stockFeatures.ts:18](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L18) + +*** + +### columnGroupingFeature + +```ts +columnGroupingFeature: TableFeature>; +``` + +Defined in: [features/stockFeatures.ts:19](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L19) + +*** + +### columnOrderingFeature + +```ts +columnOrderingFeature: TableFeature>; +``` + +Defined in: [features/stockFeatures.ts:20](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L20) + +*** + +### columnPinningFeature + +```ts +columnPinningFeature: TableFeature>; +``` + +Defined in: [features/stockFeatures.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L21) + +*** + +### columnResizingFeature + +```ts +columnResizingFeature: TableFeature>; +``` + +Defined in: [features/stockFeatures.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L22) + +*** + +### columnSizingFeature + +```ts +columnSizingFeature: TableFeature>; +``` + +Defined in: [features/stockFeatures.ts:23](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L23) + +*** + +### columnVisibilityFeature + +```ts +columnVisibilityFeature: TableFeature>; +``` + +Defined in: [features/stockFeatures.ts:24](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L24) + +*** + +### globalFilteringFeature + +```ts +globalFilteringFeature: TableFeature>; +``` + +Defined in: [features/stockFeatures.ts:25](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L25) + +*** + +### rowExpandingFeature + +```ts +rowExpandingFeature: TableFeature>; +``` + +Defined in: [features/stockFeatures.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L26) + +*** + +### rowPaginationFeature + +```ts +rowPaginationFeature: TableFeature>; +``` + +Defined in: [features/stockFeatures.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L27) + +*** + +### rowPinningFeature + +```ts +rowPinningFeature: TableFeature>; +``` + +Defined in: [features/stockFeatures.ts:28](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L28) + +*** + +### rowSelectionFeature + +```ts +rowSelectionFeature: TableFeature>; +``` + +Defined in: [features/stockFeatures.ts:29](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L29) + +*** + +### rowSortingFeature + +```ts +rowSortingFeature: TableFeature>; +``` + +Defined in: [features/stockFeatures.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L30) diff --git a/docs/reference/interfaces/StringHeaderIdentifier.md b/docs/reference/interfaces/StringHeaderIdentifier.md new file mode 100644 index 0000000000..6b5b0a6d8a --- /dev/null +++ b/docs/reference/interfaces/StringHeaderIdentifier.md @@ -0,0 +1,28 @@ +--- +id: StringHeaderIdentifier +title: StringHeaderIdentifier +--- + +# Interface: StringHeaderIdentifier + +Defined in: [types/ColumnDef.ts:45](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L45) + +## Properties + +### header + +```ts +header: string; +``` + +Defined in: [types/ColumnDef.ts:46](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L46) + +*** + +### id? + +```ts +optional id: string; +``` + +Defined in: [types/ColumnDef.ts:47](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L47) diff --git a/docs/reference/interfaces/TableFeature.md b/docs/reference/interfaces/TableFeature.md new file mode 100644 index 0000000000..e8862f8205 --- /dev/null +++ b/docs/reference/interfaces/TableFeature.md @@ -0,0 +1,122 @@ +--- +id: TableFeature +title: TableFeature +--- + +# Interface: TableFeature\ + +Defined in: [types/TableFeatures.ts:116](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L116) + +## Type Parameters + +### TConstructors + +`TConstructors` *extends* `FeatureConstructors` + +## Properties + +### assignCellPrototype? + +```ts +optional assignCellPrototype: AssignCellPrototype; +``` + +Defined in: [types/TableFeatures.ts:121](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L121) + +Assigns Cell APIs to the cell prototype for memory-efficient method sharing. +This is called once per table to build a shared prototype for all cells. + +*** + +### assignColumnPrototype? + +```ts +optional assignColumnPrototype: AssignColumnPrototype; +``` + +Defined in: [types/TableFeatures.ts:126](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L126) + +Assigns Column APIs to the column prototype for memory-efficient method sharing. +This is called once per table to build a shared prototype for all columns. + +*** + +### assignHeaderPrototype? + +```ts +optional assignHeaderPrototype: AssignHeaderPrototype; +``` + +Defined in: [types/TableFeatures.ts:131](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L131) + +Assigns Header APIs to the header prototype for memory-efficient method sharing. +This is called once per table to build a shared prototype for all headers. + +*** + +### assignRowPrototype? + +```ts +optional assignRowPrototype: AssignRowPrototype; +``` + +Defined in: [types/TableFeatures.ts:136](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L136) + +Assigns Row APIs to the row prototype for memory-efficient method sharing. +This is called once per table to build a shared prototype for all rows. + +*** + +### constructTableAPIs? + +```ts +optional constructTableAPIs: ConstructTableAPIs; +``` + +Defined in: [types/TableFeatures.ts:141](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L141) + +Assigns Table APIs to the table instance. +Unlike row/cell/column/header, the table is a singleton so methods are assigned directly. + +*** + +### getDefaultColumnDef? + +```ts +optional getDefaultColumnDef: GetDefaultColumnDef; +``` + +Defined in: [types/TableFeatures.ts:142](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L142) + +*** + +### getDefaultTableOptions? + +```ts +optional getDefaultTableOptions: GetDefaultTableOptions; +``` + +Defined in: [types/TableFeatures.ts:143](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L143) + +*** + +### getInitialState? + +```ts +optional getInitialState: GetInitialState; +``` + +Defined in: [types/TableFeatures.ts:144](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L144) + +*** + +### initRowInstanceData? + +```ts +optional initRowInstanceData: InitRowInstanceData; +``` + +Defined in: [types/TableFeatures.ts:149](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L149) + +Initializes instance-specific data on each row (e.g., caches). +Methods should be assigned via assignRowPrototype instead. diff --git a/docs/reference/interfaces/TableFeatures.md b/docs/reference/interfaces/TableFeatures.md new file mode 100644 index 0000000000..5d052fa608 --- /dev/null +++ b/docs/reference/interfaces/TableFeatures.md @@ -0,0 +1,292 @@ +--- +id: TableFeatures +title: TableFeatures +--- + +# Interface: TableFeatures + +Defined in: [types/TableFeatures.ts:42](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L42) + +## Extends + +- `Partial`\<[`CoreFeatures`](CoreFeatures.md)\>.`Partial`\<[`StockFeatures`](StockFeatures.md)\>.`Partial`\<[`Plugins`](Plugins.md)\> + +## Properties + +### columnFacetingFeature? + +```ts +optional columnFacetingFeature: TableFeature>; +``` + +Defined in: [features/stockFeatures.ts:17](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L17) + +#### Inherited from + +[`StockFeatures`](StockFeatures.md).[`columnFacetingFeature`](StockFeatures.md#columnfacetingfeature) + +*** + +### columnFilteringFeature? + +```ts +optional columnFilteringFeature: TableFeature>; +``` + +Defined in: [features/stockFeatures.ts:18](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L18) + +#### Inherited from + +[`StockFeatures`](StockFeatures.md).[`columnFilteringFeature`](StockFeatures.md#columnfilteringfeature) + +*** + +### columnGroupingFeature? + +```ts +optional columnGroupingFeature: TableFeature>; +``` + +Defined in: [features/stockFeatures.ts:19](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L19) + +#### Inherited from + +[`StockFeatures`](StockFeatures.md).[`columnGroupingFeature`](StockFeatures.md#columngroupingfeature) + +*** + +### columnOrderingFeature? + +```ts +optional columnOrderingFeature: TableFeature>; +``` + +Defined in: [features/stockFeatures.ts:20](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L20) + +#### Inherited from + +[`StockFeatures`](StockFeatures.md).[`columnOrderingFeature`](StockFeatures.md#columnorderingfeature) + +*** + +### columnPinningFeature? + +```ts +optional columnPinningFeature: TableFeature>; +``` + +Defined in: [features/stockFeatures.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L21) + +#### Inherited from + +[`StockFeatures`](StockFeatures.md).[`columnPinningFeature`](StockFeatures.md#columnpinningfeature) + +*** + +### columnResizingFeature? + +```ts +optional columnResizingFeature: TableFeature>; +``` + +Defined in: [features/stockFeatures.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L22) + +#### Inherited from + +[`StockFeatures`](StockFeatures.md).[`columnResizingFeature`](StockFeatures.md#columnresizingfeature) + +*** + +### columnSizingFeature? + +```ts +optional columnSizingFeature: TableFeature>; +``` + +Defined in: [features/stockFeatures.ts:23](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L23) + +#### Inherited from + +[`StockFeatures`](StockFeatures.md).[`columnSizingFeature`](StockFeatures.md#columnsizingfeature) + +*** + +### columnVisibilityFeature? + +```ts +optional columnVisibilityFeature: TableFeature>; +``` + +Defined in: [features/stockFeatures.ts:24](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L24) + +#### Inherited from + +[`StockFeatures`](StockFeatures.md).[`columnVisibilityFeature`](StockFeatures.md#columnvisibilityfeature) + +*** + +### coreCellsFeature? + +```ts +optional coreCellsFeature: TableFeature>; +``` + +Defined in: [core/coreFeatures.ts:9](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/coreFeatures.ts#L9) + +#### Inherited from + +[`CoreFeatures`](CoreFeatures.md).[`coreCellsFeature`](CoreFeatures.md#corecellsfeature) + +*** + +### coreColumnsFeature? + +```ts +optional coreColumnsFeature: TableFeature>; +``` + +Defined in: [core/coreFeatures.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/coreFeatures.ts#L10) + +#### Inherited from + +[`CoreFeatures`](CoreFeatures.md).[`coreColumnsFeature`](CoreFeatures.md#corecolumnsfeature) + +*** + +### coreHeadersFeature? + +```ts +optional coreHeadersFeature: TableFeature>; +``` + +Defined in: [core/coreFeatures.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/coreFeatures.ts#L11) + +#### Inherited from + +[`CoreFeatures`](CoreFeatures.md).[`coreHeadersFeature`](CoreFeatures.md#coreheadersfeature) + +*** + +### coreRowModelsFeature? + +```ts +optional coreRowModelsFeature: TableFeature>; +``` + +Defined in: [core/coreFeatures.ts:12](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/coreFeatures.ts#L12) + +#### Inherited from + +[`CoreFeatures`](CoreFeatures.md).[`coreRowModelsFeature`](CoreFeatures.md#corerowmodelsfeature) + +*** + +### coreRowsFeature? + +```ts +optional coreRowsFeature: TableFeature>; +``` + +Defined in: [core/coreFeatures.ts:13](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/coreFeatures.ts#L13) + +#### Inherited from + +[`CoreFeatures`](CoreFeatures.md).[`coreRowsFeature`](CoreFeatures.md#corerowsfeature) + +*** + +### coreTablesFeature? + +```ts +optional coreTablesFeature: TableFeature>; +``` + +Defined in: [core/coreFeatures.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/coreFeatures.ts#L14) + +#### Inherited from + +[`CoreFeatures`](CoreFeatures.md).[`coreTablesFeature`](CoreFeatures.md#coretablesfeature) + +*** + +### globalFilteringFeature? + +```ts +optional globalFilteringFeature: TableFeature>; +``` + +Defined in: [features/stockFeatures.ts:25](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L25) + +#### Inherited from + +[`StockFeatures`](StockFeatures.md).[`globalFilteringFeature`](StockFeatures.md#globalfilteringfeature) + +*** + +### rowExpandingFeature? + +```ts +optional rowExpandingFeature: TableFeature>; +``` + +Defined in: [features/stockFeatures.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L26) + +#### Inherited from + +[`StockFeatures`](StockFeatures.md).[`rowExpandingFeature`](StockFeatures.md#rowexpandingfeature) + +*** + +### rowPaginationFeature? + +```ts +optional rowPaginationFeature: TableFeature>; +``` + +Defined in: [features/stockFeatures.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L27) + +#### Inherited from + +[`StockFeatures`](StockFeatures.md).[`rowPaginationFeature`](StockFeatures.md#rowpaginationfeature) + +*** + +### rowPinningFeature? + +```ts +optional rowPinningFeature: TableFeature>; +``` + +Defined in: [features/stockFeatures.ts:28](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L28) + +#### Inherited from + +[`StockFeatures`](StockFeatures.md).[`rowPinningFeature`](StockFeatures.md#rowpinningfeature) + +*** + +### rowSelectionFeature? + +```ts +optional rowSelectionFeature: TableFeature>; +``` + +Defined in: [features/stockFeatures.ts:29](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L29) + +#### Inherited from + +[`StockFeatures`](StockFeatures.md).[`rowSelectionFeature`](StockFeatures.md#rowselectionfeature) + +*** + +### rowSortingFeature? + +```ts +optional rowSortingFeature: TableFeature>; +``` + +Defined in: [features/stockFeatures.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L30) + +#### Inherited from + +[`StockFeatures`](StockFeatures.md).[`rowSortingFeature`](StockFeatures.md#rowsortingfeature) diff --git a/docs/reference/interfaces/TableMeta.md b/docs/reference/interfaces/TableMeta.md new file mode 100644 index 0000000000..97579c5732 --- /dev/null +++ b/docs/reference/interfaces/TableMeta.md @@ -0,0 +1,18 @@ +--- +id: TableMeta +title: TableMeta +--- + +# Interface: TableMeta\ + +Defined in: [core/table/coreTablesFeature.types.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L10) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) diff --git a/docs/reference/interfaces/TableOptions_Cell.md b/docs/reference/interfaces/TableOptions_Cell.md new file mode 100644 index 0000000000..6846124858 --- /dev/null +++ b/docs/reference/interfaces/TableOptions_Cell.md @@ -0,0 +1,24 @@ +--- +id: TableOptions_Cell +title: TableOptions_Cell +--- + +# Interface: TableOptions\_Cell + +Defined in: [core/cells/coreCellsFeature.types.ts:63](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L63) + +## Extended by + +- [`TableOptions_Core`](TableOptions_Core.md) + +## Properties + +### renderFallbackValue? + +```ts +optional renderFallbackValue: any; +``` + +Defined in: [core/cells/coreCellsFeature.types.ts:67](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L67) + +Value used when the desired value is not found in the data. diff --git a/docs/reference/interfaces/TableOptions_ColumnFiltering.md b/docs/reference/interfaces/TableOptions_ColumnFiltering.md new file mode 100644 index 0000000000..a30779d166 --- /dev/null +++ b/docs/reference/interfaces/TableOptions_ColumnFiltering.md @@ -0,0 +1,92 @@ +--- +id: TableOptions_ColumnFiltering +title: TableOptions_ColumnFiltering +--- + +# Interface: TableOptions\_ColumnFiltering\ + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:143](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L143) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### enableColumnFilters? + +```ts +optional enableColumnFilters: boolean; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:150](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L150) + +Enables/disables **column** filtering for all columns. + +*** + +### enableFilters? + +```ts +optional enableFilters: boolean; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:154](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L154) + +Enables/disables all filtering for the table. + +*** + +### filterFromLeafRows? + +```ts +optional filterFromLeafRows: boolean; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:158](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L158) + +By default, filtering is done from parent rows down (so if a parent row is filtered out, all of its children will be filtered out as well). Setting this option to `true` will cause filtering to be done from leaf rows up (which means parent rows will be included so long as one of their child or grand-child rows is also included). + +*** + +### manualFiltering? + +```ts +optional manualFiltering: boolean; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:162](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L162) + +Disables the `getFilteredRowModel` from being used to filter data. This may be useful if your table needs to dynamically support both client-side and server-side filtering. + +*** + +### maxLeafRowFilterDepth? + +```ts +optional maxLeafRowFilterDepth: number; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:168](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L168) + +By default, filtering is done for all rows (max depth of 100), no matter if they are root level parent rows or the child leaf rows of a parent row. Setting this option to `0` will cause filtering to only be applied to the root level parent rows, with all sub-rows remaining unfiltered. Similarly, setting this option to `1` will cause filtering to only be applied to child leaf rows 1 level deep, and so on. + +This is useful for situations where you want a row's entire child hierarchy to be visible regardless of the applied filter. + +*** + +### onColumnFiltersChange? + +```ts +optional onColumnFiltersChange: OnChangeFn; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:172](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L172) + +If provided, this function will be called with an `updaterFn` when `state.columnFilters` changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table. diff --git a/docs/reference/interfaces/TableOptions_ColumnGrouping.md b/docs/reference/interfaces/TableOptions_ColumnGrouping.md new file mode 100644 index 0000000000..115314b992 --- /dev/null +++ b/docs/reference/interfaces/TableOptions_ColumnGrouping.md @@ -0,0 +1,56 @@ +--- +id: TableOptions_ColumnGrouping +title: TableOptions_ColumnGrouping +--- + +# Interface: TableOptions\_ColumnGrouping + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:152](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L152) + +## Properties + +### enableGrouping? + +```ts +optional enableGrouping: boolean; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:156](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L156) + +Enables/disables grouping for the table. + +*** + +### groupedColumnMode? + +```ts +optional groupedColumnMode: false | "reorder" | "remove"; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:160](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L160) + +Grouping columns are automatically reordered by default to the start of the columns list. If you would rather remove them or leave them as-is, set the appropriate mode here. + +*** + +### manualGrouping? + +```ts +optional manualGrouping: boolean; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:164](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L164) + +Enables manual grouping. If this option is set to `true`, the table will not automatically group rows using `getGroupedRowModel()` and instead will expect you to manually group the rows before passing them to the table. This is useful if you are doing server-side grouping and aggregation. + +*** + +### onGroupingChange? + +```ts +optional onGroupingChange: OnChangeFn; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:168](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L168) + +If this function is provided, it will be called when the grouping state changes and you will be expected to manage the state yourself. You can pass the managed state back to the table via the `tableOptions.state.grouping` option. diff --git a/docs/reference/interfaces/TableOptions_ColumnOrdering.md b/docs/reference/interfaces/TableOptions_ColumnOrdering.md new file mode 100644 index 0000000000..ce1dc62dae --- /dev/null +++ b/docs/reference/interfaces/TableOptions_ColumnOrdering.md @@ -0,0 +1,20 @@ +--- +id: TableOptions_ColumnOrdering +title: TableOptions_ColumnOrdering +--- + +# Interface: TableOptions\_ColumnOrdering + +Defined in: [features/column-ordering/columnOrderingFeature.types.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L11) + +## Properties + +### onColumnOrderChange? + +```ts +optional onColumnOrderChange: OnChangeFn; +``` + +Defined in: [features/column-ordering/columnOrderingFeature.types.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L15) + +If provided, this function will be called with an `updaterFn` when `state.columnOrder` changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table. diff --git a/docs/reference/interfaces/TableOptions_ColumnPinning.md b/docs/reference/interfaces/TableOptions_ColumnPinning.md new file mode 100644 index 0000000000..7ddef6e6aa --- /dev/null +++ b/docs/reference/interfaces/TableOptions_ColumnPinning.md @@ -0,0 +1,32 @@ +--- +id: TableOptions_ColumnPinning +title: TableOptions_ColumnPinning +--- + +# Interface: TableOptions\_ColumnPinning + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:19](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L19) + +## Properties + +### enableColumnPinning? + +```ts +optional enableColumnPinning: boolean; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:23](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L23) + +Enables/disables column pinning for the table. Defaults to `true`. + +*** + +### onColumnPinningChange? + +```ts +optional onColumnPinningChange: OnChangeFn; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L27) + +If provided, this function will be called with an `updaterFn` when `state.columnPinning` changes. This overrides the default internal state management, so you will also need to supply `state.columnPinning` from your own managed state. diff --git a/docs/reference/interfaces/TableOptions_ColumnResizing.md b/docs/reference/interfaces/TableOptions_ColumnResizing.md new file mode 100644 index 0000000000..604e4b99e1 --- /dev/null +++ b/docs/reference/interfaces/TableOptions_ColumnResizing.md @@ -0,0 +1,56 @@ +--- +id: TableOptions_ColumnResizing +title: TableOptions_ColumnResizing +--- + +# Interface: TableOptions\_ColumnResizing + +Defined in: [features/column-resizing/columnResizingFeature.types.ts:20](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L20) + +## Properties + +### columnResizeDirection? + +```ts +optional columnResizeDirection: ColumnResizeDirection; +``` + +Defined in: [features/column-resizing/columnResizingFeature.types.ts:32](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L32) + +Enables or disables right-to-left support for resizing the column. defaults to 'ltr'. + +*** + +### columnResizeMode? + +```ts +optional columnResizeMode: ColumnResizeMode; +``` + +Defined in: [features/column-resizing/columnResizingFeature.types.ts:24](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L24) + +Determines when the columnSizing state is updated. `onChange` updates the state when the user is dragging the resize handle. `onEnd` updates the state when the user releases the resize handle. + +*** + +### enableColumnResizing? + +```ts +optional enableColumnResizing: boolean; +``` + +Defined in: [features/column-resizing/columnResizingFeature.types.ts:28](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L28) + +Enables or disables column resizing for the column. + +*** + +### onColumnResizingChange? + +```ts +optional onColumnResizingChange: OnChangeFn; +``` + +Defined in: [features/column-resizing/columnResizingFeature.types.ts:36](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L36) + +If provided, this function will be called with an `updaterFn` when `state.columnResizing` changes. This overrides the default internal state management, so you will also need to supply `state.columnResizing` from your own managed state. diff --git a/docs/reference/interfaces/TableOptions_ColumnSizing.md b/docs/reference/interfaces/TableOptions_ColumnSizing.md new file mode 100644 index 0000000000..9793c4722e --- /dev/null +++ b/docs/reference/interfaces/TableOptions_ColumnSizing.md @@ -0,0 +1,20 @@ +--- +id: TableOptions_ColumnSizing +title: TableOptions_ColumnSizing +--- + +# Interface: TableOptions\_ColumnSizing + +Defined in: [features/column-sizing/columnSizingFeature.types.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L10) + +## Properties + +### onColumnSizingChange? + +```ts +optional onColumnSizingChange: OnChangeFn; +``` + +Defined in: [features/column-sizing/columnSizingFeature.types.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L14) + +If provided, this function will be called with an `updaterFn` when `state.columnSizing` changes. This overrides the default internal state management, so you will also need to supply `state.columnSizing` from your own managed state. diff --git a/docs/reference/interfaces/TableOptions_ColumnVisibility.md b/docs/reference/interfaces/TableOptions_ColumnVisibility.md new file mode 100644 index 0000000000..8732dc8407 --- /dev/null +++ b/docs/reference/interfaces/TableOptions_ColumnVisibility.md @@ -0,0 +1,32 @@ +--- +id: TableOptions_ColumnVisibility +title: TableOptions_ColumnVisibility +--- + +# Interface: TableOptions\_ColumnVisibility + +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:12](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L12) + +## Properties + +### enableHiding? + +```ts +optional enableHiding: boolean; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:16](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L16) + +Whether to enable column hiding. Defaults to `true`. + +*** + +### onColumnVisibilityChange? + +```ts +optional onColumnVisibilityChange: OnChangeFn; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:20](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L20) + +If provided, this function will be called with an `updaterFn` when `state.columnVisibility` changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table. diff --git a/docs/reference/interfaces/TableOptions_Columns.md b/docs/reference/interfaces/TableOptions_Columns.md new file mode 100644 index 0000000000..45ae5215df --- /dev/null +++ b/docs/reference/interfaces/TableOptions_Columns.md @@ -0,0 +1,50 @@ +--- +id: TableOptions_Columns +title: TableOptions_Columns +--- + +# Interface: TableOptions\_Columns\ + +Defined in: [core/columns/coreColumnsFeature.types.ts:60](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L60) + +## Extended by + +- [`TableOptions_Core`](TableOptions_Core.md) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](../type-aliases/CellData.md) = [`CellData`](../type-aliases/CellData.md) + +## Properties + +### columns + +```ts +columns: readonly ColumnDef[]; +``` + +Defined in: [core/columns/coreColumnsFeature.types.ts:68](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L68) + +The array of column defs to use for the table. + +*** + +### defaultColumn? + +```ts +optional defaultColumn: Partial>; +``` + +Defined in: [core/columns/coreColumnsFeature.types.ts:72](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L72) + +Default column options to use for all column defs supplied to the table. diff --git a/docs/reference/interfaces/TableOptions_Core.md b/docs/reference/interfaces/TableOptions_Core.md new file mode 100644 index 0000000000..fc93daeec1 --- /dev/null +++ b/docs/reference/interfaces/TableOptions_Core.md @@ -0,0 +1,305 @@ +--- +id: TableOptions_Core +title: TableOptions_Core +--- + +# Interface: TableOptions\_Core\ + +Defined in: [types/TableOptions.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableOptions.ts#L27) + +## Extends + +- [`TableOptions_Table`](TableOptions_Table.md)\<`TFeatures`, `TData`\>.[`TableOptions_Cell`](TableOptions_Cell.md).[`TableOptions_Columns`](TableOptions_Columns.md)\<`TFeatures`, `TData`\>.[`TableOptions_Rows`](TableOptions_Rows.md)\<`TFeatures`, `TData`\> + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### \_features + +```ts +_features: TFeatures; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L22) + +The features that you want to enable for the table. + +#### Inherited from + +[`TableOptions_Table`](TableOptions_Table.md).[`_features`](TableOptions_Table.md#_features) + +*** + +### \_rowModels? + +```ts +optional _rowModels: CreateRowModels_All; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L26) + +The row model options that you want to enable for the table. + +#### Inherited from + +[`TableOptions_Table`](TableOptions_Table.md).[`_rowModels`](TableOptions_Table.md#_rowmodels) + +*** + +### autoResetAll? + +```ts +optional autoResetAll: boolean; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L30) + +Set this option to override any of the `autoReset...` feature options. + +#### Inherited from + +[`TableOptions_Table`](TableOptions_Table.md).[`autoResetAll`](TableOptions_Table.md#autoresetall) + +*** + +### columns + +```ts +columns: readonly ColumnDef[]; +``` + +Defined in: [core/columns/coreColumnsFeature.types.ts:68](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L68) + +The array of column defs to use for the table. + +#### Inherited from + +[`TableOptions_Columns`](TableOptions_Columns.md).[`columns`](TableOptions_Columns.md#columns) + +*** + +### data + +```ts +data: readonly TData[]; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L34) + +The data for the table to display. When the `data` option changes reference, the table will reprocess the data. + +#### Inherited from + +[`TableOptions_Table`](TableOptions_Table.md).[`data`](TableOptions_Table.md#data) + +*** + +### defaultColumn? + +```ts +optional defaultColumn: Partial>; +``` + +Defined in: [core/columns/coreColumnsFeature.types.ts:72](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L72) + +Default column options to use for all column defs supplied to the table. + +#### Inherited from + +[`TableOptions_Columns`](TableOptions_Columns.md).[`defaultColumn`](TableOptions_Columns.md#defaultcolumn) + +*** + +### getRowId()? + +```ts +optional getRowId: (originalRow, index, parent?) => string; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:90](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L90) + +This optional function is used to derive a unique ID for any given row. If not provided the rows index is used (nested rows join together with `.` using their grandparents' index eg. `index.index.index`). If you need to identify individual rows that are originating from any server-side operations, it's suggested you use this function to return an ID that makes sense regardless of network IO/ambiguity eg. a userId, taskId, database ID field, etc. + +#### Parameters + +##### originalRow + +`TData` + +##### index + +`number` + +##### parent? + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +#### Returns + +`string` + +#### Example + +```ts +getRowId: row => row.userId +``` + +#### Inherited from + +[`TableOptions_Rows`](TableOptions_Rows.md).[`getRowId`](TableOptions_Rows.md#getrowid) + +*** + +### getSubRows()? + +```ts +optional getSubRows: (originalRow, index) => readonly TData[] | undefined; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:99](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L99) + +This optional function is used to access the sub rows for any given row. If you are using nested rows, you will need to use this function to return the sub rows object (or undefined) from the row. + +#### Parameters + +##### originalRow + +`TData` + +##### index + +`number` + +#### Returns + +readonly `TData`[] \| `undefined` + +#### Example + +```ts +getSubRows: row => row.subRows +``` + +#### Inherited from + +[`TableOptions_Rows`](TableOptions_Rows.md).[`getSubRows`](TableOptions_Rows.md#getsubrows) + +*** + +### initialState? + +```ts +optional initialState: Partial>; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:39](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L39) + +Use this option to optionally pass initial state to the table. This state will be used when resetting various table states either automatically by the table (eg. `options.autoResetPageIndex`) or via functions like `table.resetRowSelection()`. Most reset function allow you optionally pass a flag to reset to a blank/default state instead of the initial state. +Table state will not be reset when this object changes, which also means that the initial state object does not need to be stable. + +#### Inherited from + +[`TableOptions_Table`](TableOptions_Table.md).[`initialState`](TableOptions_Table.md#initialstate) + +*** + +### mergeOptions()? + +```ts +optional mergeOptions: (defaultOptions, options) => TableOptions; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:43](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L43) + +This option is used to optionally implement the merging of table options. + +#### Parameters + +##### defaultOptions + +[`TableOptions`](../type-aliases/TableOptions.md)\<`TFeatures`, `TData`\> + +##### options + +`Partial`\<[`TableOptions`](../type-aliases/TableOptions.md)\<`TFeatures`, `TData`\>\> + +#### Returns + +[`TableOptions`](../type-aliases/TableOptions.md)\<`TFeatures`, `TData`\> + +#### Inherited from + +[`TableOptions_Table`](TableOptions_Table.md).[`mergeOptions`](TableOptions_Table.md#mergeoptions) + +*** + +### meta? + +```ts +optional meta: TableMeta; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:50](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L50) + +You can pass any object to `options.meta` and access it anywhere the `table` is available via `table.options.meta`. + +#### Inherited from + +[`TableOptions_Table`](TableOptions_Table.md).[`meta`](TableOptions_Table.md#meta) + +*** + +### renderFallbackValue? + +```ts +optional renderFallbackValue: any; +``` + +Defined in: [core/cells/coreCellsFeature.types.ts:67](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L67) + +Value used when the desired value is not found in the data. + +#### Inherited from + +[`TableOptions_Cell`](TableOptions_Cell.md).[`renderFallbackValue`](TableOptions_Cell.md#renderfallbackvalue) + +*** + +### state? + +```ts +optional state: Partial>; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:54](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L54) + +Pass in individual self-managed state to the table. + +#### Inherited from + +[`TableOptions_Table`](TableOptions_Table.md).[`state`](TableOptions_Table.md#state) + +*** + +### store? + +```ts +optional store: Store>; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:58](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L58) + +Optionally, provide your own external TanStack Store instance if you want to manage the table state externally. + +#### Inherited from + +[`TableOptions_Table`](TableOptions_Table.md).[`store`](TableOptions_Table.md#store) diff --git a/docs/reference/interfaces/TableOptions_GlobalFiltering.md b/docs/reference/interfaces/TableOptions_GlobalFiltering.md new file mode 100644 index 0000000000..72f179ead5 --- /dev/null +++ b/docs/reference/interfaces/TableOptions_GlobalFiltering.md @@ -0,0 +1,94 @@ +--- +id: TableOptions_GlobalFiltering +title: TableOptions_GlobalFiltering +--- + +# Interface: TableOptions\_GlobalFiltering\ + +Defined in: [features/global-filtering/globalFilteringFeature.types.ts:32](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L32) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### enableGlobalFilter? + +```ts +optional enableGlobalFilter: boolean; +``` + +Defined in: [features/global-filtering/globalFilteringFeature.types.ts:39](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L39) + +Enables/disables **global** filtering for all columns. + +*** + +### getColumnCanGlobalFilter()? + +```ts +optional getColumnCanGlobalFilter: (column) => boolean; +``` + +Defined in: [features/global-filtering/globalFilteringFeature.types.ts:44](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L44) + +If provided, this function will be called with the column and should return `true` or `false` to indicate whether this column should be used for global filtering. +This is useful if the column can contain data that is not `string` or `number` (i.e. `undefined`). + +#### Type Parameters + +##### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +##### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +##### TValue + +`TValue` *extends* `unknown` = `unknown` + +#### Parameters + +##### column + +[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `TValue`\> + +#### Returns + +`boolean` + +*** + +### globalFilterFn? + +```ts +optional globalFilterFn: FilterFnOption; +``` + +Defined in: [features/global-filtering/globalFilteringFeature.types.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L57) + +The filter function to use for global filtering. +- A `string` referencing a built-in filter function +- A `string` that references a custom filter functions provided via the `tableOptions.filterFns` option +- A custom filter function + +*** + +### onGlobalFilterChange? + +```ts +optional onGlobalFilterChange: OnChangeFn; +``` + +Defined in: [features/global-filtering/globalFilteringFeature.types.ts:61](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L61) + +If provided, this function will be called with an `updaterFn` when `state.globalFilter` changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table. diff --git a/docs/reference/interfaces/TableOptions_Plugins.md b/docs/reference/interfaces/TableOptions_Plugins.md new file mode 100644 index 0000000000..a5efa5289b --- /dev/null +++ b/docs/reference/interfaces/TableOptions_Plugins.md @@ -0,0 +1,18 @@ +--- +id: TableOptions_Plugins +title: TableOptions_Plugins +--- + +# Interface: TableOptions\_Plugins\ + +Defined in: [types/TableOptions.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableOptions.ts#L22) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) diff --git a/docs/reference/interfaces/TableOptions_RowExpanding.md b/docs/reference/interfaces/TableOptions_RowExpanding.md new file mode 100644 index 0000000000..14e411901f --- /dev/null +++ b/docs/reference/interfaces/TableOptions_RowExpanding.md @@ -0,0 +1,122 @@ +--- +id: TableOptions_RowExpanding +title: TableOptions_RowExpanding +--- + +# Interface: TableOptions\_RowExpanding\ + +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:37](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L37) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### autoResetExpanded? + +```ts +optional autoResetExpanded: boolean; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:44](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L44) + +Enable this setting to automatically reset the expanded state of the table when expanding state changes. + +*** + +### enableExpanding? + +```ts +optional enableExpanding: boolean; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:48](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L48) + +Enable/disable expanding for all rows. + +*** + +### getIsRowExpanded()? + +```ts +optional getIsRowExpanded: (row) => boolean; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:52](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L52) + +If provided, allows you to override the default behavior of determining whether a row is currently expanded. + +#### Parameters + +##### row + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +#### Returns + +`boolean` + +*** + +### getRowCanExpand()? + +```ts +optional getRowCanExpand: (row) => boolean; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:56](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L56) + +If provided, allows you to override the default behavior of determining whether a row can be expanded. + +#### Parameters + +##### row + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +#### Returns + +`boolean` + +*** + +### manualExpanding? + +```ts +optional manualExpanding: boolean; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:60](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L60) + +Enables manual row expansion. If this is set to `true`, `getExpandedRowModel` will not be used to expand rows and you would be expected to perform the expansion in your own data model. This is useful if you are doing server-side expansion. + +*** + +### onExpandedChange? + +```ts +optional onExpandedChange: OnChangeFn; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:64](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L64) + +This function is called when the `expanded` table state changes. If a function is provided, you will be responsible for managing this state on your own. To pass the managed state back to the table, use the `tableOptions.state.expanded` option. + +*** + +### paginateExpandedRows? + +```ts +optional paginateExpandedRows: boolean; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:68](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L68) + +If `true` expanded rows will be paginated along with the rest of the table (which means expanded rows may span multiple pages). If `false` expanded rows will not be considered for pagination (which means expanded rows will always render on their parents page. This also means more rows will be rendered than the set page size) diff --git a/docs/reference/interfaces/TableOptions_RowPagination.md b/docs/reference/interfaces/TableOptions_RowPagination.md new file mode 100644 index 0000000000..faf7c8dda7 --- /dev/null +++ b/docs/reference/interfaces/TableOptions_RowPagination.md @@ -0,0 +1,68 @@ +--- +id: TableOptions_RowPagination +title: TableOptions_RowPagination +--- + +# Interface: TableOptions\_RowPagination + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L15) + +## Properties + +### autoResetPageIndex? + +```ts +optional autoResetPageIndex: boolean; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:19](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L19) + +If set to `true`, pagination will be reset to the first page when page-altering state changes eg. `data` is updated, filters change, grouping changes, etc. + +*** + +### manualPagination? + +```ts +optional manualPagination: boolean; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:23](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L23) + +Enables manual pagination. If this option is set to `true`, the table will not automatically paginate rows using `getPaginatedRowModel()` and instead will expect you to manually paginate the rows before passing them to the table. This is useful if you are doing server-side pagination and aggregation. + +*** + +### onPaginationChange? + +```ts +optional onPaginationChange: OnChangeFn; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L27) + +If this function is provided, it will be called when the pagination state changes and you will be expected to manage the state yourself. You can pass the managed state back to the table via the `tableOptions.state.pagination` option. + +*** + +### pageCount? + +```ts +optional pageCount: number; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:31](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L31) + +When manually controlling pagination, you can supply a total `pageCount` value to the table if you know it (Or supply a `rowCount` and `pageCount` will be calculated). If you do not know how many pages there are, you can set this to `-1`. + +*** + +### rowCount? + +```ts +optional rowCount: number; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:35](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L35) + +When manually controlling pagination, you can supply a total `rowCount` value to the table if you know it. The `pageCount` can be calculated from this value and the `pageSize`. diff --git a/docs/reference/interfaces/TableOptions_RowPinning.md b/docs/reference/interfaces/TableOptions_RowPinning.md new file mode 100644 index 0000000000..fdaec54fc9 --- /dev/null +++ b/docs/reference/interfaces/TableOptions_RowPinning.md @@ -0,0 +1,54 @@ +--- +id: TableOptions_RowPinning +title: TableOptions_RowPinning +--- + +# Interface: TableOptions\_RowPinning\ + +Defined in: [features/row-pinning/rowPinningFeature.types.ts:16](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L16) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### enableRowPinning? + +```ts +optional enableRowPinning: boolean | (row) => boolean; +``` + +Defined in: [features/row-pinning/rowPinningFeature.types.ts:23](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L23) + +Enables/disables row pinning for the table. Defaults to `true`. + +*** + +### keepPinnedRows? + +```ts +optional keepPinnedRows: boolean; +``` + +Defined in: [features/row-pinning/rowPinningFeature.types.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L27) + +When `false`, pinned rows will not be visible if they are filtered or paginated out of the table. When `true`, pinned rows will always be visible regardless of filtering or pagination. Defaults to `true`. + +*** + +### onRowPinningChange? + +```ts +optional onRowPinningChange: OnChangeFn; +``` + +Defined in: [features/row-pinning/rowPinningFeature.types.ts:31](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L31) + +If provided, this function will be called with an `updaterFn` when `state.rowPinning` changes. This overrides the default internal state management, so you will also need to supply `state.rowPinning` from your own managed state. diff --git a/docs/reference/interfaces/TableOptions_RowSelection.md b/docs/reference/interfaces/TableOptions_RowSelection.md new file mode 100644 index 0000000000..ceecea0860 --- /dev/null +++ b/docs/reference/interfaces/TableOptions_RowSelection.md @@ -0,0 +1,69 @@ +--- +id: TableOptions_RowSelection +title: TableOptions_RowSelection +--- + +# Interface: TableOptions\_RowSelection\ + +Defined in: [features/row-selection/rowSelectionFeature.types.ts:12](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L12) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### enableMultiRowSelection? + +```ts +optional enableMultiRowSelection: boolean | (row) => boolean; +``` + +Defined in: [features/row-selection/rowSelectionFeature.types.ts:20](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L20) + +- Enables/disables multiple row selection for all rows in the table OR +- A function that given a row, returns whether to enable/disable multiple row selection for that row's children/grandchildren + +*** + +### enableRowSelection? + +```ts +optional enableRowSelection: boolean | (row) => boolean; +``` + +Defined in: [features/row-selection/rowSelectionFeature.types.ts:25](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L25) + +- Enables/disables row selection for all rows in the table OR +- A function that given a row, returns whether to enable/disable row selection for that row + +*** + +### enableSubRowSelection? + +```ts +optional enableSubRowSelection: boolean | (row) => boolean; +``` + +Defined in: [features/row-selection/rowSelectionFeature.types.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L30) + +Enables/disables automatic sub-row selection when a parent row is selected, or a function that enables/disables automatic sub-row selection for each row. +(Use in combination with expanding or grouping features) + +*** + +### onRowSelectionChange? + +```ts +optional onRowSelectionChange: OnChangeFn; +``` + +Defined in: [features/row-selection/rowSelectionFeature.types.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L34) + +If provided, this function will be called with an `updaterFn` when `state.rowSelection` changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table. diff --git a/docs/reference/interfaces/TableOptions_RowSorting.md b/docs/reference/interfaces/TableOptions_RowSorting.md new file mode 100644 index 0000000000..3a9bb53eb5 --- /dev/null +++ b/docs/reference/interfaces/TableOptions_RowSorting.md @@ -0,0 +1,128 @@ +--- +id: TableOptions_RowSorting +title: TableOptions_RowSorting +--- + +# Interface: TableOptions\_RowSorting + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:143](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L143) + +## Properties + +### enableMultiRemove? + +```ts +optional enableMultiRemove: boolean; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:147](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L147) + +Enables/disables the ability to remove multi-sorts + +*** + +### enableMultiSort? + +```ts +optional enableMultiSort: boolean; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:151](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L151) + +Enables/Disables multi-sorting for the table. + +*** + +### enableSorting? + +```ts +optional enableSorting: boolean; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:155](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L155) + +Enables/Disables sorting for the table. + +*** + +### enableSortingRemoval? + +```ts +optional enableSortingRemoval: boolean; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:161](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L161) + +Enables/Disables the ability to remove sorting for the table. +- If `true` then changing sort order will circle like: 'none' -> 'desc' -> 'asc' -> 'none' -> ... +- If `false` then changing sort order will circle like: 'none' -> 'desc' -> 'asc' -> 'desc' -> 'asc' -> ... + +*** + +### isMultiSortEvent()? + +```ts +optional isMultiSortEvent: (e) => boolean; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:165](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L165) + +Pass a custom function that will be used to determine if a multi-sort event should be triggered. It is passed the event from the sort toggle handler and should return `true` if the event should trigger a multi-sort. + +#### Parameters + +##### e + +`unknown` + +#### Returns + +`boolean` + +*** + +### manualSorting? + +```ts +optional manualSorting: boolean; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:169](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L169) + +Enables manual sorting for the table. If this is `true`, you will be expected to sort your data before it is passed to the table. This is useful if you are doing server-side sorting. + +*** + +### maxMultiSortColCount? + +```ts +optional maxMultiSortColCount: number; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:173](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L173) + +Set a maximum number of columns that can be multi-sorted. + +*** + +### onSortingChange? + +```ts +optional onSortingChange: OnChangeFn; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:177](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L177) + +If provided, this function will be called with an `updaterFn` when `state.sorting` changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table. + +*** + +### sortDescFirst? + +```ts +optional sortDescFirst: boolean; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:181](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L181) + +If `true`, all sorts will default to descending as their first toggle state. diff --git a/docs/reference/interfaces/TableOptions_Rows.md b/docs/reference/interfaces/TableOptions_Rows.md new file mode 100644 index 0000000000..232a3fa0d1 --- /dev/null +++ b/docs/reference/interfaces/TableOptions_Rows.md @@ -0,0 +1,90 @@ +--- +id: TableOptions_Rows +title: TableOptions_Rows +--- + +# Interface: TableOptions\_Rows\ + +Defined in: [core/rows/coreRowsFeature.types.ts:82](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L82) + +## Extended by + +- [`TableOptions_Core`](TableOptions_Core.md) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### getRowId()? + +```ts +optional getRowId: (originalRow, index, parent?) => string; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:90](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L90) + +This optional function is used to derive a unique ID for any given row. If not provided the rows index is used (nested rows join together with `.` using their grandparents' index eg. `index.index.index`). If you need to identify individual rows that are originating from any server-side operations, it's suggested you use this function to return an ID that makes sense regardless of network IO/ambiguity eg. a userId, taskId, database ID field, etc. + +#### Parameters + +##### originalRow + +`TData` + +##### index + +`number` + +##### parent? + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +#### Returns + +`string` + +#### Example + +```ts +getRowId: row => row.userId +``` + +*** + +### getSubRows()? + +```ts +optional getSubRows: (originalRow, index) => readonly TData[] | undefined; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:99](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L99) + +This optional function is used to access the sub rows for any given row. If you are using nested rows, you will need to use this function to return the sub rows object (or undefined) from the row. + +#### Parameters + +##### originalRow + +`TData` + +##### index + +`number` + +#### Returns + +readonly `TData`[] \| `undefined` + +#### Example + +```ts +getSubRows: row => row.subRows +``` diff --git a/docs/reference/interfaces/TableOptions_Table.md b/docs/reference/interfaces/TableOptions_Table.md new file mode 100644 index 0000000000..5914559720 --- /dev/null +++ b/docs/reference/interfaces/TableOptions_Table.md @@ -0,0 +1,145 @@ +--- +id: TableOptions_Table +title: TableOptions_Table +--- + +# Interface: TableOptions\_Table\ + +Defined in: [core/table/coreTablesFeature.types.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L15) + +## Extended by + +- [`TableOptions_Core`](TableOptions_Core.md) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### \_features + +```ts +_features: TFeatures; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L22) + +The features that you want to enable for the table. + +*** + +### \_rowModels? + +```ts +optional _rowModels: CreateRowModels_All; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L26) + +The row model options that you want to enable for the table. + +*** + +### autoResetAll? + +```ts +optional autoResetAll: boolean; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L30) + +Set this option to override any of the `autoReset...` feature options. + +*** + +### data + +```ts +data: readonly TData[]; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L34) + +The data for the table to display. When the `data` option changes reference, the table will reprocess the data. + +*** + +### initialState? + +```ts +optional initialState: Partial>; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:39](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L39) + +Use this option to optionally pass initial state to the table. This state will be used when resetting various table states either automatically by the table (eg. `options.autoResetPageIndex`) or via functions like `table.resetRowSelection()`. Most reset function allow you optionally pass a flag to reset to a blank/default state instead of the initial state. +Table state will not be reset when this object changes, which also means that the initial state object does not need to be stable. + +*** + +### mergeOptions()? + +```ts +optional mergeOptions: (defaultOptions, options) => TableOptions; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:43](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L43) + +This option is used to optionally implement the merging of table options. + +#### Parameters + +##### defaultOptions + +[`TableOptions`](../type-aliases/TableOptions.md)\<`TFeatures`, `TData`\> + +##### options + +`Partial`\<[`TableOptions`](../type-aliases/TableOptions.md)\<`TFeatures`, `TData`\>\> + +#### Returns + +[`TableOptions`](../type-aliases/TableOptions.md)\<`TFeatures`, `TData`\> + +*** + +### meta? + +```ts +optional meta: TableMeta; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:50](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L50) + +You can pass any object to `options.meta` and access it anywhere the `table` is available via `table.options.meta`. + +*** + +### state? + +```ts +optional state: Partial>; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:54](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L54) + +Pass in individual self-managed state to the table. + +*** + +### store? + +```ts +optional store: Store>; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:58](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L58) + +Optionally, provide your own external TanStack Store instance if you want to manage the table state externally. diff --git a/docs/reference/interfaces/TableState_ColumnFiltering.md b/docs/reference/interfaces/TableState_ColumnFiltering.md new file mode 100644 index 0000000000..16e4146660 --- /dev/null +++ b/docs/reference/interfaces/TableState_ColumnFiltering.md @@ -0,0 +1,18 @@ +--- +id: TableState_ColumnFiltering +title: TableState_ColumnFiltering +--- + +# Interface: TableState\_ColumnFiltering + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:18](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L18) + +## Properties + +### columnFilters + +```ts +columnFilters: ColumnFiltersState; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:19](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L19) diff --git a/docs/reference/interfaces/TableState_ColumnGrouping.md b/docs/reference/interfaces/TableState_ColumnGrouping.md new file mode 100644 index 0000000000..ab7605d5ef --- /dev/null +++ b/docs/reference/interfaces/TableState_ColumnGrouping.md @@ -0,0 +1,18 @@ +--- +id: TableState_ColumnGrouping +title: TableState_ColumnGrouping +--- + +# Interface: TableState\_ColumnGrouping + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:17](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L17) + +## Properties + +### grouping + +```ts +grouping: GroupingState; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:18](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L18) diff --git a/docs/reference/interfaces/TableState_ColumnOrdering.md b/docs/reference/interfaces/TableState_ColumnOrdering.md new file mode 100644 index 0000000000..805e587675 --- /dev/null +++ b/docs/reference/interfaces/TableState_ColumnOrdering.md @@ -0,0 +1,18 @@ +--- +id: TableState_ColumnOrdering +title: TableState_ColumnOrdering +--- + +# Interface: TableState\_ColumnOrdering + +Defined in: [features/column-ordering/columnOrderingFeature.types.ts:7](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L7) + +## Properties + +### columnOrder + +```ts +columnOrder: ColumnOrderState; +``` + +Defined in: [features/column-ordering/columnOrderingFeature.types.ts:8](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L8) diff --git a/docs/reference/interfaces/TableState_ColumnPinning.md b/docs/reference/interfaces/TableState_ColumnPinning.md new file mode 100644 index 0000000000..305207947d --- /dev/null +++ b/docs/reference/interfaces/TableState_ColumnPinning.md @@ -0,0 +1,18 @@ +--- +id: TableState_ColumnPinning +title: TableState_ColumnPinning +--- + +# Interface: TableState\_ColumnPinning + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L15) + +## Properties + +### columnPinning + +```ts +columnPinning: ColumnPinningState; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:16](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L16) diff --git a/docs/reference/interfaces/TableState_ColumnResizing.md b/docs/reference/interfaces/TableState_ColumnResizing.md new file mode 100644 index 0000000000..3a5119ade5 --- /dev/null +++ b/docs/reference/interfaces/TableState_ColumnResizing.md @@ -0,0 +1,18 @@ +--- +id: TableState_ColumnResizing +title: TableState_ColumnResizing +--- + +# Interface: TableState\_ColumnResizing + +Defined in: [features/column-resizing/columnResizingFeature.types.ts:3](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L3) + +## Properties + +### columnResizing + +```ts +columnResizing: columnResizingState; +``` + +Defined in: [features/column-resizing/columnResizingFeature.types.ts:4](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L4) diff --git a/docs/reference/interfaces/TableState_ColumnSizing.md b/docs/reference/interfaces/TableState_ColumnSizing.md new file mode 100644 index 0000000000..ec1ca1803a --- /dev/null +++ b/docs/reference/interfaces/TableState_ColumnSizing.md @@ -0,0 +1,18 @@ +--- +id: TableState_ColumnSizing +title: TableState_ColumnSizing +--- + +# Interface: TableState\_ColumnSizing + +Defined in: [features/column-sizing/columnSizingFeature.types.ts:4](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L4) + +## Properties + +### columnSizing + +```ts +columnSizing: ColumnSizingState; +``` + +Defined in: [features/column-sizing/columnSizingFeature.types.ts:5](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L5) diff --git a/docs/reference/interfaces/TableState_ColumnVisibility.md b/docs/reference/interfaces/TableState_ColumnVisibility.md new file mode 100644 index 0000000000..398c53102c --- /dev/null +++ b/docs/reference/interfaces/TableState_ColumnVisibility.md @@ -0,0 +1,18 @@ +--- +id: TableState_ColumnVisibility +title: TableState_ColumnVisibility +--- + +# Interface: TableState\_ColumnVisibility + +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:8](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L8) + +## Properties + +### columnVisibility + +```ts +columnVisibility: ColumnVisibilityState; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:9](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L9) diff --git a/docs/reference/interfaces/TableState_GlobalFiltering.md b/docs/reference/interfaces/TableState_GlobalFiltering.md new file mode 100644 index 0000000000..743bd69f0c --- /dev/null +++ b/docs/reference/interfaces/TableState_GlobalFiltering.md @@ -0,0 +1,18 @@ +--- +id: TableState_GlobalFiltering +title: TableState_GlobalFiltering +--- + +# Interface: TableState\_GlobalFiltering + +Defined in: [features/global-filtering/globalFilteringFeature.types.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L14) + +## Properties + +### globalFilter + +```ts +globalFilter: any; +``` + +Defined in: [features/global-filtering/globalFilteringFeature.types.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L15) diff --git a/docs/reference/interfaces/TableState_Plugins.md b/docs/reference/interfaces/TableState_Plugins.md new file mode 100644 index 0000000000..ba298669ee --- /dev/null +++ b/docs/reference/interfaces/TableState_Plugins.md @@ -0,0 +1,17 @@ +--- +id: TableState_Plugins +title: TableState_Plugins +--- + +# Interface: TableState\_Plugins\ + +Defined in: [types/TableState.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableState.ts#L21) + +Use this interface as a target for declaration merging to add your own state properties. +Note: This will affect the types of all tables in your project. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) diff --git a/docs/reference/interfaces/TableState_RowExpanding.md b/docs/reference/interfaces/TableState_RowExpanding.md new file mode 100644 index 0000000000..f644139305 --- /dev/null +++ b/docs/reference/interfaces/TableState_RowExpanding.md @@ -0,0 +1,18 @@ +--- +id: TableState_RowExpanding +title: TableState_RowExpanding +--- + +# Interface: TableState\_RowExpanding + +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L10) + +## Properties + +### expanded + +```ts +expanded: ExpandedState; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L11) diff --git a/docs/reference/interfaces/TableState_RowPagination.md b/docs/reference/interfaces/TableState_RowPagination.md new file mode 100644 index 0000000000..d7581a58e8 --- /dev/null +++ b/docs/reference/interfaces/TableState_RowPagination.md @@ -0,0 +1,18 @@ +--- +id: TableState_RowPagination +title: TableState_RowPagination +--- + +# Interface: TableState\_RowPagination + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L11) + +## Properties + +### pagination + +```ts +pagination: PaginationState; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:12](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L12) diff --git a/docs/reference/interfaces/TableState_RowPinning.md b/docs/reference/interfaces/TableState_RowPinning.md new file mode 100644 index 0000000000..5a88ccec43 --- /dev/null +++ b/docs/reference/interfaces/TableState_RowPinning.md @@ -0,0 +1,18 @@ +--- +id: TableState_RowPinning +title: TableState_RowPinning +--- + +# Interface: TableState\_RowPinning + +Defined in: [features/row-pinning/rowPinningFeature.types.ts:12](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L12) + +## Properties + +### rowPinning + +```ts +rowPinning: RowPinningState; +``` + +Defined in: [features/row-pinning/rowPinningFeature.types.ts:13](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L13) diff --git a/docs/reference/interfaces/TableState_RowSelection.md b/docs/reference/interfaces/TableState_RowSelection.md new file mode 100644 index 0000000000..eb3ea16b29 --- /dev/null +++ b/docs/reference/interfaces/TableState_RowSelection.md @@ -0,0 +1,18 @@ +--- +id: TableState_RowSelection +title: TableState_RowSelection +--- + +# Interface: TableState\_RowSelection + +Defined in: [features/row-selection/rowSelectionFeature.types.ts:8](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L8) + +## Properties + +### rowSelection + +```ts +rowSelection: RowSelectionState; +``` + +Defined in: [features/row-selection/rowSelectionFeature.types.ts:9](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L9) diff --git a/docs/reference/interfaces/TableState_RowSorting.md b/docs/reference/interfaces/TableState_RowSorting.md new file mode 100644 index 0000000000..252d9a7611 --- /dev/null +++ b/docs/reference/interfaces/TableState_RowSorting.md @@ -0,0 +1,18 @@ +--- +id: TableState_RowSorting +title: TableState_RowSorting +--- + +# Interface: TableState\_RowSorting + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:17](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L17) + +## Properties + +### sorting + +```ts +sorting: SortingState; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:18](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L18) diff --git a/docs/reference/interfaces/Table_ColumnFaceting.md b/docs/reference/interfaces/Table_ColumnFaceting.md new file mode 100644 index 0000000000..0f8385afea --- /dev/null +++ b/docs/reference/interfaces/Table_ColumnFaceting.md @@ -0,0 +1,66 @@ +--- +id: Table_ColumnFaceting +title: Table_ColumnFaceting +--- + +# Interface: Table\_ColumnFaceting\ + +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:81](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L81) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### getGlobalFacetedMinMaxValues() + +```ts +getGlobalFacetedMinMaxValues: () => [number, number] | undefined; +``` + +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:88](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L88) + +Returns the min and max values for the global filter. + +#### Returns + +\[`number`, `number`\] \| `undefined` + +*** + +### getGlobalFacetedRowModel() + +```ts +getGlobalFacetedRowModel: () => RowModel; +``` + +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:92](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L92) + +Returns the row model for the table after **global** filtering has been applied. + +#### Returns + +[`RowModel`](RowModel.md)\<`TFeatures`, `TData`\> + +*** + +### getGlobalFacetedUniqueValues() + +```ts +getGlobalFacetedUniqueValues: () => Map; +``` + +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:96](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L96) + +Returns the faceted unique values for the global filter. + +#### Returns + +`Map`\<`any`, `number`\> diff --git a/docs/reference/interfaces/Table_ColumnFiltering.md b/docs/reference/interfaces/Table_ColumnFiltering.md new file mode 100644 index 0000000000..193d6f9ce5 --- /dev/null +++ b/docs/reference/interfaces/Table_ColumnFiltering.md @@ -0,0 +1,52 @@ +--- +id: Table_ColumnFiltering +title: Table_ColumnFiltering +--- + +# Interface: Table\_ColumnFiltering + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:175](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L175) + +## Properties + +### resetColumnFilters() + +```ts +resetColumnFilters: (defaultState?) => void; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:179](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L179) + +Resets the **columnFilters** state to `initialState.columnFilters`, or `true` can be passed to force a default blank state reset to `[]`. + +#### Parameters + +##### defaultState? + +`boolean` + +#### Returns + +`void` + +*** + +### setColumnFilters() + +```ts +setColumnFilters: (updater) => void; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:183](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L183) + +Sets or updates the `state.columnFilters` state. + +#### Parameters + +##### updater + +[`Updater`](../type-aliases/Updater.md)\<[`ColumnFiltersState`](../type-aliases/ColumnFiltersState.md)\> + +#### Returns + +`void` diff --git a/docs/reference/interfaces/Table_ColumnGrouping.md b/docs/reference/interfaces/Table_ColumnGrouping.md new file mode 100644 index 0000000000..efcec9ca0d --- /dev/null +++ b/docs/reference/interfaces/Table_ColumnGrouping.md @@ -0,0 +1,62 @@ +--- +id: Table_ColumnGrouping +title: Table_ColumnGrouping +--- + +# Interface: Table\_ColumnGrouping\ + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:173](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L173) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### resetGrouping() + +```ts +resetGrouping: (defaultState?) => void; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:180](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L180) + +Resets the **grouping** state to `initialState.grouping`, or `true` can be passed to force a default blank state reset to `[]`. + +#### Parameters + +##### defaultState? + +`boolean` + +#### Returns + +`void` + +*** + +### setGrouping() + +```ts +setGrouping: (updater) => void; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:184](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L184) + +Updates the grouping state of the table via an update function or value. + +#### Parameters + +##### updater + +[`Updater`](../type-aliases/Updater.md)\<[`GroupingState`](../type-aliases/GroupingState.md)\> + +#### Returns + +`void` diff --git a/docs/reference/interfaces/Table_ColumnOrdering.md b/docs/reference/interfaces/Table_ColumnOrdering.md new file mode 100644 index 0000000000..7a3367bae3 --- /dev/null +++ b/docs/reference/interfaces/Table_ColumnOrdering.md @@ -0,0 +1,62 @@ +--- +id: Table_ColumnOrdering +title: Table_ColumnOrdering +--- + +# Interface: Table\_ColumnOrdering\ + +Defined in: [features/column-ordering/columnOrderingFeature.types.ts:37](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L37) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### resetColumnOrder() + +```ts +resetColumnOrder: (defaultState?) => void; +``` + +Defined in: [features/column-ordering/columnOrderingFeature.types.ts:44](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L44) + +Resets the **columnOrder** state to `initialState.columnOrder`, or `true` can be passed to force a default blank state reset to `[]`. + +#### Parameters + +##### defaultState? + +`boolean` + +#### Returns + +`void` + +*** + +### setColumnOrder() + +```ts +setColumnOrder: (updater) => void; +``` + +Defined in: [features/column-ordering/columnOrderingFeature.types.ts:48](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L48) + +Sets or updates the `state.columnOrder` state. + +#### Parameters + +##### updater + +[`Updater`](../type-aliases/Updater.md)\<[`ColumnOrderState`](../type-aliases/ColumnOrderState.md)\> + +#### Returns + +`void` diff --git a/docs/reference/interfaces/Table_ColumnPinning.md b/docs/reference/interfaces/Table_ColumnPinning.md new file mode 100644 index 0000000000..578ab0fe66 --- /dev/null +++ b/docs/reference/interfaces/Table_ColumnPinning.md @@ -0,0 +1,412 @@ +--- +id: Table_ColumnPinning +title: Table_ColumnPinning +--- + +# Interface: Table\_ColumnPinning\ + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:78](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L78) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### getCenterFlatHeaders() + +```ts +getCenterFlatHeaders: () => Header[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:85](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L85) + +If pinning, returns headers for all columns that are not pinned, including parent headers. + +#### Returns + +[`Header`](../type-aliases/Header.md)\<`TFeatures`, `TData`, `unknown`\>[] + +*** + +### getCenterFooterGroups() + +```ts +getCenterFooterGroups: () => HeaderGroup[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:89](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L89) + +If pinning, returns the footer groups for columns that are not pinned. + +#### Returns + +[`HeaderGroup`](../type-aliases/HeaderGroup.md)\<`TFeatures`, `TData`\>[] + +*** + +### getCenterHeaderGroups() + +```ts +getCenterHeaderGroups: () => HeaderGroup[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:93](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L93) + +If pinning, returns the header groups for columns that are not pinned. + +#### Returns + +[`HeaderGroup`](../type-aliases/HeaderGroup.md)\<`TFeatures`, `TData`\>[] + +*** + +### getCenterLeafColumns() + +```ts +getCenterLeafColumns: () => Column[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:97](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L97) + +Returns all center pinned (unpinned) leaf columns. + +#### Returns + +[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `unknown`\>[] + +*** + +### getCenterLeafHeaders() + +```ts +getCenterLeafHeaders: () => Header[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:101](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L101) + +If pinning, returns headers for all columns that are not pinned, (not including parent headers). + +#### Returns + +[`Header`](../type-aliases/Header.md)\<`TFeatures`, `TData`, `unknown`\>[] + +*** + +### getCenterVisibleLeafColumns() + +```ts +getCenterVisibleLeafColumns: () => Column[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:105](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L105) + +If column pinning, returns a flat array of leaf-node columns that are visible in the unpinned/center portion of the table. + +#### Returns + +[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `unknown`\>[] + +*** + +### getIsSomeColumnsPinned() + +```ts +getIsSomeColumnsPinned: (position?) => boolean; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:109](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L109) + +Returns whether or not any columns are pinned. Optionally specify to only check for pinned columns in either the `left` or `right` position. + +#### Parameters + +##### position? + +[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) + +#### Returns + +`boolean` + +*** + +### getLeftFlatHeaders() + +```ts +getLeftFlatHeaders: () => Header[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:113](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L113) + +If pinning, returns headers for all left pinned columns in the table, including parent headers. + +#### Returns + +[`Header`](../type-aliases/Header.md)\<`TFeatures`, `TData`, `unknown`\>[] + +*** + +### getLeftFooterGroups() + +```ts +getLeftFooterGroups: () => HeaderGroup[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:117](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L117) + +If pinning, returns the footer groups for the left pinned columns. + +#### Returns + +[`HeaderGroup`](../type-aliases/HeaderGroup.md)\<`TFeatures`, `TData`\>[] + +*** + +### getLeftHeaderGroups() + +```ts +getLeftHeaderGroups: () => HeaderGroup[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:121](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L121) + +If pinning, returns the header groups for the left pinned columns. + +#### Returns + +[`HeaderGroup`](../type-aliases/HeaderGroup.md)\<`TFeatures`, `TData`\>[] + +*** + +### getLeftLeafColumns() + +```ts +getLeftLeafColumns: () => Column[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:125](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L125) + +Returns all left pinned leaf columns. + +#### Returns + +[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `unknown`\>[] + +*** + +### getLeftLeafHeaders() + +```ts +getLeftLeafHeaders: () => Header[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:129](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L129) + +If pinning, returns headers for all left pinned leaf columns in the table, (not including parent headers). + +#### Returns + +[`Header`](../type-aliases/Header.md)\<`TFeatures`, `TData`, `unknown`\>[] + +*** + +### getLeftVisibleLeafColumns() + +```ts +getLeftVisibleLeafColumns: () => Column[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:133](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L133) + +If column pinning, returns a flat array of leaf-node columns that are visible in the left portion of the table. + +#### Returns + +[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `unknown`\>[] + +*** + +### getPinnedLeafColumns() + +```ts +getPinnedLeafColumns: (position) => Column[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:168](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L168) + +#### Parameters + +##### position + +[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) | `"center"` + +#### Returns + +[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `unknown`\>[] + +*** + +### getPinnedVisibleLeafColumns() + +```ts +getPinnedVisibleLeafColumns: (position) => Column[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:173](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L173) + +#### Parameters + +##### position + +[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) | `"center"` + +#### Returns + +[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `unknown`\>[] + +*** + +### getRightFlatHeaders() + +```ts +getRightFlatHeaders: () => Header[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:137](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L137) + +If pinning, returns headers for all right pinned columns in the table, including parent headers. + +#### Returns + +[`Header`](../type-aliases/Header.md)\<`TFeatures`, `TData`, `unknown`\>[] + +*** + +### getRightFooterGroups() + +```ts +getRightFooterGroups: () => HeaderGroup[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:141](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L141) + +If pinning, returns the footer groups for the right pinned columns. + +#### Returns + +[`HeaderGroup`](../type-aliases/HeaderGroup.md)\<`TFeatures`, `TData`\>[] + +*** + +### getRightHeaderGroups() + +```ts +getRightHeaderGroups: () => HeaderGroup[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:145](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L145) + +If pinning, returns the header groups for the right pinned columns. + +#### Returns + +[`HeaderGroup`](../type-aliases/HeaderGroup.md)\<`TFeatures`, `TData`\>[] + +*** + +### getRightLeafColumns() + +```ts +getRightLeafColumns: () => Column[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:149](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L149) + +Returns all right pinned leaf columns. + +#### Returns + +[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `unknown`\>[] + +*** + +### getRightLeafHeaders() + +```ts +getRightLeafHeaders: () => Header[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:153](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L153) + +If pinning, returns headers for all right pinned leaf columns in the table, (not including parent headers). + +#### Returns + +[`Header`](../type-aliases/Header.md)\<`TFeatures`, `TData`, `unknown`\>[] + +*** + +### getRightVisibleLeafColumns() + +```ts +getRightVisibleLeafColumns: () => Column[]; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:157](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L157) + +If column pinning, returns a flat array of leaf-node columns that are visible in the right portion of the table. + +#### Returns + +[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `unknown`\>[] + +*** + +### resetColumnPinning() + +```ts +resetColumnPinning: (defaultState?) => void; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:161](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L161) + +Resets the **columnPinning** state to `initialState.columnPinning`, or `true` can be passed to force a default blank state reset to `{ left: [], right: [], }`. + +#### Parameters + +##### defaultState? + +`boolean` + +#### Returns + +`void` + +*** + +### setColumnPinning() + +```ts +setColumnPinning: (updater) => void; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:165](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L165) + +Sets or updates the `state.columnPinning` state. + +#### Parameters + +##### updater + +[`Updater`](../type-aliases/Updater.md)\<[`ColumnPinningState`](ColumnPinningState.md)\> + +#### Returns + +`void` diff --git a/docs/reference/interfaces/Table_ColumnResizing.md b/docs/reference/interfaces/Table_ColumnResizing.md new file mode 100644 index 0000000000..efaa8d8786 --- /dev/null +++ b/docs/reference/interfaces/Table_ColumnResizing.md @@ -0,0 +1,52 @@ +--- +id: Table_ColumnResizing +title: Table_ColumnResizing +--- + +# Interface: Table\_ColumnResizing + +Defined in: [features/column-resizing/columnResizingFeature.types.ts:44](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L44) + +## Properties + +### resetHeaderSizeInfo() + +```ts +resetHeaderSizeInfo: (defaultState?) => void; +``` + +Defined in: [features/column-resizing/columnResizingFeature.types.ts:48](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L48) + +Resets column sizing info to its initial state. If `defaultState` is `true`, the default state for the table will be used instead of the initialValue provided to the table. + +#### Parameters + +##### defaultState? + +`boolean` + +#### Returns + +`void` + +*** + +### setcolumnResizing() + +```ts +setcolumnResizing: (updater) => void; +``` + +Defined in: [features/column-resizing/columnResizingFeature.types.ts:52](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L52) + +Sets the column sizing info state using an updater function or a value. This will trigger the underlying `oncolumnResizingChange` function if one is passed to the table options, otherwise the state will be managed automatically by the table. + +#### Parameters + +##### updater + +[`Updater`](../type-aliases/Updater.md)\<[`columnResizingState`](columnResizingState.md)\> + +#### Returns + +`void` diff --git a/docs/reference/interfaces/Table_ColumnSizing.md b/docs/reference/interfaces/Table_ColumnSizing.md new file mode 100644 index 0000000000..b5fdf4cdbb --- /dev/null +++ b/docs/reference/interfaces/Table_ColumnSizing.md @@ -0,0 +1,116 @@ +--- +id: Table_ColumnSizing +title: Table_ColumnSizing +--- + +# Interface: Table\_ColumnSizing + +Defined in: [features/column-sizing/columnSizingFeature.types.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L22) + +## Properties + +### getCenterTotalSize() + +```ts +getCenterTotalSize: () => number; +``` + +Defined in: [features/column-sizing/columnSizingFeature.types.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L26) + +If pinning, returns the total size of the center portion of the table by calculating the sum of the sizes of all unpinned/center leaf-columns. + +#### Returns + +`number` + +*** + +### getLeftTotalSize() + +```ts +getLeftTotalSize: () => number; +``` + +Defined in: [features/column-sizing/columnSizingFeature.types.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L30) + +Returns the total size of the left portion of the table by calculating the sum of the sizes of all left leaf-columns. + +#### Returns + +`number` + +*** + +### getRightTotalSize() + +```ts +getRightTotalSize: () => number; +``` + +Defined in: [features/column-sizing/columnSizingFeature.types.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L34) + +Returns the total size of the right portion of the table by calculating the sum of the sizes of all right leaf-columns. + +#### Returns + +`number` + +*** + +### getTotalSize() + +```ts +getTotalSize: () => number; +``` + +Defined in: [features/column-sizing/columnSizingFeature.types.ts:38](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L38) + +Returns the total size of the table by calculating the sum of the sizes of all leaf-columns. + +#### Returns + +`number` + +*** + +### resetColumnSizing() + +```ts +resetColumnSizing: (defaultState?) => void; +``` + +Defined in: [features/column-sizing/columnSizingFeature.types.ts:42](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L42) + +Resets column sizing to its initial state. If `defaultState` is `true`, the default state for the table will be used instead of the initialValue provided to the table. + +#### Parameters + +##### defaultState? + +`boolean` + +#### Returns + +`void` + +*** + +### setColumnSizing() + +```ts +setColumnSizing: (updater) => void; +``` + +Defined in: [features/column-sizing/columnSizingFeature.types.ts:46](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L46) + +Sets the column sizing state using an updater function or a value. This will trigger the underlying `onColumnSizingChange` function if one is passed to the table options, otherwise the state will be managed automatically by the table. + +#### Parameters + +##### updater + +[`Updater`](../type-aliases/Updater.md)\<[`ColumnSizingState`](../type-aliases/ColumnSizingState.md)\> + +#### Returns + +`void` diff --git a/docs/reference/interfaces/Table_ColumnVisibility.md b/docs/reference/interfaces/Table_ColumnVisibility.md new file mode 100644 index 0000000000..0308854161 --- /dev/null +++ b/docs/reference/interfaces/Table_ColumnVisibility.md @@ -0,0 +1,176 @@ +--- +id: Table_ColumnVisibility +title: Table_ColumnVisibility +--- + +# Interface: Table\_ColumnVisibility\ + +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:28](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L28) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### getIsAllColumnsVisible() + +```ts +getIsAllColumnsVisible: () => boolean; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:35](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L35) + +Returns whether all columns are visible + +#### Returns + +`boolean` + +*** + +### getIsSomeColumnsVisible() + +```ts +getIsSomeColumnsVisible: () => boolean; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:39](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L39) + +Returns whether any columns are visible + +#### Returns + +`boolean` + +*** + +### getToggleAllColumnsVisibilityHandler() + +```ts +getToggleAllColumnsVisibilityHandler: () => (event) => void; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:43](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L43) + +Returns a handler for toggling the visibility of all columns, meant to be bound to a `input[type=checkbox]` element. + +#### Returns + +```ts +(event): void; +``` + +##### Parameters + +###### event + +`unknown` + +##### Returns + +`void` + +*** + +### getVisibleFlatColumns() + +```ts +getVisibleFlatColumns: () => Column[]; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:47](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L47) + +Returns a flat array of columns that are visible, including parent columns. + +#### Returns + +[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `unknown`\>[] + +*** + +### getVisibleLeafColumns() + +```ts +getVisibleLeafColumns: () => Column[]; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:51](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L51) + +Returns a flat array of leaf-node columns that are visible. + +#### Returns + +[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `unknown`\>[] + +*** + +### resetColumnVisibility() + +```ts +resetColumnVisibility: (defaultState?) => void; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:55](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L55) + +Resets the column visibility state to the initial state. If `defaultState` is provided, the state will be reset to `{}` + +#### Parameters + +##### defaultState? + +`boolean` + +#### Returns + +`void` + +*** + +### setColumnVisibility() + +```ts +setColumnVisibility: (updater) => void; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:59](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L59) + +Sets or updates the `state.columnVisibility` state. + +#### Parameters + +##### updater + +[`Updater`](../type-aliases/Updater.md)\<[`ColumnVisibilityState`](../type-aliases/ColumnVisibilityState.md)\> + +#### Returns + +`void` + +*** + +### toggleAllColumnsVisible() + +```ts +toggleAllColumnsVisible: (value?) => void; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:63](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L63) + +Toggles the visibility of all columns. + +#### Parameters + +##### value? + +`boolean` + +#### Returns + +`void` diff --git a/docs/reference/interfaces/Table_Columns.md b/docs/reference/interfaces/Table_Columns.md new file mode 100644 index 0000000000..e337a16245 --- /dev/null +++ b/docs/reference/interfaces/Table_Columns.md @@ -0,0 +1,123 @@ +--- +id: Table_Columns +title: Table_Columns +--- + +# Interface: Table\_Columns\ + +Defined in: [core/columns/coreColumnsFeature.types.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L75) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### getAllColumns() + +```ts +getAllColumns: () => Column[]; +``` + +Defined in: [core/columns/coreColumnsFeature.types.ts:90](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L90) + +Returns all columns in the table in their normalized and nested hierarchy. + +#### Returns + +[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `unknown`\>[] + +*** + +### getAllFlatColumns() + +```ts +getAllFlatColumns: () => Column[]; +``` + +Defined in: [core/columns/coreColumnsFeature.types.ts:94](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L94) + +Returns all columns in the table flattened to a single level. + +#### Returns + +[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `unknown`\>[] + +*** + +### getAllFlatColumnsById() + +```ts +getAllFlatColumnsById: () => Record>; +``` + +Defined in: [core/columns/coreColumnsFeature.types.ts:82](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L82) + +Returns a map of all flat columns by their ID. + +#### Returns + +`Record`\<`string`, [`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `unknown`\>\> + +*** + +### getAllLeafColumns() + +```ts +getAllLeafColumns: () => Column[]; +``` + +Defined in: [core/columns/coreColumnsFeature.types.ts:98](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L98) + +Returns all leaf-node columns in the table flattened to a single level. This does not include parent columns. + +#### Returns + +[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `unknown`\>[] + +*** + +### getColumn() + +```ts +getColumn: (columnId) => + | Column + | undefined; +``` + +Defined in: [core/columns/coreColumnsFeature.types.ts:102](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L102) + +Returns a single column by its ID. + +#### Parameters + +##### columnId + +`string` + +#### Returns + + \| [`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `unknown`\> + \| `undefined` + +*** + +### getDefaultColumnDef() + +```ts +getDefaultColumnDef: () => Partial>; +``` + +Defined in: [core/columns/coreColumnsFeature.types.ts:86](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L86) + +Returns the default column options to use for all column defs supplied to the table. + +#### Returns + +`Partial`\<[`ColumnDef`](../type-aliases/ColumnDef.md)\<`TFeatures`, `TData`, `unknown`\>\> diff --git a/docs/reference/interfaces/Table_CoreProperties.md b/docs/reference/interfaces/Table_CoreProperties.md new file mode 100644 index 0000000000..7da3c32ffd --- /dev/null +++ b/docs/reference/interfaces/Table_CoreProperties.md @@ -0,0 +1,154 @@ +--- +id: Table_CoreProperties +title: Table_CoreProperties +--- + +# Interface: Table\_CoreProperties\ + +Defined in: [core/table/coreTablesFeature.types.ts:61](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L61) + +## Extended by + +- [`Table_Table`](Table_Table.md) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### \_cellPrototype? + +```ts +optional _cellPrototype: object; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:72](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L72) + +Prototype cache for Cell objects - shared by all cells in this table + +*** + +### \_columnPrototype? + +```ts +optional _columnPrototype: object; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:76](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L76) + +Prototype cache for Column objects - shared by all columns in this table + +*** + +### \_features + +```ts +_features: Partial & TFeatures; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:68](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L68) + +The features that are enabled for the table. + +*** + +### \_headerPrototype? + +```ts +optional _headerPrototype: object; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:80](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L80) + +Prototype cache for Header objects - shared by all headers in this table + +*** + +### \_rowModelFns + +```ts +_rowModelFns: RowModelFns; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:84](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L84) + +The row model processing functions that are used to process the data by features. + +*** + +### \_rowModels + +```ts +_rowModels: CachedRowModels; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:88](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L88) + +The row models that are enabled for the table. + +*** + +### \_rowPrototype? + +```ts +optional _rowPrototype: object; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:92](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L92) + +Prototype cache for Row objects - shared by all rows in this table + +*** + +### baseStore + +```ts +baseStore: Store>; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:96](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L96) + +The base store for the table. This can be used to write to the table state. + +*** + +### initialState + +```ts +initialState: TableState; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:100](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L100) + +This is the resolved initial state of the table. + +*** + +### options + +```ts +options: TableOptions; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:104](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L104) + +A read-only reference to the table's current options. + +*** + +### store + +```ts +store: ReadonlyStore>; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:108](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L108) + +Where the table state is stored. diff --git a/docs/reference/interfaces/Table_GlobalFiltering.md b/docs/reference/interfaces/Table_GlobalFiltering.md new file mode 100644 index 0000000000..3b31be486c --- /dev/null +++ b/docs/reference/interfaces/Table_GlobalFiltering.md @@ -0,0 +1,94 @@ +--- +id: Table_GlobalFiltering +title: Table_GlobalFiltering +--- + +# Interface: Table\_GlobalFiltering\ + +Defined in: [features/global-filtering/globalFilteringFeature.types.ts:64](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L64) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### getGlobalAutoFilterFn() + +```ts +getGlobalAutoFilterFn: () => FilterFn | undefined; +``` + +Defined in: [features/global-filtering/globalFilteringFeature.types.ts:71](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L71) + +Currently, this function returns the built-in `includesString` filter function. In future releases, it may return more dynamic filter functions based on the nature of the data provided. + +#### Returns + +[`FilterFn`](FilterFn.md)\<`TFeatures`, `TData`\> \| `undefined` + +*** + +### getGlobalFilterFn() + +```ts +getGlobalFilterFn: () => FilterFn | undefined; +``` + +Defined in: [features/global-filtering/globalFilteringFeature.types.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L75) + +Returns the filter function (either user-defined or automatic, depending on configuration) for the global filter. + +#### Returns + +[`FilterFn`](FilterFn.md)\<`TFeatures`, `TData`\> \| `undefined` + +*** + +### resetGlobalFilter() + +```ts +resetGlobalFilter: (defaultState?) => void; +``` + +Defined in: [features/global-filtering/globalFilteringFeature.types.ts:79](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L79) + +Resets the **globalFilter** state to `initialState.globalFilter`, or `true` can be passed to force a default blank state reset to `undefined`. + +#### Parameters + +##### defaultState? + +`boolean` + +#### Returns + +`void` + +*** + +### setGlobalFilter() + +```ts +setGlobalFilter: (updater) => void; +``` + +Defined in: [features/global-filtering/globalFilteringFeature.types.ts:83](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L83) + +Sets or updates the `state.globalFilter` state. + +#### Parameters + +##### updater + +`any` + +#### Returns + +`void` diff --git a/docs/reference/interfaces/Table_Headers.md b/docs/reference/interfaces/Table_Headers.md new file mode 100644 index 0000000000..96cd15bf66 --- /dev/null +++ b/docs/reference/interfaces/Table_Headers.md @@ -0,0 +1,82 @@ +--- +id: Table_Headers +title: Table_Headers +--- + +# Interface: Table\_Headers\ + +Defined in: [core/headers/coreHeadersFeature.types.ts:8](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L8) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### getFlatHeaders() + +```ts +getFlatHeaders: () => Header[]; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:23](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L23) + +Returns headers for all columns in the table, including parent headers. + +#### Returns + +[`Header`](../type-aliases/Header.md)\<`TFeatures`, `TData`, `unknown`\>[] + +*** + +### getFooterGroups() + +```ts +getFooterGroups: () => HeaderGroup[]; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:19](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L19) + +Returns the footer groups for the table. + +#### Returns + +[`HeaderGroup`](../type-aliases/HeaderGroup.md)\<`TFeatures`, `TData`\>[] + +*** + +### getHeaderGroups() + +```ts +getHeaderGroups: () => HeaderGroup[]; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L15) + +Returns all header groups for the table. + +#### Returns + +[`HeaderGroup`](../type-aliases/HeaderGroup.md)\<`TFeatures`, `TData`\>[] + +*** + +### getLeafHeaders() + +```ts +getLeafHeaders: () => Header[]; +``` + +Defined in: [core/headers/coreHeadersFeature.types.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L27) + +Returns headers for all leaf columns in the table, (not including parent headers). + +#### Returns + +[`Header`](../type-aliases/Header.md)\<`TFeatures`, `TData`, `unknown`\>[] diff --git a/docs/reference/interfaces/Table_Plugins.md b/docs/reference/interfaces/Table_Plugins.md new file mode 100644 index 0000000000..7bf41ce48f --- /dev/null +++ b/docs/reference/interfaces/Table_Plugins.md @@ -0,0 +1,21 @@ +--- +id: Table_Plugins +title: Table_Plugins +--- + +# Interface: Table\_Plugins\ + +Defined in: [types/Table.ts:32](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Table.ts#L32) + +Use this interface as a target for declaration merging to add your own plugin properties. +Note: This will affect the types of all tables in your project. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) diff --git a/docs/reference/interfaces/Table_RowExpanding.md b/docs/reference/interfaces/Table_RowExpanding.md new file mode 100644 index 0000000000..2f1f09dd02 --- /dev/null +++ b/docs/reference/interfaces/Table_RowExpanding.md @@ -0,0 +1,190 @@ +--- +id: Table_RowExpanding +title: Table_RowExpanding +--- + +# Interface: Table\_RowExpanding\ + +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:71](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L71) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### autoResetExpanded() + +```ts +autoResetExpanded: () => void; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L75) + +#### Returns + +`void` + +*** + +### getCanSomeRowsExpand() + +```ts +getCanSomeRowsExpand: () => boolean; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:79](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L79) + +Returns whether there are any rows that can be expanded. + +#### Returns + +`boolean` + +*** + +### getExpandedDepth() + +```ts +getExpandedDepth: () => number; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:83](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L83) + +Returns the maximum depth of the expanded rows. + +#### Returns + +`number` + +*** + +### getIsAllRowsExpanded() + +```ts +getIsAllRowsExpanded: () => boolean; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:87](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L87) + +Returns whether all rows are currently expanded. + +#### Returns + +`boolean` + +*** + +### getIsSomeRowsExpanded() + +```ts +getIsSomeRowsExpanded: () => boolean; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:91](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L91) + +Returns whether there are any rows that are currently expanded. + +#### Returns + +`boolean` + +*** + +### getToggleAllRowsExpandedHandler() + +```ts +getToggleAllRowsExpandedHandler: () => (event) => void; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:95](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L95) + +Returns a handler that can be used to toggle the expanded state of all rows. This handler is meant to be used with an `input[type=checkbox]` element. + +#### Returns + +```ts +(event): void; +``` + +##### Parameters + +###### event + +`unknown` + +##### Returns + +`void` + +*** + +### resetExpanded() + +```ts +resetExpanded: (defaultState?) => void; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:99](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L99) + +Resets the expanded state of the table to the initial state. + +#### Parameters + +##### defaultState? + +`boolean` + +#### Returns + +`void` + +*** + +### setExpanded() + +```ts +setExpanded: (updater) => void; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:103](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L103) + +Updates the expanded state of the table via an update function or value. + +#### Parameters + +##### updater + +[`Updater`](../type-aliases/Updater.md)\<[`ExpandedState`](../type-aliases/ExpandedState.md)\> + +#### Returns + +`void` + +*** + +### toggleAllRowsExpanded() + +```ts +toggleAllRowsExpanded: (expanded?) => void; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:107](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L107) + +Toggles the expanded state for all rows. + +#### Parameters + +##### expanded? + +`boolean` + +#### Returns + +`void` diff --git a/docs/reference/interfaces/Table_RowModels_Core.md b/docs/reference/interfaces/Table_RowModels_Core.md new file mode 100644 index 0000000000..acf2760368 --- /dev/null +++ b/docs/reference/interfaces/Table_RowModels_Core.md @@ -0,0 +1,50 @@ +--- +id: Table_RowModels_Core +title: Table_RowModels_Core +--- + +# Interface: Table\_RowModels\_Core\ + +Defined in: [core/row-models/coreRowModelsFeature.types.ts:44](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.types.ts#L44) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### getCoreRowModel() + +```ts +getCoreRowModel: () => RowModel; +``` + +Defined in: [core/row-models/coreRowModelsFeature.types.ts:51](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.types.ts#L51) + +Returns the core row model before any processing has been applied. + +#### Returns + +[`RowModel`](RowModel.md)\<`TFeatures`, `TData`\> + +*** + +### getRowModel() + +```ts +getRowModel: () => RowModel; +``` + +Defined in: [core/row-models/coreRowModelsFeature.types.ts:55](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.types.ts#L55) + +Returns the final model after all processing from other used features has been applied. This is the row model that is most commonly used for rendering. + +#### Returns + +[`RowModel`](RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/interfaces/Table_RowModels_Expanded.md b/docs/reference/interfaces/Table_RowModels_Expanded.md new file mode 100644 index 0000000000..7772a76758 --- /dev/null +++ b/docs/reference/interfaces/Table_RowModels_Expanded.md @@ -0,0 +1,50 @@ +--- +id: Table_RowModels_Expanded +title: Table_RowModels_Expanded +--- + +# Interface: Table\_RowModels\_Expanded\ + +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:110](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L110) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### getExpandedRowModel() + +```ts +getExpandedRowModel: () => RowModel; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:117](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L117) + +Returns the row model after expansion has been applied. + +#### Returns + +[`RowModel`](RowModel.md)\<`TFeatures`, `TData`\> + +*** + +### getPreExpandedRowModel() + +```ts +getPreExpandedRowModel: () => RowModel; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:121](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L121) + +Returns the row model before expansion has been applied. + +#### Returns + +[`RowModel`](RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/interfaces/Table_RowModels_Faceted.md b/docs/reference/interfaces/Table_RowModels_Faceted.md new file mode 100644 index 0000000000..b376c6548b --- /dev/null +++ b/docs/reference/interfaces/Table_RowModels_Faceted.md @@ -0,0 +1,69 @@ +--- +id: Table_RowModels_Faceted +title: Table_RowModels_Faceted +--- + +# Interface: Table\_RowModels\_Faceted\ + +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:24](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L24) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### getFacetedMinMaxValues() + +```ts +getFacetedMinMaxValues: () => [number, number] | undefined; +``` + +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:32](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L32) + +A function that **computes and returns** a min/max tuple derived from `column.getFacetedRowModel`. Useful for displaying faceted result values. +> ⚠️ Requires that you pass a valid `getFacetedMinMaxValues` function to `options.getFacetedMinMaxValues`. A default implementation is provided via the exported `getFacetedMinMaxValues` function. + +#### Returns + +\[`number`, `number`\] \| `undefined` + +*** + +### getFacetedRowModel() + +```ts +getFacetedRowModel: () => RowModel; +``` + +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:37](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L37) + +Returns the row model with all other column filters applied, excluding its own filter. Useful for displaying faceted result counts. +> ⚠️ Requires that you pass a valid `getFacetedRowModel` function to `options.facetedRowModel`. A default implementation is provided via the exported `getFacetedRowModel` function. + +#### Returns + +[`RowModel`](RowModel.md)\<`TFeatures`, `TData`\> + +*** + +### getFacetedUniqueValues() + +```ts +getFacetedUniqueValues: () => Map; +``` + +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:42](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L42) + +A function that **computes and returns** a `Map` of unique values and their occurrences derived from `column.getFacetedRowModel`. Useful for displaying faceted result values. +> ⚠️ Requires that you pass a valid `getFacetedUniqueValues` function to `options.getFacetedUniqueValues`. A default implementation is provided via the exported `getFacetedUniqueValues` function. + +#### Returns + +`Map`\<`any`, `number`\> diff --git a/docs/reference/interfaces/Table_RowModels_Filtered.md b/docs/reference/interfaces/Table_RowModels_Filtered.md new file mode 100644 index 0000000000..2f4d312791 --- /dev/null +++ b/docs/reference/interfaces/Table_RowModels_Filtered.md @@ -0,0 +1,50 @@ +--- +id: Table_RowModels_Filtered +title: Table_RowModels_Filtered +--- + +# Interface: Table\_RowModels\_Filtered\ + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:186](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L186) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### getFilteredRowModel() + +```ts +getFilteredRowModel: () => RowModel; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:193](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L193) + +Returns the row model for the table after **column** filtering has been applied. + +#### Returns + +[`RowModel`](RowModel.md)\<`TFeatures`, `TData`\> + +*** + +### getPreFilteredRowModel() + +```ts +getPreFilteredRowModel: () => RowModel; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:197](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L197) + +Returns the row model for the table before any **column** filtering has been applied. + +#### Returns + +[`RowModel`](RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/interfaces/Table_RowModels_Grouped.md b/docs/reference/interfaces/Table_RowModels_Grouped.md new file mode 100644 index 0000000000..3a70c84409 --- /dev/null +++ b/docs/reference/interfaces/Table_RowModels_Grouped.md @@ -0,0 +1,50 @@ +--- +id: Table_RowModels_Grouped +title: Table_RowModels_Grouped +--- + +# Interface: Table\_RowModels\_Grouped\ + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:187](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L187) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### getGroupedRowModel() + +```ts +getGroupedRowModel: () => RowModel; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:194](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L194) + +Returns the row model for the table after grouping has been applied. + +#### Returns + +[`RowModel`](RowModel.md)\<`TFeatures`, `TData`\> + +*** + +### getPreGroupedRowModel() + +```ts +getPreGroupedRowModel: () => RowModel; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:198](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L198) + +Returns the row model for the table before any grouping has been applied. + +#### Returns + +[`RowModel`](RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/interfaces/Table_RowModels_Paginated.md b/docs/reference/interfaces/Table_RowModels_Paginated.md new file mode 100644 index 0000000000..738a2a81d5 --- /dev/null +++ b/docs/reference/interfaces/Table_RowModels_Paginated.md @@ -0,0 +1,50 @@ +--- +id: Table_RowModels_Paginated +title: Table_RowModels_Paginated +--- + +# Interface: Table\_RowModels\_Paginated\ + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:109](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L109) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### getPaginatedRowModel() + +```ts +getPaginatedRowModel: () => RowModel; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:116](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L116) + +Returns the row model for the table after pagination has been applied. + +#### Returns + +[`RowModel`](RowModel.md)\<`TFeatures`, `TData`\> + +*** + +### getPrePaginatedRowModel() + +```ts +getPrePaginatedRowModel: () => RowModel; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:120](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L120) + +Returns the row model for the table before any pagination has been applied. + +#### Returns + +[`RowModel`](RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/interfaces/Table_RowModels_Sorted.md b/docs/reference/interfaces/Table_RowModels_Sorted.md new file mode 100644 index 0000000000..f8727300b6 --- /dev/null +++ b/docs/reference/interfaces/Table_RowModels_Sorted.md @@ -0,0 +1,50 @@ +--- +id: Table_RowModels_Sorted +title: Table_RowModels_Sorted +--- + +# Interface: Table\_RowModels\_Sorted\ + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:198](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L198) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### getPreSortedRowModel() + +```ts +getPreSortedRowModel: () => RowModel; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:205](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L205) + +Returns the row model for the table before any sorting has been applied. + +#### Returns + +[`RowModel`](RowModel.md)\<`TFeatures`, `TData`\> + +*** + +### getSortedRowModel() + +```ts +getSortedRowModel: () => RowModel; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:209](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L209) + +Returns the row model for the table after sorting has been applied. + +#### Returns + +[`RowModel`](RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/interfaces/Table_RowPagination.md b/docs/reference/interfaces/Table_RowPagination.md new file mode 100644 index 0000000000..4336d44e22 --- /dev/null +++ b/docs/reference/interfaces/Table_RowPagination.md @@ -0,0 +1,308 @@ +--- +id: Table_RowPagination +title: Table_RowPagination +--- + +# Interface: Table\_RowPagination\ + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:42](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L42) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### \_autoResetPageIndex() + +```ts +_autoResetPageIndex: () => void; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:46](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L46) + +#### Returns + +`void` + +*** + +### firstPage() + +```ts +firstPage: () => void; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:78](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L78) + +Sets the page index to `0`. + +#### Returns + +`void` + +*** + +### getCanNextPage() + +```ts +getCanNextPage: () => boolean; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:50](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L50) + +Returns whether the table can go to the next page. + +#### Returns + +`boolean` + +*** + +### getCanPreviousPage() + +```ts +getCanPreviousPage: () => boolean; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:54](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L54) + +Returns whether the table can go to the previous page. + +#### Returns + +`boolean` + +*** + +### getPageCount() + +```ts +getPageCount: () => number; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:58](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L58) + +Returns the page count. If manually paginating or controlling the pagination state, this will come directly from the `options.pageCount` table option, otherwise it will be calculated from the table data using the total row count and current page size. + +#### Returns + +`number` + +*** + +### getPageOptions() + +```ts +getPageOptions: () => number[]; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:66](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L66) + +Returns an array of page options (zero-index-based) for the current page size. + +#### Returns + +`number`[] + +*** + +### getRowCount() + +```ts +getRowCount: () => number; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:62](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L62) + +Returns the row count. If manually paginating or controlling the pagination state, this will come directly from the `options.rowCount` table option, otherwise it will be calculated from the table data. + +#### Returns + +`number` + +*** + +### lastPage() + +```ts +lastPage: () => void; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:82](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L82) + +Sets the page index to the last page. + +#### Returns + +`void` + +*** + +### nextPage() + +```ts +nextPage: () => void; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:70](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L70) + +Increments the page index by one, if possible. + +#### Returns + +`void` + +*** + +### previousPage() + +```ts +previousPage: () => void; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:74](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L74) + +Decrements the page index by one, if possible. + +#### Returns + +`void` + +*** + +### resetPageIndex() + +```ts +resetPageIndex: (defaultState?) => void; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:86](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L86) + +Resets the page index to its initial state. If `defaultState` is `true`, the page index will be reset to `0` regardless of initial state. + +#### Parameters + +##### defaultState? + +`boolean` + +#### Returns + +`void` + +*** + +### resetPageSize() + +```ts +resetPageSize: (defaultState?) => void; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:90](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L90) + +Resets the page size to its initial state. If `defaultState` is `true`, the page size will be reset to `10` regardless of initial state. + +#### Parameters + +##### defaultState? + +`boolean` + +#### Returns + +`void` + +*** + +### resetPagination() + +```ts +resetPagination: (defaultState?) => void; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:94](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L94) + +Resets the **pagination** state to `initialState.pagination`, or `true` can be passed to force a default blank state reset to `[]`. + +#### Parameters + +##### defaultState? + +`boolean` + +#### Returns + +`void` + +*** + +### setPageIndex() + +```ts +setPageIndex: (updater) => void; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:98](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L98) + +Updates the page index using the provided function or value in the `state.pagination.pageIndex` state. + +#### Parameters + +##### updater + +[`Updater`](../type-aliases/Updater.md)\<`number`\> + +#### Returns + +`void` + +*** + +### setPageSize() + +```ts +setPageSize: (updater) => void; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:102](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L102) + +Updates the page size using the provided function or value in the `state.pagination.pageSize` state. + +#### Parameters + +##### updater + +[`Updater`](../type-aliases/Updater.md)\<`number`\> + +#### Returns + +`void` + +*** + +### setPagination() + +```ts +setPagination: (updater) => void; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:106](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L106) + +Sets or updates the `state.pagination` state. + +#### Parameters + +##### updater + +[`Updater`](../type-aliases/Updater.md)\<[`PaginationState`](PaginationState.md)\> + +#### Returns + +`void` diff --git a/docs/reference/interfaces/Table_RowPinning.md b/docs/reference/interfaces/Table_RowPinning.md new file mode 100644 index 0000000000..b8907f46c4 --- /dev/null +++ b/docs/reference/interfaces/Table_RowPinning.md @@ -0,0 +1,132 @@ +--- +id: Table_RowPinning +title: Table_RowPinning +--- + +# Interface: Table\_RowPinning\ + +Defined in: [features/row-pinning/rowPinningFeature.types.ts:61](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L61) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### getBottomRows() + +```ts +getBottomRows: () => Row[]; +``` + +Defined in: [features/row-pinning/rowPinningFeature.types.ts:68](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L68) + +Returns all bottom pinned rows. + +#### Returns + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\>[] + +*** + +### getCenterRows() + +```ts +getCenterRows: () => Row[]; +``` + +Defined in: [features/row-pinning/rowPinningFeature.types.ts:72](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L72) + +Returns all rows that are not pinned to the top or bottom. + +#### Returns + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\>[] + +*** + +### getIsSomeRowsPinned() + +```ts +getIsSomeRowsPinned: (position?) => boolean; +``` + +Defined in: [features/row-pinning/rowPinningFeature.types.ts:76](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L76) + +Returns whether or not any rows are pinned. Optionally specify to only check for pinned rows in either the `top` or `bottom` position. + +#### Parameters + +##### position? + +[`RowPinningPosition`](../type-aliases/RowPinningPosition.md) + +#### Returns + +`boolean` + +*** + +### getTopRows() + +```ts +getTopRows: () => Row[]; +``` + +Defined in: [features/row-pinning/rowPinningFeature.types.ts:80](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L80) + +Returns all top pinned rows. + +#### Returns + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\>[] + +*** + +### resetRowPinning() + +```ts +resetRowPinning: (defaultState?) => void; +``` + +Defined in: [features/row-pinning/rowPinningFeature.types.ts:84](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L84) + +Resets the **rowPinning** state to `initialState.rowPinning`, or `true` can be passed to force a default blank state reset to `{ top: [], bottom: [], }`. + +#### Parameters + +##### defaultState? + +`boolean` + +#### Returns + +`void` + +*** + +### setRowPinning() + +```ts +setRowPinning: (updater) => void; +``` + +Defined in: [features/row-pinning/rowPinningFeature.types.ts:88](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L88) + +Sets or updates the `state.rowPinning` state. + +#### Parameters + +##### updater + +[`Updater`](../type-aliases/Updater.md)\<[`RowPinningState`](RowPinningState.md)\> + +#### Returns + +`void` diff --git a/docs/reference/interfaces/Table_RowSelection.md b/docs/reference/interfaces/Table_RowSelection.md new file mode 100644 index 0000000000..fdb97bb530 --- /dev/null +++ b/docs/reference/interfaces/Table_RowSelection.md @@ -0,0 +1,290 @@ +--- +id: Table_RowSelection +title: Table_RowSelection +--- + +# Interface: Table\_RowSelection\ + +Defined in: [features/row-selection/rowSelectionFeature.types.ts:83](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L83) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### getFilteredSelectedRowModel() + +```ts +getFilteredSelectedRowModel: () => RowModel; +``` + +Defined in: [features/row-selection/rowSelectionFeature.types.ts:90](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L90) + +Returns the row model of all rows that are selected after filtering has been applied. + +#### Returns + +[`RowModel`](RowModel.md)\<`TFeatures`, `TData`\> + +*** + +### getGroupedSelectedRowModel() + +```ts +getGroupedSelectedRowModel: () => RowModel; +``` + +Defined in: [features/row-selection/rowSelectionFeature.types.ts:94](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L94) + +Returns the row model of all rows that are selected after grouping has been applied. + +#### Returns + +[`RowModel`](RowModel.md)\<`TFeatures`, `TData`\> + +*** + +### getIsAllPageRowsSelected() + +```ts +getIsAllPageRowsSelected: () => boolean; +``` + +Defined in: [features/row-selection/rowSelectionFeature.types.ts:98](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L98) + +Returns whether or not all rows on the current page are selected. + +#### Returns + +`boolean` + +*** + +### getIsAllRowsSelected() + +```ts +getIsAllRowsSelected: () => boolean; +``` + +Defined in: [features/row-selection/rowSelectionFeature.types.ts:102](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L102) + +Returns whether or not all rows in the table are selected. + +#### Returns + +`boolean` + +*** + +### getIsSomePageRowsSelected() + +```ts +getIsSomePageRowsSelected: () => boolean; +``` + +Defined in: [features/row-selection/rowSelectionFeature.types.ts:106](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L106) + +Returns whether or not any rows on the current page are selected. + +#### Returns + +`boolean` + +*** + +### getIsSomeRowsSelected() + +```ts +getIsSomeRowsSelected: () => boolean; +``` + +Defined in: [features/row-selection/rowSelectionFeature.types.ts:110](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L110) + +Returns whether or not any rows in the table are selected. + +#### Returns + +`boolean` + +*** + +### getPreSelectedRowModel() + +```ts +getPreSelectedRowModel: () => RowModel; +``` + +Defined in: [features/row-selection/rowSelectionFeature.types.ts:114](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L114) + +Returns the core row model of all rows before row selection has been applied. + +#### Returns + +[`RowModel`](RowModel.md)\<`TFeatures`, `TData`\> + +*** + +### getSelectedRowModel() + +```ts +getSelectedRowModel: () => RowModel; +``` + +Defined in: [features/row-selection/rowSelectionFeature.types.ts:118](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L118) + +Returns the row model of all rows that are selected. + +#### Returns + +[`RowModel`](RowModel.md)\<`TFeatures`, `TData`\> + +*** + +### getToggleAllPageRowsSelectedHandler() + +```ts +getToggleAllPageRowsSelectedHandler: () => (event) => void; +``` + +Defined in: [features/row-selection/rowSelectionFeature.types.ts:122](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L122) + +Returns a handler that can be used to toggle all rows on the current page. + +#### Returns + +```ts +(event): void; +``` + +##### Parameters + +###### event + +`unknown` + +##### Returns + +`void` + +*** + +### getToggleAllRowsSelectedHandler() + +```ts +getToggleAllRowsSelectedHandler: () => (event) => void; +``` + +Defined in: [features/row-selection/rowSelectionFeature.types.ts:126](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L126) + +Returns a handler that can be used to toggle all rows in the table. + +#### Returns + +```ts +(event): void; +``` + +##### Parameters + +###### event + +`unknown` + +##### Returns + +`void` + +*** + +### resetRowSelection() + +```ts +resetRowSelection: (defaultState?) => void; +``` + +Defined in: [features/row-selection/rowSelectionFeature.types.ts:130](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L130) + +Resets the **rowSelection** state to the `initialState.rowSelection`, or `true` can be passed to force a default blank state reset to `{}`. + +#### Parameters + +##### defaultState? + +`boolean` + +#### Returns + +`void` + +*** + +### setRowSelection() + +```ts +setRowSelection: (updater) => void; +``` + +Defined in: [features/row-selection/rowSelectionFeature.types.ts:134](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L134) + +Sets or updates the `state.rowSelection` state. + +#### Parameters + +##### updater + +[`Updater`](../type-aliases/Updater.md)\<[`RowSelectionState`](../type-aliases/RowSelectionState.md)\> + +#### Returns + +`void` + +*** + +### toggleAllPageRowsSelected() + +```ts +toggleAllPageRowsSelected: (value?) => void; +``` + +Defined in: [features/row-selection/rowSelectionFeature.types.ts:138](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L138) + +Selects/deselects all rows on the current page. + +#### Parameters + +##### value? + +`boolean` + +#### Returns + +`void` + +*** + +### toggleAllRowsSelected() + +```ts +toggleAllRowsSelected: (value?) => void; +``` + +Defined in: [features/row-selection/rowSelectionFeature.types.ts:142](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L142) + +Selects/deselects all rows in the table. + +#### Parameters + +##### value? + +`boolean` + +#### Returns + +`void` diff --git a/docs/reference/interfaces/Table_RowSorting.md b/docs/reference/interfaces/Table_RowSorting.md new file mode 100644 index 0000000000..4bc09bafe4 --- /dev/null +++ b/docs/reference/interfaces/Table_RowSorting.md @@ -0,0 +1,62 @@ +--- +id: Table_RowSorting +title: Table_RowSorting +--- + +# Interface: Table\_RowSorting\ + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:184](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L184) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### resetSorting() + +```ts +resetSorting: (defaultState?) => void; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:191](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L191) + +Resets the **sorting** state to `initialState.sorting`, or `true` can be passed to force a default blank state reset to `[]`. + +#### Parameters + +##### defaultState? + +`boolean` + +#### Returns + +`void` + +*** + +### setSorting() + +```ts +setSorting: (updater) => void; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:195](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L195) + +Sets or updates the `state.sorting` state. + +#### Parameters + +##### updater + +[`Updater`](../type-aliases/Updater.md)\<[`SortingState`](../type-aliases/SortingState.md)\> + +#### Returns + +`void` diff --git a/docs/reference/interfaces/Table_Rows.md b/docs/reference/interfaces/Table_Rows.md new file mode 100644 index 0000000000..94dddefb98 --- /dev/null +++ b/docs/reference/interfaces/Table_Rows.md @@ -0,0 +1,72 @@ +--- +id: Table_Rows +title: Table_Rows +--- + +# Interface: Table\_Rows\ + +Defined in: [core/rows/coreRowsFeature.types.ts:105](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L105) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### getRow() + +```ts +getRow: (id, searchAll?) => Row; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:113](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L113) + +Returns the row with the given ID. + +#### Parameters + +##### id + +`string` + +##### searchAll? + +`boolean` + +#### Returns + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +*** + +### getRowId() + +```ts +getRowId: (_, index, parent?) => string; +``` + +Defined in: [core/rows/coreRowsFeature.types.ts:109](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L109) + +#### Parameters + +##### \_ + +`TData` + +##### index + +`number` + +##### parent? + +[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> + +#### Returns + +`string` diff --git a/docs/reference/interfaces/Table_Table.md b/docs/reference/interfaces/Table_Table.md new file mode 100644 index 0000000000..419b93a808 --- /dev/null +++ b/docs/reference/interfaces/Table_Table.md @@ -0,0 +1,236 @@ +--- +id: Table_Table +title: Table_Table +--- + +# Interface: Table\_Table\ + +Defined in: [core/table/coreTablesFeature.types.ts:111](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L111) + +## Extends + +- [`Table_CoreProperties`](Table_CoreProperties.md)\<`TFeatures`, `TData`\> + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../type-aliases/RowData.md) + +## Properties + +### \_cellPrototype? + +```ts +optional _cellPrototype: object; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:72](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L72) + +Prototype cache for Cell objects - shared by all cells in this table + +#### Inherited from + +[`Table_CoreProperties`](Table_CoreProperties.md).[`_cellPrototype`](Table_CoreProperties.md#_cellprototype) + +*** + +### \_columnPrototype? + +```ts +optional _columnPrototype: object; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:76](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L76) + +Prototype cache for Column objects - shared by all columns in this table + +#### Inherited from + +[`Table_CoreProperties`](Table_CoreProperties.md).[`_columnPrototype`](Table_CoreProperties.md#_columnprototype) + +*** + +### \_features + +```ts +_features: Partial & TFeatures; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:68](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L68) + +The features that are enabled for the table. + +#### Inherited from + +[`Table_CoreProperties`](Table_CoreProperties.md).[`_features`](Table_CoreProperties.md#_features) + +*** + +### \_headerPrototype? + +```ts +optional _headerPrototype: object; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:80](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L80) + +Prototype cache for Header objects - shared by all headers in this table + +#### Inherited from + +[`Table_CoreProperties`](Table_CoreProperties.md).[`_headerPrototype`](Table_CoreProperties.md#_headerprototype) + +*** + +### \_rowModelFns + +```ts +_rowModelFns: RowModelFns; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:84](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L84) + +The row model processing functions that are used to process the data by features. + +#### Inherited from + +[`Table_CoreProperties`](Table_CoreProperties.md).[`_rowModelFns`](Table_CoreProperties.md#_rowmodelfns) + +*** + +### \_rowModels + +```ts +_rowModels: CachedRowModels; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:88](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L88) + +The row models that are enabled for the table. + +#### Inherited from + +[`Table_CoreProperties`](Table_CoreProperties.md).[`_rowModels`](Table_CoreProperties.md#_rowmodels) + +*** + +### \_rowPrototype? + +```ts +optional _rowPrototype: object; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:92](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L92) + +Prototype cache for Row objects - shared by all rows in this table + +#### Inherited from + +[`Table_CoreProperties`](Table_CoreProperties.md).[`_rowPrototype`](Table_CoreProperties.md#_rowprototype) + +*** + +### baseStore + +```ts +baseStore: Store>; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:96](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L96) + +The base store for the table. This can be used to write to the table state. + +#### Inherited from + +[`Table_CoreProperties`](Table_CoreProperties.md).[`baseStore`](Table_CoreProperties.md#basestore) + +*** + +### initialState + +```ts +initialState: TableState; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:100](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L100) + +This is the resolved initial state of the table. + +#### Inherited from + +[`Table_CoreProperties`](Table_CoreProperties.md).[`initialState`](Table_CoreProperties.md#initialstate) + +*** + +### options + +```ts +options: TableOptions; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:104](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L104) + +A read-only reference to the table's current options. + +#### Inherited from + +[`Table_CoreProperties`](Table_CoreProperties.md).[`options`](Table_CoreProperties.md#options) + +*** + +### reset() + +```ts +reset: () => void; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:118](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L118) + +Call this function to reset the table state to the initial state. + +#### Returns + +`void` + +*** + +### setOptions() + +```ts +setOptions: (newOptions) => void; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:122](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L122) + +This function can be used to update the table options. + +#### Parameters + +##### newOptions + +[`Updater`](../type-aliases/Updater.md)\<[`TableOptions`](../type-aliases/TableOptions.md)\<`TFeatures`, `TData`\>\> + +#### Returns + +`void` + +*** + +### store + +```ts +store: ReadonlyStore>; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:108](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L108) + +Where the table state is stored. + +#### Inherited from + +[`Table_CoreProperties`](Table_CoreProperties.md).[`store`](Table_CoreProperties.md#store) diff --git a/docs/reference/interfaces/columnResizingState.md b/docs/reference/interfaces/columnResizingState.md new file mode 100644 index 0000000000..b38d9badf9 --- /dev/null +++ b/docs/reference/interfaces/columnResizingState.md @@ -0,0 +1,68 @@ +--- +id: columnResizingState +title: columnResizingState +--- + +# Interface: columnResizingState + +Defined in: [features/column-resizing/columnResizingFeature.types.ts:7](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L7) + +## Properties + +### columnSizingStart + +```ts +columnSizingStart: [string, number][]; +``` + +Defined in: [features/column-resizing/columnResizingFeature.types.ts:8](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L8) + +*** + +### deltaOffset + +```ts +deltaOffset: number | null; +``` + +Defined in: [features/column-resizing/columnResizingFeature.types.ts:9](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L9) + +*** + +### deltaPercentage + +```ts +deltaPercentage: number | null; +``` + +Defined in: [features/column-resizing/columnResizingFeature.types.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L10) + +*** + +### isResizingColumn + +```ts +isResizingColumn: string | false; +``` + +Defined in: [features/column-resizing/columnResizingFeature.types.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L11) + +*** + +### startOffset + +```ts +startOffset: number | null; +``` + +Defined in: [features/column-resizing/columnResizingFeature.types.ts:12](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L12) + +*** + +### startSize + +```ts +startSize: number | null; +``` + +Defined in: [features/column-resizing/columnResizingFeature.types.ts:13](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L13) diff --git a/docs/reference/type-aliases/APIObject.md b/docs/reference/type-aliases/APIObject.md new file mode 100644 index 0000000000..937884aa0e --- /dev/null +++ b/docs/reference/type-aliases/APIObject.md @@ -0,0 +1,22 @@ +--- +id: APIObject +title: APIObject +--- + +# Type Alias: APIObject\ + +```ts +type APIObject = Record>; +``` + +Defined in: [utils.ts:272](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L272) + +## Type Parameters + +### TDeps + +`TDeps` *extends* `ReadonlyArray`\<`any`\> + +### TDepArgs + +`TDepArgs` diff --git a/docs/reference/type-aliases/AccessorColumnDef.md b/docs/reference/type-aliases/AccessorColumnDef.md new file mode 100644 index 0000000000..2aef75707b --- /dev/null +++ b/docs/reference/type-aliases/AccessorColumnDef.md @@ -0,0 +1,28 @@ +--- +id: AccessorColumnDef +title: AccessorColumnDef +--- + +# Type Alias: AccessorColumnDef\ + +```ts +type AccessorColumnDef = + | AccessorKeyColumnDef +| AccessorFnColumnDef; +``` + +Defined in: [types/ColumnDef.ts:194](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L194) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md) diff --git a/docs/reference/type-aliases/AccessorFn.md b/docs/reference/type-aliases/AccessorFn.md new file mode 100644 index 0000000000..c66ac0af96 --- /dev/null +++ b/docs/reference/type-aliases/AccessorFn.md @@ -0,0 +1,36 @@ +--- +id: AccessorFn +title: AccessorFn +--- + +# Type Alias: AccessorFn()\ + +```ts +type AccessorFn = (originalRow, index) => TValue; +``` + +Defined in: [types/ColumnDef.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L30) + +## Type Parameters + +### TData + +`TData` *extends* [`RowData`](RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md) + +## Parameters + +### originalRow + +`TData` + +### index + +`number` + +## Returns + +`TValue` diff --git a/docs/reference/type-aliases/AccessorFnColumnDef.md b/docs/reference/type-aliases/AccessorFnColumnDef.md new file mode 100644 index 0000000000..bb77da4e78 --- /dev/null +++ b/docs/reference/type-aliases/AccessorFnColumnDef.md @@ -0,0 +1,26 @@ +--- +id: AccessorFnColumnDef +title: AccessorFnColumnDef +--- + +# Type Alias: AccessorFnColumnDef\ + +```ts +type AccessorFnColumnDef = AccessorFnColumnDefBase & ColumnIdentifiers; +``` + +Defined in: [types/ColumnDef.ts:171](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L171) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md) diff --git a/docs/reference/type-aliases/AccessorFnColumnDefBase.md b/docs/reference/type-aliases/AccessorFnColumnDefBase.md new file mode 100644 index 0000000000..0949ba3710 --- /dev/null +++ b/docs/reference/type-aliases/AccessorFnColumnDefBase.md @@ -0,0 +1,34 @@ +--- +id: AccessorFnColumnDefBase +title: AccessorFnColumnDefBase +--- + +# Type Alias: AccessorFnColumnDefBase\ + +```ts +type AccessorFnColumnDefBase = ColumnDefBase & object; +``` + +Defined in: [types/ColumnDef.ts:163](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L163) + +## Type Declaration + +### accessorFn + +```ts +accessorFn: AccessorFn; +``` + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md) diff --git a/docs/reference/type-aliases/AccessorKeyColumnDef.md b/docs/reference/type-aliases/AccessorKeyColumnDef.md new file mode 100644 index 0000000000..c60f4368cd --- /dev/null +++ b/docs/reference/type-aliases/AccessorKeyColumnDef.md @@ -0,0 +1,26 @@ +--- +id: AccessorKeyColumnDef +title: AccessorKeyColumnDef +--- + +# Type Alias: AccessorKeyColumnDef\ + +```ts +type AccessorKeyColumnDef = AccessorKeyColumnDefBase & Partial>; +``` + +Defined in: [types/ColumnDef.ts:187](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L187) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md) diff --git a/docs/reference/type-aliases/AccessorKeyColumnDefBase.md b/docs/reference/type-aliases/AccessorKeyColumnDefBase.md new file mode 100644 index 0000000000..8a180c439f --- /dev/null +++ b/docs/reference/type-aliases/AccessorKeyColumnDefBase.md @@ -0,0 +1,40 @@ +--- +id: AccessorKeyColumnDefBase +title: AccessorKeyColumnDefBase +--- + +# Type Alias: AccessorKeyColumnDefBase\ + +```ts +type AccessorKeyColumnDefBase = ColumnDefBase & object; +``` + +Defined in: [types/ColumnDef.ts:178](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L178) + +## Type Declaration + +### accessorKey + +```ts +accessorKey: string & object | keyof TData; +``` + +### id? + +```ts +optional id: string; +``` + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md) diff --git a/docs/reference/type-aliases/AggregationFn.md b/docs/reference/type-aliases/AggregationFn.md new file mode 100644 index 0000000000..4b6026e99a --- /dev/null +++ b/docs/reference/type-aliases/AggregationFn.md @@ -0,0 +1,40 @@ +--- +id: AggregationFn +title: AggregationFn +--- + +# Type Alias: AggregationFn()\ + +```ts +type AggregationFn = (columnId, leafRows, childRows) => any; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L30) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) + +## Parameters + +### columnId + +`string` + +### leafRows + +[`Row`](Row.md)\<`TFeatures`, `TData`\>[] + +### childRows + +[`Row`](Row.md)\<`TFeatures`, `TData`\>[] + +## Returns + +`any` diff --git a/docs/reference/type-aliases/AggregationFnOption.md b/docs/reference/type-aliases/AggregationFnOption.md new file mode 100644 index 0000000000..e769ff8947 --- /dev/null +++ b/docs/reference/type-aliases/AggregationFnOption.md @@ -0,0 +1,26 @@ +--- +id: AggregationFnOption +title: AggregationFnOption +--- + +# Type Alias: AggregationFnOption\ + +```ts +type AggregationFnOption = + | "auto" + | keyof AggregationFns + | BuiltInAggregationFn +| AggregationFn; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:44](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L44) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) diff --git a/docs/reference/type-aliases/AssignCellPrototype.md b/docs/reference/type-aliases/AssignCellPrototype.md new file mode 100644 index 0000000000..7a556f6829 --- /dev/null +++ b/docs/reference/type-aliases/AssignCellPrototype.md @@ -0,0 +1,42 @@ +--- +id: AssignCellPrototype +title: AssignCellPrototype +--- + +# Type Alias: AssignCellPrototype()\ + +```ts +type AssignCellPrototype = (prototype, table) => void; +``` + +Defined in: [types/TableFeatures.ts:77](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L77) + +## Type Parameters + +### TConstructors + +`TConstructors` *extends* `FeatureConstructors` + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) + +## Parameters + +### prototype + +`Record`\<`string`, `any`\> + +### table + +[`Table_Internal`](Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`void` diff --git a/docs/reference/type-aliases/AssignColumnPrototype.md b/docs/reference/type-aliases/AssignColumnPrototype.md new file mode 100644 index 0000000000..fbd1bcf59a --- /dev/null +++ b/docs/reference/type-aliases/AssignColumnPrototype.md @@ -0,0 +1,42 @@ +--- +id: AssignColumnPrototype +title: AssignColumnPrototype +--- + +# Type Alias: AssignColumnPrototype()\ + +```ts +type AssignColumnPrototype = (prototype, table) => void; +``` + +Defined in: [types/TableFeatures.ts:85](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L85) + +## Type Parameters + +### TConstructors + +`TConstructors` *extends* `FeatureConstructors` + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) + +## Parameters + +### prototype + +`Record`\<`string`, `any`\> + +### table + +[`Table_Internal`](Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`void` diff --git a/docs/reference/type-aliases/AssignHeaderPrototype.md b/docs/reference/type-aliases/AssignHeaderPrototype.md new file mode 100644 index 0000000000..809e45096e --- /dev/null +++ b/docs/reference/type-aliases/AssignHeaderPrototype.md @@ -0,0 +1,42 @@ +--- +id: AssignHeaderPrototype +title: AssignHeaderPrototype +--- + +# Type Alias: AssignHeaderPrototype()\ + +```ts +type AssignHeaderPrototype = (prototype, table) => void; +``` + +Defined in: [types/TableFeatures.ts:93](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L93) + +## Type Parameters + +### TConstructors + +`TConstructors` *extends* `FeatureConstructors` + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) + +## Parameters + +### prototype + +`Record`\<`string`, `any`\> + +### table + +[`Table_Internal`](Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`void` diff --git a/docs/reference/type-aliases/AssignRowPrototype.md b/docs/reference/type-aliases/AssignRowPrototype.md new file mode 100644 index 0000000000..7d3180f2a3 --- /dev/null +++ b/docs/reference/type-aliases/AssignRowPrototype.md @@ -0,0 +1,42 @@ +--- +id: AssignRowPrototype +title: AssignRowPrototype +--- + +# Type Alias: AssignRowPrototype()\ + +```ts +type AssignRowPrototype = (prototype, table) => void; +``` + +Defined in: [types/TableFeatures.ts:101](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L101) + +## Type Parameters + +### TConstructors + +`TConstructors` *extends* `FeatureConstructors` + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) + +## Parameters + +### prototype + +`Record`\<`string`, `any`\> + +### table + +[`Table_Internal`](Table_Internal.md)\<`TFeatures`, `TData`\> + +## Returns + +`void` diff --git a/docs/reference/type-aliases/BuiltInAggregationFn.md b/docs/reference/type-aliases/BuiltInAggregationFn.md new file mode 100644 index 0000000000..154c0ecdc0 --- /dev/null +++ b/docs/reference/type-aliases/BuiltInAggregationFn.md @@ -0,0 +1,12 @@ +--- +id: BuiltInAggregationFn +title: BuiltInAggregationFn +--- + +# Type Alias: BuiltInAggregationFn + +```ts +type BuiltInAggregationFn = keyof typeof aggregationFns; +``` + +Defined in: [fns/aggregationFns.ts:220](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L220) diff --git a/docs/reference/type-aliases/BuiltInFilterFn.md b/docs/reference/type-aliases/BuiltInFilterFn.md new file mode 100644 index 0000000000..fd771c36b3 --- /dev/null +++ b/docs/reference/type-aliases/BuiltInFilterFn.md @@ -0,0 +1,12 @@ +--- +id: BuiltInFilterFn +title: BuiltInFilterFn +--- + +# Type Alias: BuiltInFilterFn + +```ts +type BuiltInFilterFn = keyof typeof filterFns; +``` + +Defined in: [fns/filterFns.ts:373](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L373) diff --git a/docs/reference/type-aliases/BuiltInSortFn.md b/docs/reference/type-aliases/BuiltInSortFn.md new file mode 100644 index 0000000000..5ccf24d131 --- /dev/null +++ b/docs/reference/type-aliases/BuiltInSortFn.md @@ -0,0 +1,12 @@ +--- +id: BuiltInSortFn +title: BuiltInSortFn +--- + +# Type Alias: BuiltInSortFn + +```ts +type BuiltInSortFn = keyof typeof sortFns; +``` + +Defined in: [fns/sortFns.ts:173](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/sortFns.ts#L173) diff --git a/docs/reference/type-aliases/CachedRowModel_All.md b/docs/reference/type-aliases/CachedRowModel_All.md new file mode 100644 index 0000000000..7c88b96722 --- /dev/null +++ b/docs/reference/type-aliases/CachedRowModel_All.md @@ -0,0 +1,22 @@ +--- +id: CachedRowModel_All +title: CachedRowModel_All +--- + +# Type Alias: CachedRowModel\_All\ + +```ts +type CachedRowModel_All = Partial & CachedRowModel_Expanded & CachedRowModel_Faceted & CachedRowModel_Filtered & CachedRowModel_Grouped & CachedRowModel_Paginated & CachedRowModel_Sorted>; +``` + +Defined in: [types/RowModel.ts:126](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/RowModel.ts#L126) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) = `any` diff --git a/docs/reference/type-aliases/CachedRowModels.md b/docs/reference/type-aliases/CachedRowModels.md new file mode 100644 index 0000000000..346ef4da2f --- /dev/null +++ b/docs/reference/type-aliases/CachedRowModels.md @@ -0,0 +1,40 @@ +--- +id: CachedRowModels +title: CachedRowModels +--- + +# Type Alias: CachedRowModels\ + +```ts +type CachedRowModels = object & UnionToIntersection< + | "columnFacetingFeature" extends keyof TFeatures ? CachedRowModel_Faceted : never + | "columnFilteringFeature" extends keyof TFeatures ? CachedRowModel_Filtered : never + | "rowExpandingFeature" extends keyof TFeatures ? CachedRowModel_Expanded : never + | "columnGroupingFeature" extends keyof TFeatures ? CachedRowModel_Grouped : never + | "rowPaginationFeature" extends keyof TFeatures ? CachedRowModel_Paginated : never +| "rowSortingFeature" extends keyof TFeatures ? CachedRowModel_Sorted : never> & ExtractFeatureTypes<"CachedRowModel", TFeatures> & CachedRowModels_Plugins; +``` + +Defined in: [types/RowModel.ts:92](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/RowModel.ts#L92) + +## Type Declaration + +### CachedRowModel\_Core() + +```ts +CachedRowModel_Core: () => RowModel; +``` + +#### Returns + +[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) diff --git a/docs/reference/type-aliases/Cell.md b/docs/reference/type-aliases/Cell.md new file mode 100644 index 0000000000..d502b45063 --- /dev/null +++ b/docs/reference/type-aliases/Cell.md @@ -0,0 +1,26 @@ +--- +id: Cell +title: Cell +--- + +# Type Alias: Cell\ + +```ts +type Cell = Cell_Cell & UnionToIntersection<"columnGroupingFeature" extends keyof TFeatures ? Cell_ColumnGrouping : never> & ExtractFeatureTypes<"Cell", TFeatures> & Cell_Plugins; +``` + +Defined in: [types/Cell.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Cell.ts#L22) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md) diff --git a/docs/reference/type-aliases/CellData.md b/docs/reference/type-aliases/CellData.md new file mode 100644 index 0000000000..b87bbfc760 --- /dev/null +++ b/docs/reference/type-aliases/CellData.md @@ -0,0 +1,12 @@ +--- +id: CellData +title: CellData +--- + +# Type Alias: CellData + +```ts +type CellData = unknown; +``` + +Defined in: [types/type-utils.ts:7](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/type-utils.ts#L7) diff --git a/docs/reference/type-aliases/Column.md b/docs/reference/type-aliases/Column.md new file mode 100644 index 0000000000..37c74859af --- /dev/null +++ b/docs/reference/type-aliases/Column.md @@ -0,0 +1,36 @@ +--- +id: Column +title: Column +--- + +# Type Alias: Column\ + +```ts +type Column = Column_Core & UnionToIntersection< + | "columnFacetingFeature" extends keyof TFeatures ? Column_ColumnFaceting : never + | "columnFilteringFeature" extends keyof TFeatures ? Column_ColumnFiltering : never + | "columnGroupingFeature" extends keyof TFeatures ? Column_ColumnGrouping : never + | "columnOrderingFeature" extends keyof TFeatures ? Column_ColumnOrdering : never + | "columnPinningFeature" extends keyof TFeatures ? Column_ColumnPinning : never + | "columnResizingFeature" extends keyof TFeatures ? Column_ColumnResizing : never + | "columnSizingFeature" extends keyof TFeatures ? Column_ColumnSizing : never + | "columnVisibilityFeature" extends keyof TFeatures ? Column_ColumnVisibility : never + | "globalFilteringFeature" extends keyof TFeatures ? Column_GlobalFiltering : never +| "rowSortingFeature" extends keyof TFeatures ? Column_RowSorting : never> & ExtractFeatureTypes<"Column", TFeatures> & Column_Plugins; +``` + +Defined in: [types/Column.ts:32](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Column.ts#L32) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) + +### TValue + +`TValue` = `unknown` diff --git a/docs/reference/type-aliases/ColumnDef.md b/docs/reference/type-aliases/ColumnDef.md new file mode 100644 index 0000000000..3afd463a1c --- /dev/null +++ b/docs/reference/type-aliases/ColumnDef.md @@ -0,0 +1,29 @@ +--- +id: ColumnDef +title: ColumnDef +--- + +# Type Alias: ColumnDef\ + +```ts +type ColumnDef = + | DisplayColumnDef + | GroupColumnDef +| AccessorColumnDef; +``` + +Defined in: [types/ColumnDef.ts:202](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L202) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md) diff --git a/docs/reference/type-aliases/ColumnDefBase.md b/docs/reference/type-aliases/ColumnDefBase.md new file mode 100644 index 0000000000..1c291b5ff8 --- /dev/null +++ b/docs/reference/type-aliases/ColumnDefBase.md @@ -0,0 +1,34 @@ +--- +id: ColumnDefBase +title: ColumnDefBase +--- + +# Type Alias: ColumnDefBase\ + +```ts +type ColumnDefBase = ColumnDefBase_Core & UnionToIntersection< + | "columnVisibilityFeature" extends keyof TFeatures ? ColumnDef_ColumnVisibility : never + | "columnPinningFeature" extends keyof TFeatures ? ColumnDef_ColumnPinning : never + | "columnFilteringFeature" extends keyof TFeatures ? ColumnDef_ColumnFiltering : never + | "globalFilteringFeature" extends keyof TFeatures ? ColumnDef_GlobalFiltering : never + | "rowSortingFeature" extends keyof TFeatures ? ColumnDef_RowSorting : never + | "columnGroupingFeature" extends keyof TFeatures ? ColumnDef_ColumnGrouping : never + | "columnSizingFeature" extends keyof TFeatures ? ColumnDef_ColumnSizing : never +| "columnResizingFeature" extends keyof TFeatures ? ColumnDef_ColumnResizing : never> & ExtractFeatureTypes<"ColumnDef", TFeatures> & ColumnDef_Plugins; +``` + +Defined in: [types/ColumnDef.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L75) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md) diff --git a/docs/reference/type-aliases/ColumnDefBase_All.md b/docs/reference/type-aliases/ColumnDefBase_All.md new file mode 100644 index 0000000000..b1428ac707 --- /dev/null +++ b/docs/reference/type-aliases/ColumnDefBase_All.md @@ -0,0 +1,26 @@ +--- +id: ColumnDefBase_All +title: ColumnDefBase_All +--- + +# Type Alias: ColumnDefBase\_All\ + +```ts +type ColumnDefBase_All = ColumnDefBase_Core & Partial & ColumnDef_GlobalFiltering & ColumnDef_RowSorting & ColumnDef_ColumnGrouping & ColumnDef_ColumnSizing & ColumnDef_ColumnResizing>; +``` + +Defined in: [types/ColumnDef.ts:117](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L117) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md) diff --git a/docs/reference/type-aliases/ColumnDefResolved.md b/docs/reference/type-aliases/ColumnDefResolved.md new file mode 100644 index 0000000000..f475f890a7 --- /dev/null +++ b/docs/reference/type-aliases/ColumnDefResolved.md @@ -0,0 +1,34 @@ +--- +id: ColumnDefResolved +title: ColumnDefResolved +--- + +# Type Alias: ColumnDefResolved\ + +```ts +type ColumnDefResolved = Partial>> & object; +``` + +Defined in: [types/ColumnDef.ts:211](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L211) + +## Type Declaration + +### accessorKey? + +```ts +optional accessorKey: string; +``` + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md) diff --git a/docs/reference/type-aliases/ColumnDefTemplate.md b/docs/reference/type-aliases/ColumnDefTemplate.md new file mode 100644 index 0000000000..2f3f105ce0 --- /dev/null +++ b/docs/reference/type-aliases/ColumnDefTemplate.md @@ -0,0 +1,18 @@ +--- +id: ColumnDefTemplate +title: ColumnDefTemplate +--- + +# Type Alias: ColumnDefTemplate\ + +```ts +type ColumnDefTemplate = string | (props) => any; +``` + +Defined in: [types/ColumnDef.ts:35](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L35) + +## Type Parameters + +### TProps + +`TProps` *extends* `object` diff --git a/docs/reference/type-aliases/ColumnFilterAutoRemoveTestFn.md b/docs/reference/type-aliases/ColumnFilterAutoRemoveTestFn.md new file mode 100644 index 0000000000..2842393bc1 --- /dev/null +++ b/docs/reference/type-aliases/ColumnFilterAutoRemoveTestFn.md @@ -0,0 +1,40 @@ +--- +id: ColumnFilterAutoRemoveTestFn +title: ColumnFilterAutoRemoveTestFn +--- + +# Type Alias: ColumnFilterAutoRemoveTestFn()\ + +```ts +type ColumnFilterAutoRemoveTestFn = (value, column?) => boolean; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:65](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L65) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md) + +## Parameters + +### value + +`any` + +### column? + +[`Column`](Column.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +`boolean` diff --git a/docs/reference/type-aliases/ColumnFiltersState.md b/docs/reference/type-aliases/ColumnFiltersState.md new file mode 100644 index 0000000000..5e48d56e9d --- /dev/null +++ b/docs/reference/type-aliases/ColumnFiltersState.md @@ -0,0 +1,12 @@ +--- +id: ColumnFiltersState +title: ColumnFiltersState +--- + +# Type Alias: ColumnFiltersState + +```ts +type ColumnFiltersState = ColumnFilter[]; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L22) diff --git a/docs/reference/type-aliases/ColumnHelper.md b/docs/reference/type-aliases/ColumnHelper.md new file mode 100644 index 0000000000..f083e53397 --- /dev/null +++ b/docs/reference/type-aliases/ColumnHelper.md @@ -0,0 +1,165 @@ +--- +id: ColumnHelper +title: ColumnHelper +--- + +# Type Alias: ColumnHelper\ + +```ts +type ColumnHelper = object; +``` + +Defined in: [helpers/columnHelper.ts:13](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/columnHelper.ts#L13) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) + +## Properties + +### accessor() + +```ts +accessor: (accessor, column) => TAccessor extends AccessorFn ? AccessorFnColumnDef : AccessorKeyColumnDef; +``` + +Defined in: [helpers/columnHelper.ts:25](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/columnHelper.ts#L25) + +Creates a data column definition with an accessor key or function to extract the cell value. + +#### Type Parameters + +##### TAccessor + +`TAccessor` *extends* + \| [`AccessorFn`](AccessorFn.md)\<`TData`\> + \| [`DeepKeys`](DeepKeys.md)\<`TData`\> + +##### TValue + +`TValue` *extends* `TAccessor` *extends* [`AccessorFn`](AccessorFn.md)\<`TData`, infer TReturn\> ? `TReturn` : `TAccessor` *extends* [`DeepKeys`](DeepKeys.md)\<`TData`\> ? [`DeepValue`](DeepValue.md)\<`TData`, `TAccessor`\> : `never` + +#### Parameters + +##### accessor + +`TAccessor` + +##### column + +`TAccessor` *extends* [`AccessorFn`](AccessorFn.md)\<`TData`\> ? [`DisplayColumnDef`](DisplayColumnDef.md)\<`TFeatures`, `TData`, `TValue`\> : [`IdentifiedColumnDef`](IdentifiedColumnDef.md)\<`TFeatures`, `TData`, `TValue`\> + +#### Returns + +`TAccessor` *extends* [`AccessorFn`](AccessorFn.md)\<`TData`\> ? [`AccessorFnColumnDef`](AccessorFnColumnDef.md)\<`TFeatures`, `TData`, `TValue`\> : [`AccessorKeyColumnDef`](AccessorKeyColumnDef.md)\<`TFeatures`, `TData`, `TValue`\> + +#### Example + +```ts +helper.accessor('firstName', { cell: (info) => info.getValue() }) +helper.accessor((row) => row.lastName, { id: 'lastName' }) +``` + +*** + +### columns() + +```ts +columns: (columns) => ColumnDef[] & [...TColumns]; +``` + +Defined in: [helpers/columnHelper.ts:48](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/columnHelper.ts#L48) + +Wraps an array of column definitions to preserve each column's individual TValue type. +Uses variadic tuple types to infer element types before checking constraints, preventing type widening. + +#### Type Parameters + +##### TColumns + +`TColumns` *extends* `ReadonlyArray`\<[`ColumnDef`](ColumnDef.md)\<`TFeatures`, `TData`, `any`\>\> + +#### Parameters + +##### columns + +\[`...TColumns`\] + +#### Returns + +[`ColumnDef`](ColumnDef.md)\<`TFeatures`, `TData`, `any`\>[] & \[`...TColumns`\] + +#### Example + +```ts +helper.columns([helper.accessor('firstName', {}), helper.accessor('age', {})]) +``` + +*** + +### display() + +```ts +display: (column) => DisplayColumnDef; +``` + +Defined in: [helpers/columnHelper.ts:58](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/columnHelper.ts#L58) + +Creates a display column definition for non-data columns like actions or row selection. + +#### Parameters + +##### column + +[`DisplayColumnDef`](DisplayColumnDef.md)\<`TFeatures`, `TData`\> + +#### Returns + +[`DisplayColumnDef`](DisplayColumnDef.md)\<`TFeatures`, `TData`, `unknown`\> + +#### Example + +```ts +helper.display({ id: 'actions', header: 'Actions', cell: () => }) +``` + +*** + +### group() + +```ts +group: (column) => GroupColumnDef; +``` + +Defined in: [helpers/columnHelper.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/columnHelper.ts#L75) + +Creates a group column definition that contains nested child columns. + +#### Parameters + +##### column + +[`GroupColumnDef`](GroupColumnDef.md)\<`TFeatures`, `TData`, `unknown`\> + +#### Returns + +[`GroupColumnDef`](GroupColumnDef.md)\<`TFeatures`, `TData`, `unknown`\> + +#### Example + +```ts +helper.group({ + id: 'name', + header: 'Name', + columns: helper.columns([ + helper.accessor('firstName', {}), + helper.accessor('lastName', { id: 'lastName' }), + ]), +}) +``` diff --git a/docs/reference/type-aliases/ColumnOrderState.md b/docs/reference/type-aliases/ColumnOrderState.md new file mode 100644 index 0000000000..462a70f464 --- /dev/null +++ b/docs/reference/type-aliases/ColumnOrderState.md @@ -0,0 +1,12 @@ +--- +id: ColumnOrderState +title: ColumnOrderState +--- + +# Type Alias: ColumnOrderState + +```ts +type ColumnOrderState = string[]; +``` + +Defined in: [features/column-ordering/columnOrderingFeature.types.ts:5](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L5) diff --git a/docs/reference/type-aliases/ColumnPinningPosition.md b/docs/reference/type-aliases/ColumnPinningPosition.md new file mode 100644 index 0000000000..c95fdc43e8 --- /dev/null +++ b/docs/reference/type-aliases/ColumnPinningPosition.md @@ -0,0 +1,12 @@ +--- +id: ColumnPinningPosition +title: ColumnPinningPosition +--- + +# Type Alias: ColumnPinningPosition + +```ts +type ColumnPinningPosition = false | "left" | "right"; +``` + +Defined in: [features/column-pinning/columnPinningFeature.types.ts:8](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L8) diff --git a/docs/reference/type-aliases/ColumnResizeDirection.md b/docs/reference/type-aliases/ColumnResizeDirection.md new file mode 100644 index 0000000000..89df72023b --- /dev/null +++ b/docs/reference/type-aliases/ColumnResizeDirection.md @@ -0,0 +1,12 @@ +--- +id: ColumnResizeDirection +title: ColumnResizeDirection +--- + +# Type Alias: ColumnResizeDirection + +```ts +type ColumnResizeDirection = "ltr" | "rtl"; +``` + +Defined in: [features/column-resizing/columnResizingFeature.types.ts:18](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L18) diff --git a/docs/reference/type-aliases/ColumnResizeMode.md b/docs/reference/type-aliases/ColumnResizeMode.md new file mode 100644 index 0000000000..b9367fcfd0 --- /dev/null +++ b/docs/reference/type-aliases/ColumnResizeMode.md @@ -0,0 +1,12 @@ +--- +id: ColumnResizeMode +title: ColumnResizeMode +--- + +# Type Alias: ColumnResizeMode + +```ts +type ColumnResizeMode = "onChange" | "onEnd"; +``` + +Defined in: [features/column-resizing/columnResizingFeature.types.ts:16](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L16) diff --git a/docs/reference/type-aliases/ColumnResizingDefaultOptions.md b/docs/reference/type-aliases/ColumnResizingDefaultOptions.md new file mode 100644 index 0000000000..58e7bdad4a --- /dev/null +++ b/docs/reference/type-aliases/ColumnResizingDefaultOptions.md @@ -0,0 +1,15 @@ +--- +id: ColumnResizingDefaultOptions +title: ColumnResizingDefaultOptions +--- + +# Type Alias: ColumnResizingDefaultOptions + +```ts +type ColumnResizingDefaultOptions = Pick; +``` + +Defined in: [features/column-resizing/columnResizingFeature.types.ts:39](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L39) diff --git a/docs/reference/type-aliases/ColumnSizingDefaultOptions.md b/docs/reference/type-aliases/ColumnSizingDefaultOptions.md new file mode 100644 index 0000000000..772e7ee00d --- /dev/null +++ b/docs/reference/type-aliases/ColumnSizingDefaultOptions.md @@ -0,0 +1,12 @@ +--- +id: ColumnSizingDefaultOptions +title: ColumnSizingDefaultOptions +--- + +# Type Alias: ColumnSizingDefaultOptions + +```ts +type ColumnSizingDefaultOptions = Pick; +``` + +Defined in: [features/column-sizing/columnSizingFeature.types.ts:17](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L17) diff --git a/docs/reference/type-aliases/ColumnSizingState.md b/docs/reference/type-aliases/ColumnSizingState.md new file mode 100644 index 0000000000..b486a73a1f --- /dev/null +++ b/docs/reference/type-aliases/ColumnSizingState.md @@ -0,0 +1,12 @@ +--- +id: ColumnSizingState +title: ColumnSizingState +--- + +# Type Alias: ColumnSizingState + +```ts +type ColumnSizingState = Record; +``` + +Defined in: [features/column-sizing/columnSizingFeature.types.ts:8](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L8) diff --git a/docs/reference/type-aliases/ColumnVisibilityState.md b/docs/reference/type-aliases/ColumnVisibilityState.md new file mode 100644 index 0000000000..9ee20f8915 --- /dev/null +++ b/docs/reference/type-aliases/ColumnVisibilityState.md @@ -0,0 +1,12 @@ +--- +id: ColumnVisibilityState +title: ColumnVisibilityState +--- + +# Type Alias: ColumnVisibilityState + +```ts +type ColumnVisibilityState = Record; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:6](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L6) diff --git a/docs/reference/type-aliases/Column_Internal.md b/docs/reference/type-aliases/Column_Internal.md new file mode 100644 index 0000000000..84c8bab815 --- /dev/null +++ b/docs/reference/type-aliases/Column_Internal.md @@ -0,0 +1,34 @@ +--- +id: Column_Internal +title: Column_Internal +--- + +# Type Alias: Column\_Internal\ + +```ts +type Column_Internal = Column & object; +``` + +Defined in: [types/Column.ts:80](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Column.ts#L80) + +## Type Declaration + +### columnDef + +```ts +columnDef: ColumnDefBase_All; +``` + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) + +### TValue + +`TValue` = `unknown` diff --git a/docs/reference/type-aliases/ConstructTableAPIs.md b/docs/reference/type-aliases/ConstructTableAPIs.md new file mode 100644 index 0000000000..87ad451357 --- /dev/null +++ b/docs/reference/type-aliases/ConstructTableAPIs.md @@ -0,0 +1,38 @@ +--- +id: ConstructTableAPIs +title: ConstructTableAPIs +--- + +# Type Alias: ConstructTableAPIs()\ + +```ts +type ConstructTableAPIs = (table) => void; +``` + +Defined in: [types/TableFeatures.ts:45](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L45) + +## Type Parameters + +### TConstructors + +`TConstructors` *extends* `FeatureConstructors` + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) + +## Parameters + +### table + +[`Table_Internal`](Table_Internal.md)\<`TFeatures`, `TData`\> & `Partial`\<`TConstructors`\[`"Table"`\]\> & `object` + +## Returns + +`void` diff --git a/docs/reference/type-aliases/CreateRowModels.md b/docs/reference/type-aliases/CreateRowModels.md new file mode 100644 index 0000000000..d2bcc1f32f --- /dev/null +++ b/docs/reference/type-aliases/CreateRowModels.md @@ -0,0 +1,28 @@ +--- +id: CreateRowModels +title: CreateRowModels +--- + +# Type Alias: CreateRowModels\ + +```ts +type CreateRowModels = CreateRowModel_Core & UnionToIntersection< + | "columnFacetingFeature" extends keyof TFeatures ? CreateRowModel_Faceted : never + | "columnFilteringFeature" extends keyof TFeatures ? CreateRowModel_Filtered : never + | "rowExpandingFeature" extends keyof TFeatures ? CreateRowModel_Expanded : never + | "columnGroupingFeature" extends keyof TFeatures ? CreateRowModel_Grouped : never + | "rowPaginationFeature" extends keyof TFeatures ? CreateRowModel_Paginated : never +| "rowSortingFeature" extends keyof TFeatures ? CreateRowModel_Sorted : never> & ExtractFeatureTypes<"CreateRowModels", TFeatures> & CreateRowModels_Plugins; +``` + +Defined in: [types/RowModel.ts:42](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/RowModel.ts#L42) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) diff --git a/docs/reference/type-aliases/CreateRowModels_All.md b/docs/reference/type-aliases/CreateRowModels_All.md new file mode 100644 index 0000000000..8ae438283e --- /dev/null +++ b/docs/reference/type-aliases/CreateRowModels_All.md @@ -0,0 +1,22 @@ +--- +id: CreateRowModels_All +title: CreateRowModels_All +--- + +# Type Alias: CreateRowModels\_All\ + +```ts +type CreateRowModels_All = CreateRowModel_Core & CreateRowModel_Expanded & CreateRowModel_Faceted & CreateRowModel_Filtered & CreateRowModel_Grouped & CreateRowModel_Paginated & CreateRowModel_Sorted; +``` + +Defined in: [types/RowModel.ts:76](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/RowModel.ts#L76) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) diff --git a/docs/reference/type-aliases/CustomAggregationFns.md b/docs/reference/type-aliases/CustomAggregationFns.md new file mode 100644 index 0000000000..e5ffaa6bb5 --- /dev/null +++ b/docs/reference/type-aliases/CustomAggregationFns.md @@ -0,0 +1,22 @@ +--- +id: CustomAggregationFns +title: CustomAggregationFns +--- + +# Type Alias: CustomAggregationFns\ + +```ts +type CustomAggregationFns = Record>; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:39](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L39) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) diff --git a/docs/reference/type-aliases/CustomFilterFns.md b/docs/reference/type-aliases/CustomFilterFns.md new file mode 100644 index 0000000000..e6d01a4713 --- /dev/null +++ b/docs/reference/type-aliases/CustomFilterFns.md @@ -0,0 +1,22 @@ +--- +id: CustomFilterFns +title: CustomFilterFns +--- + +# Type Alias: CustomFilterFns\ + +```ts +type CustomFilterFns = Record>; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:71](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L71) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) diff --git a/docs/reference/type-aliases/CustomSortFns.md b/docs/reference/type-aliases/CustomSortFns.md new file mode 100644 index 0000000000..9543336bdf --- /dev/null +++ b/docs/reference/type-aliases/CustomSortFns.md @@ -0,0 +1,22 @@ +--- +id: CustomSortFns +title: CustomSortFns +--- + +# Type Alias: CustomSortFns\ + +```ts +type CustomSortFns = Record>; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:41](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L41) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) diff --git a/docs/reference/type-aliases/DebugOptions.md b/docs/reference/type-aliases/DebugOptions.md new file mode 100644 index 0000000000..24f4b37697 --- /dev/null +++ b/docs/reference/type-aliases/DebugOptions.md @@ -0,0 +1,62 @@ +--- +id: DebugOptions +title: DebugOptions +--- + +# Type Alias: DebugOptions\ + +```ts +type DebugOptions = object & DebugKeysFor; +``` + +Defined in: [types/TableOptions.ts:41](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableOptions.ts#L41) + +## Type Declaration + +### debugAll? + +```ts +optional debugAll: boolean; +``` + +### debugCache? + +```ts +optional debugCache: boolean; +``` + +### debugCells? + +```ts +optional debugCells: boolean; +``` + +### debugColumns? + +```ts +optional debugColumns: boolean; +``` + +### debugHeaders? + +```ts +optional debugHeaders: boolean; +``` + +### debugRows? + +```ts +optional debugRows: boolean; +``` + +### debugTable? + +```ts +optional debugTable: boolean; +``` + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) diff --git a/docs/reference/type-aliases/DeepKeys.md b/docs/reference/type-aliases/DeepKeys.md new file mode 100644 index 0000000000..492a70f0ca --- /dev/null +++ b/docs/reference/type-aliases/DeepKeys.md @@ -0,0 +1,24 @@ +--- +id: DeepKeys +title: DeepKeys +--- + +# Type Alias: DeepKeys\ + +```ts +type DeepKeys = TDepth["length"] extends 5 ? never : unknown extends T ? string : T extends ReadonlyArray & IsTuple ? + | AllowedIndexes + | DeepKeysPrefix, TDepth> : T extends any[] ? DeepKeys : T extends Date ? never : T extends object ? keyof T & string | DeepKeysPrefix : never; +``` + +Defined in: [types/type-utils.ts:46](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/type-utils.ts#L46) + +## Type Parameters + +### T + +`T` + +### TDepth + +`TDepth` *extends* `any`[] = \[\] diff --git a/docs/reference/type-aliases/DeepValue.md b/docs/reference/type-aliases/DeepValue.md new file mode 100644 index 0000000000..a218d29cef --- /dev/null +++ b/docs/reference/type-aliases/DeepValue.md @@ -0,0 +1,22 @@ +--- +id: DeepValue +title: DeepValue +--- + +# Type Alias: DeepValue\ + +```ts +type DeepValue = T extends Record ? TProp extends `${infer TBranch}.${infer TDeepProp}` ? DeepValue : T[TProp & string] : never; +``` + +Defined in: [types/type-utils.ts:71](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/type-utils.ts#L71) + +## Type Parameters + +### T + +`T` + +### TProp + +`TProp` diff --git a/docs/reference/type-aliases/DisplayColumnDef.md b/docs/reference/type-aliases/DisplayColumnDef.md new file mode 100644 index 0000000000..ace9c7ea70 --- /dev/null +++ b/docs/reference/type-aliases/DisplayColumnDef.md @@ -0,0 +1,26 @@ +--- +id: DisplayColumnDef +title: DisplayColumnDef +--- + +# Type Alias: DisplayColumnDef\ + +```ts +type DisplayColumnDef = ColumnDefBase & ColumnIdentifiers; +``` + +Defined in: [types/ColumnDef.ts:142](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L142) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md) diff --git a/docs/reference/type-aliases/ExpandedState.md b/docs/reference/type-aliases/ExpandedState.md new file mode 100644 index 0000000000..3f083c0be2 --- /dev/null +++ b/docs/reference/type-aliases/ExpandedState.md @@ -0,0 +1,12 @@ +--- +id: ExpandedState +title: ExpandedState +--- + +# Type Alias: ExpandedState + +```ts +type ExpandedState = true | Record; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:8](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L8) diff --git a/docs/reference/type-aliases/ExpandedStateList.md b/docs/reference/type-aliases/ExpandedStateList.md new file mode 100644 index 0000000000..f61d5b51f1 --- /dev/null +++ b/docs/reference/type-aliases/ExpandedStateList.md @@ -0,0 +1,12 @@ +--- +id: ExpandedStateList +title: ExpandedStateList +--- + +# Type Alias: ExpandedStateList + +```ts +type ExpandedStateList = Record; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:7](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L7) diff --git a/docs/reference/type-aliases/ExtractFeatureTypes.md b/docs/reference/type-aliases/ExtractFeatureTypes.md new file mode 100644 index 0000000000..e52d49b7ca --- /dev/null +++ b/docs/reference/type-aliases/ExtractFeatureTypes.md @@ -0,0 +1,22 @@ +--- +id: ExtractFeatureTypes +title: ExtractFeatureTypes +--- + +# Type Alias: ExtractFeatureTypes\ + +```ts +type ExtractFeatureTypes = UnionToIntersection<{ [K in keyof TFeatures]: TFeatures[K] extends TableFeature ? TKey extends keyof FeatureConstructorOptions ? FeatureConstructorOptions[TKey] : never : any }[keyof TFeatures]>; +``` + +Defined in: [types/TableFeatures.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L10) + +## Type Parameters + +### TKey + +`TKey` *extends* keyof `FeatureConstructors` + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) diff --git a/docs/reference/type-aliases/FilterFnOption.md b/docs/reference/type-aliases/FilterFnOption.md new file mode 100644 index 0000000000..3cb48c19c4 --- /dev/null +++ b/docs/reference/type-aliases/FilterFnOption.md @@ -0,0 +1,26 @@ +--- +id: FilterFnOption +title: FilterFnOption +--- + +# Type Alias: FilterFnOption\ + +```ts +type FilterFnOption = + | "auto" + | BuiltInFilterFn + | keyof FilterFns +| FilterFn; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:76](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L76) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) diff --git a/docs/reference/type-aliases/GetDefaultColumnDef.md b/docs/reference/type-aliases/GetDefaultColumnDef.md new file mode 100644 index 0000000000..bc83c5d5bf --- /dev/null +++ b/docs/reference/type-aliases/GetDefaultColumnDef.md @@ -0,0 +1,36 @@ +--- +id: GetDefaultColumnDef +title: GetDefaultColumnDef +--- + +# Type Alias: GetDefaultColumnDef()\ + +```ts +type GetDefaultColumnDef = () => ColumnDefBase_All & Partial; +``` + +Defined in: [types/TableFeatures.ts:55](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L55) + +## Type Parameters + +### TConstructors + +`TConstructors` *extends* `FeatureConstructors` + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md) + +## Returns + +[`ColumnDefBase_All`](ColumnDefBase_All.md)\<`TFeatures`, `TData`, `TValue`\> & `Partial`\<`TConstructors`\[`"ColumnDef"`\]\> diff --git a/docs/reference/type-aliases/GetDefaultStateSelector.md b/docs/reference/type-aliases/GetDefaultStateSelector.md new file mode 100644 index 0000000000..486d6f0b51 --- /dev/null +++ b/docs/reference/type-aliases/GetDefaultStateSelector.md @@ -0,0 +1,28 @@ +--- +id: GetDefaultStateSelector +title: GetDefaultStateSelector +--- + +# Type Alias: GetDefaultStateSelector()\ + +```ts +type GetDefaultStateSelector = (state) => Partial & Partial; +``` + +Defined in: [types/TableFeatures.ts:72](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L72) + +## Type Parameters + +### TConstructors + +`TConstructors` *extends* `FeatureConstructors` + +## Parameters + +### state + +[`TableState_All`](TableState_All.md) + +## Returns + +`Partial`\<[`TableState_All`](TableState_All.md)\> & `Partial`\<`TConstructors`\[`"TableState"`\]\> diff --git a/docs/reference/type-aliases/GetDefaultTableOptions.md b/docs/reference/type-aliases/GetDefaultTableOptions.md new file mode 100644 index 0000000000..867abc8fdd --- /dev/null +++ b/docs/reference/type-aliases/GetDefaultTableOptions.md @@ -0,0 +1,38 @@ +--- +id: GetDefaultTableOptions +title: GetDefaultTableOptions +--- + +# Type Alias: GetDefaultTableOptions()\ + +```ts +type GetDefaultTableOptions = (table) => Partial> & Partial; +``` + +Defined in: [types/TableFeatures.ts:62](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L62) + +## Type Parameters + +### TConstructors + +`TConstructors` *extends* `FeatureConstructors` + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) + +## Parameters + +### table + +[`Table_Internal`](Table_Internal.md)\<`TFeatures`, `TData`\> & `Partial`\<`TConstructors`\[`"Table"`\]\> + +## Returns + +`Partial`\<[`TableOptions_All`](TableOptions_All.md)\<`TFeatures`, `TData`\>\> & `Partial`\<`TConstructors`\[`"TableOptions"`\]\> diff --git a/docs/reference/type-aliases/GetInitialState.md b/docs/reference/type-aliases/GetInitialState.md new file mode 100644 index 0000000000..1ebf5fb99b --- /dev/null +++ b/docs/reference/type-aliases/GetInitialState.md @@ -0,0 +1,28 @@ +--- +id: GetInitialState +title: GetInitialState +--- + +# Type Alias: GetInitialState()\ + +```ts +type GetInitialState = (initialState) => TableState_All & Partial; +``` + +Defined in: [types/TableFeatures.ts:68](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L68) + +## Type Parameters + +### TConstructors + +`TConstructors` *extends* `FeatureConstructors` + +## Parameters + +### initialState + +`Partial`\<[`TableState_All`](TableState_All.md)\> & `Partial`\<`TConstructors`\[`"TableState"`\]\> + +## Returns + +[`TableState_All`](TableState_All.md) & `Partial`\<`TConstructors`\[`"TableState"`\]\> diff --git a/docs/reference/type-aliases/Getter.md b/docs/reference/type-aliases/Getter.md new file mode 100644 index 0000000000..3f894da629 --- /dev/null +++ b/docs/reference/type-aliases/Getter.md @@ -0,0 +1,28 @@ +--- +id: Getter +title: Getter +--- + +# Type Alias: Getter()\ + +```ts +type Getter = () => NoInfer; +``` + +Defined in: [types/type-utils.ts:80](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/type-utils.ts#L80) + +## Type Parameters + +### TValue + +`TValue` + +## Type Parameters + +### TTValue + +`TTValue` = `TValue` + +## Returns + +[`NoInfer`](NoInfer.md)\<`TTValue`\> diff --git a/docs/reference/type-aliases/GroupColumnDef.md b/docs/reference/type-aliases/GroupColumnDef.md new file mode 100644 index 0000000000..2a6a72d73f --- /dev/null +++ b/docs/reference/type-aliases/GroupColumnDef.md @@ -0,0 +1,26 @@ +--- +id: GroupColumnDef +title: GroupColumnDef +--- + +# Type Alias: GroupColumnDef\ + +```ts +type GroupColumnDef = GroupColumnDefBase & ColumnIdentifiers; +``` + +Defined in: [types/ColumnDef.ts:156](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L156) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md) diff --git a/docs/reference/type-aliases/GroupingColumnMode.md b/docs/reference/type-aliases/GroupingColumnMode.md new file mode 100644 index 0000000000..6034d551e8 --- /dev/null +++ b/docs/reference/type-aliases/GroupingColumnMode.md @@ -0,0 +1,12 @@ +--- +id: GroupingColumnMode +title: GroupingColumnMode +--- + +# Type Alias: GroupingColumnMode + +```ts +type GroupingColumnMode = false | "reorder" | "remove"; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:171](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L171) diff --git a/docs/reference/type-aliases/GroupingState.md b/docs/reference/type-aliases/GroupingState.md new file mode 100644 index 0000000000..40690ac7cf --- /dev/null +++ b/docs/reference/type-aliases/GroupingState.md @@ -0,0 +1,12 @@ +--- +id: GroupingState +title: GroupingState +--- + +# Type Alias: GroupingState + +```ts +type GroupingState = string[]; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L15) diff --git a/docs/reference/type-aliases/Header.md b/docs/reference/type-aliases/Header.md new file mode 100644 index 0000000000..0a7f21d453 --- /dev/null +++ b/docs/reference/type-aliases/Header.md @@ -0,0 +1,28 @@ +--- +id: Header +title: Header +--- + +# Type Alias: Header\ + +```ts +type Header = Header_Core & UnionToIntersection< + | "columnSizingFeature" extends keyof TFeatures ? Header_ColumnSizing : never +| "columnResizingFeature" extends keyof TFeatures ? Header_ColumnResizing : never> & ExtractFeatureTypes<"Header", TFeatures> & Header_Plugins; +``` + +Defined in: [types/Header.ts:23](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Header.ts#L23) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md) diff --git a/docs/reference/type-aliases/HeaderGroup.md b/docs/reference/type-aliases/HeaderGroup.md new file mode 100644 index 0000000000..10918eec2b --- /dev/null +++ b/docs/reference/type-aliases/HeaderGroup.md @@ -0,0 +1,22 @@ +--- +id: HeaderGroup +title: HeaderGroup +--- + +# Type Alias: HeaderGroup\ + +```ts +type HeaderGroup = HeaderGroup_Core & ExtractFeatureTypes<"HeaderGroup", TFeatures> & HeaderGroup_Plugins; +``` + +Defined in: [types/HeaderGroup.ts:19](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/HeaderGroup.ts#L19) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) diff --git a/docs/reference/type-aliases/IdentifiedColumnDef.md b/docs/reference/type-aliases/IdentifiedColumnDef.md new file mode 100644 index 0000000000..2dcfeafae5 --- /dev/null +++ b/docs/reference/type-aliases/IdentifiedColumnDef.md @@ -0,0 +1,40 @@ +--- +id: IdentifiedColumnDef +title: IdentifiedColumnDef +--- + +# Type Alias: IdentifiedColumnDef\ + +```ts +type IdentifiedColumnDef = ColumnDefBase & object; +``` + +Defined in: [types/ColumnDef.ts:133](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L133) + +## Type Declaration + +### header? + +```ts +optional header: StringOrTemplateHeader; +``` + +### id? + +```ts +optional id: string; +``` + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md) diff --git a/docs/reference/type-aliases/InitRowInstanceData.md b/docs/reference/type-aliases/InitRowInstanceData.md new file mode 100644 index 0000000000..53db1bcfa6 --- /dev/null +++ b/docs/reference/type-aliases/InitRowInstanceData.md @@ -0,0 +1,38 @@ +--- +id: InitRowInstanceData +title: InitRowInstanceData +--- + +# Type Alias: InitRowInstanceData()\ + +```ts +type InitRowInstanceData = (row) => void; +``` + +Defined in: [types/TableFeatures.ts:109](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L109) + +## Type Parameters + +### TConstructors + +`TConstructors` *extends* `FeatureConstructors` + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) + +## Parameters + +### row + +[`Row`](Row.md)\<`TFeatures`, `TData`\> & `Partial`\<`TConstructors`\[`"Row"`\]\> + +## Returns + +`void` diff --git a/docs/reference/type-aliases/MemoFnMeta.md b/docs/reference/type-aliases/MemoFnMeta.md new file mode 100644 index 0000000000..8bd1a0b73b --- /dev/null +++ b/docs/reference/type-aliases/MemoFnMeta.md @@ -0,0 +1,22 @@ +--- +id: MemoFnMeta +title: MemoFnMeta +--- + +# Type Alias: MemoFnMeta + +```ts +type MemoFnMeta = object; +``` + +Defined in: [utils.ts:62](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L62) + +## Properties + +### originalArgsLength? + +```ts +optional originalArgsLength: number; +``` + +Defined in: [utils.ts:62](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L62) diff --git a/docs/reference/type-aliases/NoInfer.md b/docs/reference/type-aliases/NoInfer.md new file mode 100644 index 0000000000..d114f1f8cc --- /dev/null +++ b/docs/reference/type-aliases/NoInfer.md @@ -0,0 +1,18 @@ +--- +id: NoInfer +title: NoInfer +--- + +# Type Alias: NoInfer\ + +```ts +type NoInfer = [T][T extends any ? 0 : never]; +``` + +Defined in: [types/type-utils.ts:78](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/type-utils.ts#L78) + +## Type Parameters + +### T + +`T` diff --git a/docs/reference/type-aliases/OnChangeFn.md b/docs/reference/type-aliases/OnChangeFn.md new file mode 100644 index 0000000000..6b84ff8b45 --- /dev/null +++ b/docs/reference/type-aliases/OnChangeFn.md @@ -0,0 +1,28 @@ +--- +id: OnChangeFn +title: OnChangeFn +--- + +# Type Alias: OnChangeFn()\ + +```ts +type OnChangeFn = (updaterOrValue) => void; +``` + +Defined in: [types/type-utils.ts:3](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/type-utils.ts#L3) + +## Type Parameters + +### T + +`T` + +## Parameters + +### updaterOrValue + +[`Updater`](Updater.md)\<`T`\> + +## Returns + +`void` diff --git a/docs/reference/type-aliases/PartialKeys.md b/docs/reference/type-aliases/PartialKeys.md new file mode 100644 index 0000000000..560bb4cfbf --- /dev/null +++ b/docs/reference/type-aliases/PartialKeys.md @@ -0,0 +1,22 @@ +--- +id: PartialKeys +title: PartialKeys +--- + +# Type Alias: PartialKeys\ + +```ts +type PartialKeys = Omit & Partial>; +``` + +Defined in: [types/type-utils.ts:9](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/type-utils.ts#L9) + +## Type Parameters + +### T + +`T` + +### K + +`K` *extends* keyof `T` diff --git a/docs/reference/type-aliases/Prettify.md b/docs/reference/type-aliases/Prettify.md new file mode 100644 index 0000000000..308b5177aa --- /dev/null +++ b/docs/reference/type-aliases/Prettify.md @@ -0,0 +1,18 @@ +--- +id: Prettify +title: Prettify +--- + +# Type Alias: Prettify\ + +```ts +type Prettify = { [K in keyof T]: T[K] } & unknown; +``` + +Defined in: [types/type-utils.ts:82](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/type-utils.ts#L82) + +## Type Parameters + +### T + +`T` diff --git a/docs/reference/type-aliases/PrototypeAPIObject.md b/docs/reference/type-aliases/PrototypeAPIObject.md new file mode 100644 index 0000000000..a49ea8560c --- /dev/null +++ b/docs/reference/type-aliases/PrototypeAPIObject.md @@ -0,0 +1,22 @@ +--- +id: PrototypeAPIObject +title: PrototypeAPIObject +--- + +# Type Alias: PrototypeAPIObject\ + +```ts +type PrototypeAPIObject = Record>; +``` + +Defined in: [utils.ts:327](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L327) + +## Type Parameters + +### TDeps + +`TDeps` *extends* `ReadonlyArray`\<`any`\> + +### TDepArgs + +`TDepArgs` diff --git a/docs/reference/type-aliases/RequiredKeys.md b/docs/reference/type-aliases/RequiredKeys.md new file mode 100644 index 0000000000..bbf82b7740 --- /dev/null +++ b/docs/reference/type-aliases/RequiredKeys.md @@ -0,0 +1,22 @@ +--- +id: RequiredKeys +title: RequiredKeys +--- + +# Type Alias: RequiredKeys\ + +```ts +type RequiredKeys = Omit & Required>; +``` + +Defined in: [types/type-utils.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/type-utils.ts#L11) + +## Type Parameters + +### T + +`T` + +### K + +`K` *extends* keyof `T` diff --git a/docs/reference/type-aliases/Row.md b/docs/reference/type-aliases/Row.md new file mode 100644 index 0000000000..3952ae74ba --- /dev/null +++ b/docs/reference/type-aliases/Row.md @@ -0,0 +1,29 @@ +--- +id: Row +title: Row +--- + +# Type Alias: Row\ + +```ts +type Row = Row_Core & UnionToIntersection< + | "columnFilteringFeature" extends keyof TFeatures ? Row_ColumnFiltering : never + | "columnGroupingFeature" extends keyof TFeatures ? Row_ColumnGrouping : never + | "columnPinningFeature" extends keyof TFeatures ? Row_ColumnPinning : never + | "columnVisibilityFeature" extends keyof TFeatures ? Row_ColumnVisibility : never + | "rowExpandingFeature" extends keyof TFeatures ? Row_RowExpanding : never + | "rowPinningFeature" extends keyof TFeatures ? Row_RowPinning : never +| "rowSelectionFeature" extends keyof TFeatures ? Row_RowSelection : never> & ExtractFeatureTypes<"Row", TFeatures> & Row_Plugins; +``` + +Defined in: [types/Row.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Row.ts#L26) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) diff --git a/docs/reference/type-aliases/RowData.md b/docs/reference/type-aliases/RowData.md new file mode 100644 index 0000000000..752ab32417 --- /dev/null +++ b/docs/reference/type-aliases/RowData.md @@ -0,0 +1,12 @@ +--- +id: RowData +title: RowData +--- + +# Type Alias: RowData + +```ts +type RowData = Record | any[]; +``` + +Defined in: [types/type-utils.ts:5](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/type-utils.ts#L5) diff --git a/docs/reference/type-aliases/RowModelFns.md b/docs/reference/type-aliases/RowModelFns.md new file mode 100644 index 0000000000..35fb67dbbc --- /dev/null +++ b/docs/reference/type-aliases/RowModelFns.md @@ -0,0 +1,25 @@ +--- +id: RowModelFns +title: RowModelFns +--- + +# Type Alias: RowModelFns\ + +```ts +type RowModelFns = Partial : never + | "columnGroupingFeature" extends keyof TFeatures ? RowModelFns_ColumnGrouping : never +| "rowSortingFeature" extends keyof TFeatures ? RowModelFns_RowSorting : never> & ExtractFeatureTypes<"RowModelFns", TFeatures> & RowModelFns_Plugins>; +``` + +Defined in: [types/RowModelFns.ts:18](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/RowModelFns.ts#L18) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) diff --git a/docs/reference/type-aliases/RowModelFns_All.md b/docs/reference/type-aliases/RowModelFns_All.md new file mode 100644 index 0000000000..fcef1570c3 --- /dev/null +++ b/docs/reference/type-aliases/RowModelFns_All.md @@ -0,0 +1,22 @@ +--- +id: RowModelFns_All +title: RowModelFns_All +--- + +# Type Alias: RowModelFns\_All\ + +```ts +type RowModelFns_All = Partial & RowModelFns_ColumnGrouping & RowModelFns_RowSorting>; +``` + +Defined in: [types/RowModelFns.ts:44](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/RowModelFns.ts#L44) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) diff --git a/docs/reference/type-aliases/RowPinningPosition.md b/docs/reference/type-aliases/RowPinningPosition.md new file mode 100644 index 0000000000..4aeb8352ab --- /dev/null +++ b/docs/reference/type-aliases/RowPinningPosition.md @@ -0,0 +1,12 @@ +--- +id: RowPinningPosition +title: RowPinningPosition +--- + +# Type Alias: RowPinningPosition + +```ts +type RowPinningPosition = false | "top" | "bottom"; +``` + +Defined in: [features/row-pinning/rowPinningFeature.types.ts:5](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L5) diff --git a/docs/reference/type-aliases/RowSelectionState.md b/docs/reference/type-aliases/RowSelectionState.md new file mode 100644 index 0000000000..6c89907474 --- /dev/null +++ b/docs/reference/type-aliases/RowSelectionState.md @@ -0,0 +1,12 @@ +--- +id: RowSelectionState +title: RowSelectionState +--- + +# Type Alias: RowSelectionState + +```ts +type RowSelectionState = Record; +``` + +Defined in: [features/row-selection/rowSelectionFeature.types.ts:6](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L6) diff --git a/docs/reference/type-aliases/SortDirection.md b/docs/reference/type-aliases/SortDirection.md new file mode 100644 index 0000000000..6f7c1078ab --- /dev/null +++ b/docs/reference/type-aliases/SortDirection.md @@ -0,0 +1,12 @@ +--- +id: SortDirection +title: SortDirection +--- + +# Type Alias: SortDirection + +```ts +type SortDirection = "asc" | "desc"; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:8](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L8) diff --git a/docs/reference/type-aliases/SortFnOption.md b/docs/reference/type-aliases/SortFnOption.md new file mode 100644 index 0000000000..bdca371be4 --- /dev/null +++ b/docs/reference/type-aliases/SortFnOption.md @@ -0,0 +1,26 @@ +--- +id: SortFnOption +title: SortFnOption +--- + +# Type Alias: SortFnOption\ + +```ts +type SortFnOption = + | "auto" + | keyof SortFns + | BuiltInSortFn +| SortFn; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:46](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L46) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) diff --git a/docs/reference/type-aliases/SortingState.md b/docs/reference/type-aliases/SortingState.md new file mode 100644 index 0000000000..954185c4d8 --- /dev/null +++ b/docs/reference/type-aliases/SortingState.md @@ -0,0 +1,12 @@ +--- +id: SortingState +title: SortingState +--- + +# Type Alias: SortingState + +```ts +type SortingState = ColumnSort[]; +``` + +Defined in: [features/row-sorting/rowSortingFeature.types.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L15) diff --git a/docs/reference/type-aliases/StringOrTemplateHeader.md b/docs/reference/type-aliases/StringOrTemplateHeader.md new file mode 100644 index 0000000000..b63735544b --- /dev/null +++ b/docs/reference/type-aliases/StringOrTemplateHeader.md @@ -0,0 +1,28 @@ +--- +id: StringOrTemplateHeader +title: StringOrTemplateHeader +--- + +# Type Alias: StringOrTemplateHeader\ + +```ts +type StringOrTemplateHeader = + | string +| ColumnDefTemplate>; +``` + +Defined in: [types/ColumnDef.ts:39](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L39) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md) diff --git a/docs/reference/type-aliases/Table.md b/docs/reference/type-aliases/Table.md new file mode 100644 index 0000000000..a35164e648 --- /dev/null +++ b/docs/reference/type-aliases/Table.md @@ -0,0 +1,38 @@ +--- +id: Table +title: Table +--- + +# Type Alias: Table\ + +```ts +type Table = Table_Core & UnionToIntersection< + | "columnFilteringFeature" extends keyof TFeatures ? Table_ColumnFiltering : never + | "columnGroupingFeature" extends keyof TFeatures ? Table_ColumnGrouping : never + | "columnOrderingFeature" extends keyof TFeatures ? Table_ColumnOrdering : never + | "columnPinningFeature" extends keyof TFeatures ? Table_ColumnPinning : never + | "columnResizingFeature" extends keyof TFeatures ? Table_ColumnResizing : never + | "columnSizingFeature" extends keyof TFeatures ? Table_ColumnSizing : never + | "columnVisibilityFeature" extends keyof TFeatures ? Table_ColumnVisibility : never + | "columnFacetingFeature" extends keyof TFeatures ? Table_ColumnFaceting : never + | "globalFilteringFeature" extends keyof TFeatures ? Table_GlobalFiltering : never + | "rowExpandingFeature" extends keyof TFeatures ? Table_RowExpanding : never + | "rowPaginationFeature" extends keyof TFeatures ? Table_RowPagination : never + | "rowPinningFeature" extends keyof TFeatures ? Table_RowPinning : never + | "rowSelectionFeature" extends keyof TFeatures ? Table_RowSelection : never +| "rowSortingFeature" extends keyof TFeatures ? Table_RowSorting : never> & ExtractFeatureTypes<"Table", TFeatures> & Table_Plugins; +``` + +Defined in: [types/Table.ts:53](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Table.ts#L53) + +The table object that includes both the core table functionality and the features that are enabled via the `_features` table option. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) diff --git a/docs/reference/type-aliases/TableHelperOptions.md b/docs/reference/type-aliases/TableHelperOptions.md new file mode 100644 index 0000000000..c76017cc56 --- /dev/null +++ b/docs/reference/type-aliases/TableHelperOptions.md @@ -0,0 +1,29 @@ +--- +id: TableHelperOptions +title: TableHelperOptions +--- + +# Type Alias: TableHelperOptions\ + +```ts +type TableHelperOptions = Omit, "columns" | "data" | "store" | "state" | "initialState"> & object; +``` + +Defined in: [helpers/tableHelper.ts:12](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableHelper.ts#L12) + +Options for creating a table helper to share common options across multiple tables +coreColumnsFeature, data, and state are excluded from this type and reserved for only the `useTable`/`createTable` functions + +## Type Declaration + +### \_features + +```ts +_features: TFeatures; +``` + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) diff --git a/docs/reference/type-aliases/TableHelper_Core.md b/docs/reference/type-aliases/TableHelper_Core.md new file mode 100644 index 0000000000..4e2fd47068 --- /dev/null +++ b/docs/reference/type-aliases/TableHelper_Core.md @@ -0,0 +1,90 @@ +--- +id: TableHelper_Core +title: TableHelper_Core +--- + +# Type Alias: TableHelper\_Core\ + +```ts +type TableHelper_Core = object; +``` + +Defined in: [helpers/tableHelper.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableHelper.ts#L22) + +Internal type that each adapter package will build off of to create a table helper + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +## Properties + +### createColumnHelper() + +```ts +createColumnHelper: () => ColumnHelper; +``` + +Defined in: [helpers/tableHelper.ts:23](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableHelper.ts#L23) + +#### Type Parameters + +##### TData + +`TData` *extends* [`RowData`](RowData.md) + +#### Returns + +[`ColumnHelper`](ColumnHelper.md)\<`TFeatures`, `TData`\> + +*** + +### features + +```ts +features: TFeatures; +``` + +Defined in: [helpers/tableHelper.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableHelper.ts#L27) + +*** + +### options + +```ts +options: Omit, "columns" | "data" | "store" | "state" | "initialState">; +``` + +Defined in: [helpers/tableHelper.ts:28](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableHelper.ts#L28) + +*** + +### tableCreator() + +```ts +tableCreator: (tableOptions, selector?) => Table; +``` + +Defined in: [helpers/tableHelper.ts:32](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableHelper.ts#L32) + +#### Type Parameters + +##### TData + +`TData` *extends* [`RowData`](RowData.md) + +#### Parameters + +##### tableOptions + +`Omit`\<[`TableOptions`](TableOptions.md)\<`TFeatures`, `TData`\>, `"_features"` \| `"_rowModels"`\> + +##### selector? + +`any` + +#### Returns + +[`Table`](Table.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/type-aliases/TableOptions.md b/docs/reference/type-aliases/TableOptions.md new file mode 100644 index 0000000000..fc7f03a758 --- /dev/null +++ b/docs/reference/type-aliases/TableOptions.md @@ -0,0 +1,35 @@ +--- +id: TableOptions +title: TableOptions +--- + +# Type Alias: TableOptions\ + +```ts +type TableOptions = TableOptions_Core & UnionToIntersection< + | "columnFilteringFeature" extends keyof TFeatures ? TableOptions_ColumnFiltering : never + | "columnGroupingFeature" extends keyof TFeatures ? TableOptions_ColumnGrouping : never + | "columnOrderingFeature" extends keyof TFeatures ? TableOptions_ColumnOrdering : never + | "columnPinningFeature" extends keyof TFeatures ? TableOptions_ColumnPinning : never + | "columnResizingFeature" extends keyof TFeatures ? TableOptions_ColumnResizing : never + | "columnSizingFeature" extends keyof TFeatures ? TableOptions_ColumnSizing : never + | "columnVisibilityFeature" extends keyof TFeatures ? TableOptions_ColumnVisibility : never + | "globalFilteringFeature" extends keyof TFeatures ? TableOptions_GlobalFiltering : never + | "rowExpandingFeature" extends keyof TFeatures ? TableOptions_RowExpanding : never + | "rowPaginationFeature" extends keyof TFeatures ? TableOptions_RowPagination : never + | "rowPinningFeature" extends keyof TFeatures ? TableOptions_RowPinning : never + | "rowSelectionFeature" extends keyof TFeatures ? TableOptions_RowSelection : never +| "rowSortingFeature" extends keyof TFeatures ? TableOptions_RowSorting : never> & ExtractFeatureTypes<"TableOptions", TFeatures> & TableOptions_Plugins & DebugOptions; +``` + +Defined in: [types/TableOptions.ts:51](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableOptions.ts#L51) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) diff --git a/docs/reference/type-aliases/TableOptions_All.md b/docs/reference/type-aliases/TableOptions_All.md new file mode 100644 index 0000000000..e05e46d917 --- /dev/null +++ b/docs/reference/type-aliases/TableOptions_All.md @@ -0,0 +1,22 @@ +--- +id: TableOptions_All +title: TableOptions_All +--- + +# Type Alias: TableOptions\_All\ + +```ts +type TableOptions_All = TableOptions_Core & Partial & TableOptions_ColumnGrouping & TableOptions_ColumnOrdering & TableOptions_ColumnPinning & TableOptions_ColumnResizing & TableOptions_ColumnSizing & TableOptions_ColumnVisibility & TableOptions_GlobalFiltering & TableOptions_RowExpanding & TableOptions_RowPagination & TableOptions_RowPinning & TableOptions_RowSelection & TableOptions_RowSorting>; +``` + +Defined in: [types/TableOptions.ts:107](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableOptions.ts#L107) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) diff --git a/docs/reference/type-aliases/TableState.md b/docs/reference/type-aliases/TableState.md new file mode 100644 index 0000000000..c8b8d8fdc2 --- /dev/null +++ b/docs/reference/type-aliases/TableState.md @@ -0,0 +1,31 @@ +--- +id: TableState +title: TableState +--- + +# Type Alias: TableState\ + +```ts +type TableState = UnionToIntersection< + | "columnFilteringFeature" extends keyof TFeatures ? TableState_ColumnFiltering : never + | "columnGroupingFeature" extends keyof TFeatures ? TableState_ColumnGrouping : never + | "columnOrderingFeature" extends keyof TFeatures ? TableState_ColumnOrdering : never + | "columnPinningFeature" extends keyof TFeatures ? TableState_ColumnPinning : never + | "columnResizingFeature" extends keyof TFeatures ? TableState_ColumnResizing : never + | "columnSizingFeature" extends keyof TFeatures ? TableState_ColumnSizing : never + | "columnVisibilityFeature" extends keyof TFeatures ? TableState_ColumnVisibility : never + | "globalFilteringFeature" extends keyof TFeatures ? TableState_GlobalFiltering : never + | "rowExpandingFeature" extends keyof TFeatures ? TableState_RowExpanding : never + | "rowPaginationFeature" extends keyof TFeatures ? TableState_RowPagination : never + | "rowPinningFeature" extends keyof TFeatures ? TableState_RowPinning : never + | "rowSelectionFeature" extends keyof TFeatures ? TableState_RowSelection : never +| "rowSortingFeature" extends keyof TFeatures ? TableState_RowSorting : never> & ExtractFeatureTypes<"TableState", TFeatures> & TableState_Plugins; +``` + +Defined in: [types/TableState.ts:23](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableState.ts#L23) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) diff --git a/docs/reference/type-aliases/TableState_All.md b/docs/reference/type-aliases/TableState_All.md new file mode 100644 index 0000000000..4062716898 --- /dev/null +++ b/docs/reference/type-aliases/TableState_All.md @@ -0,0 +1,12 @@ +--- +id: TableState_All +title: TableState_All +--- + +# Type Alias: TableState\_All + +```ts +type TableState_All = Partial; +``` + +Defined in: [types/TableState.ts:74](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableState.ts#L74) diff --git a/docs/reference/type-aliases/Table_Core.md b/docs/reference/type-aliases/Table_Core.md new file mode 100644 index 0000000000..905d32b0ae --- /dev/null +++ b/docs/reference/type-aliases/Table_Core.md @@ -0,0 +1,25 @@ +--- +id: Table_Core +title: Table_Core +--- + +# Type Alias: Table\_Core\ + +```ts +type Table_Core = Table_Table & Table_Columns & Table_Rows & Table_RowModels & Table_Headers; +``` + +Defined in: [types/Table.ts:41](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Table.ts#L41) + +The core table object that only includes the core table functionality such as column, header, row, and table APIS. +No features are included. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) diff --git a/docs/reference/type-aliases/Table_Internal.md b/docs/reference/type-aliases/Table_Internal.md new file mode 100644 index 0000000000..36aa9f7d31 --- /dev/null +++ b/docs/reference/type-aliases/Table_Internal.md @@ -0,0 +1,80 @@ +--- +id: Table_Internal +title: Table_Internal +--- + +# Type Alias: Table\_Internal\ + +```ts +type Table_Internal = Table & object; +``` + +Defined in: [types/Table.ts:111](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Table.ts#L111) + +## Type Declaration + +### \_rowModelFns + +```ts +_rowModelFns: RowModelFns_All; +``` + +### \_rowModels + +```ts +_rowModels: CachedRowModel_All; +``` + +### baseStore + +```ts +baseStore: Store; +``` + +### initialState + +```ts +initialState: TableState_All; +``` + +### options + +```ts +options: TableOptions_All & object; +``` + +#### Type Declaration + +##### \_rowModels? + +```ts +optional _rowModels: CreateRowModels_All; +``` + +##### initialState? + +```ts +optional initialState: TableState_All; +``` + +##### state? + +```ts +optional state: TableState_All; +``` + +### store + +```ts +store: ReadonlyStore; +``` + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) = `any` diff --git a/docs/reference/type-aliases/Table_RowModels.md b/docs/reference/type-aliases/Table_RowModels.md new file mode 100644 index 0000000000..e57b41133e --- /dev/null +++ b/docs/reference/type-aliases/Table_RowModels.md @@ -0,0 +1,22 @@ +--- +id: Table_RowModels +title: Table_RowModels +--- + +# Type Alias: Table\_RowModels\ + +```ts +type Table_RowModels = Table_RowModels_Core & Table_RowModels_Faceted & Table_RowModels_Filtered & Table_RowModels_Grouped & Table_RowModels_Expanded & Table_RowModels_Paginated & Table_RowModels_Sorted; +``` + +Defined in: [core/row-models/coreRowModelsFeature.types.ts:58](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.types.ts#L58) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) diff --git a/docs/reference/type-aliases/TransformFilterValueFn.md b/docs/reference/type-aliases/TransformFilterValueFn.md new file mode 100644 index 0000000000..c51818af50 --- /dev/null +++ b/docs/reference/type-aliases/TransformFilterValueFn.md @@ -0,0 +1,40 @@ +--- +id: TransformFilterValueFn +title: TransformFilterValueFn +--- + +# Type Alias: TransformFilterValueFn()\ + +```ts +type TransformFilterValueFn = (value, column?) => TValue; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:59](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L59) + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](RowData.md) + +### TValue + +`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md) + +## Parameters + +### value + +`any` + +### column? + +[`Column`](Column.md)\<`TFeatures`, `TData`, `TValue`\> + +## Returns + +`TValue` diff --git a/docs/reference/type-aliases/UnionToIntersection.md b/docs/reference/type-aliases/UnionToIntersection.md new file mode 100644 index 0000000000..f320f56a9f --- /dev/null +++ b/docs/reference/type-aliases/UnionToIntersection.md @@ -0,0 +1,18 @@ +--- +id: UnionToIntersection +title: UnionToIntersection +--- + +# Type Alias: UnionToIntersection\ + +```ts +type UnionToIntersection = T extends any ? (x) => any : never extends (x) => any ? R : never; +``` + +Defined in: [types/type-utils.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/type-utils.ts#L14) + +## Type Parameters + +### T + +`T` diff --git a/docs/reference/type-aliases/Updater.md b/docs/reference/type-aliases/Updater.md new file mode 100644 index 0000000000..f0be9f6aeb --- /dev/null +++ b/docs/reference/type-aliases/Updater.md @@ -0,0 +1,18 @@ +--- +id: Updater +title: Updater +--- + +# Type Alias: Updater\ + +```ts +type Updater = T | (old) => T; +``` + +Defined in: [types/type-utils.ts:1](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/type-utils.ts#L1) + +## Type Parameters + +### T + +`T` diff --git a/docs/reference/type-aliases/VisibilityDefaultOptions.md b/docs/reference/type-aliases/VisibilityDefaultOptions.md new file mode 100644 index 0000000000..60b7f43e9b --- /dev/null +++ b/docs/reference/type-aliases/VisibilityDefaultOptions.md @@ -0,0 +1,12 @@ +--- +id: VisibilityDefaultOptions +title: VisibilityDefaultOptions +--- + +# Type Alias: VisibilityDefaultOptions + +```ts +type VisibilityDefaultOptions = Pick; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:23](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L23) diff --git a/docs/reference/variables/$internalMemoFnMeta.md b/docs/reference/variables/$internalMemoFnMeta.md new file mode 100644 index 0000000000..c83d60f5ed --- /dev/null +++ b/docs/reference/variables/$internalMemoFnMeta.md @@ -0,0 +1,12 @@ +--- +id: $internalMemoFnMeta +title: $internalMemoFnMeta +--- + +# Variable: $internalMemoFnMeta + +```ts +const $internalMemoFnMeta: typeof $internalMemoFnMeta; +``` + +Defined in: [utils.ts:61](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L61) diff --git a/docs/reference/variables/aggregationFn_count.md b/docs/reference/variables/aggregationFn_count.md new file mode 100644 index 0000000000..0e0cda2e76 --- /dev/null +++ b/docs/reference/variables/aggregationFn_count.md @@ -0,0 +1,14 @@ +--- +id: aggregationFn_count +title: aggregationFn_count +--- + +# Variable: aggregationFn\_count + +```ts +const aggregationFn_count: AggregationFn; +``` + +Defined in: [fns/aggregationFns.ts:198](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L198) + +Aggregation function for counting the number of rows in a column. diff --git a/docs/reference/variables/aggregationFn_extent.md b/docs/reference/variables/aggregationFn_extent.md new file mode 100644 index 0000000000..0bb994ef84 --- /dev/null +++ b/docs/reference/variables/aggregationFn_extent.md @@ -0,0 +1,14 @@ +--- +id: aggregationFn_extent +title: aggregationFn_extent +--- + +# Variable: aggregationFn\_extent + +```ts +const aggregationFn_extent: AggregationFn; +``` + +Defined in: [fns/aggregationFns.ts:84](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L84) + +Aggregation function for finding the extent (min and max) of a column. diff --git a/docs/reference/variables/aggregationFn_max.md b/docs/reference/variables/aggregationFn_max.md new file mode 100644 index 0000000000..443b999581 --- /dev/null +++ b/docs/reference/variables/aggregationFn_max.md @@ -0,0 +1,14 @@ +--- +id: aggregationFn_max +title: aggregationFn_max +--- + +# Variable: aggregationFn\_max + +```ts +const aggregationFn_max: AggregationFn; +``` + +Defined in: [fns/aggregationFns.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L57) + +Aggregation function for finding the maximum value of a column. diff --git a/docs/reference/variables/aggregationFn_mean.md b/docs/reference/variables/aggregationFn_mean.md new file mode 100644 index 0000000000..321b066014 --- /dev/null +++ b/docs/reference/variables/aggregationFn_mean.md @@ -0,0 +1,14 @@ +--- +id: aggregationFn_mean +title: aggregationFn_mean +--- + +# Variable: aggregationFn\_mean + +```ts +const aggregationFn_mean: AggregationFn; +``` + +Defined in: [fns/aggregationFns.ts:113](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L113) + +Aggregation function for finding the mean (average) of a column. diff --git a/docs/reference/variables/aggregationFn_median.md b/docs/reference/variables/aggregationFn_median.md new file mode 100644 index 0000000000..38a7925adb --- /dev/null +++ b/docs/reference/variables/aggregationFn_median.md @@ -0,0 +1,14 @@ +--- +id: aggregationFn_median +title: aggregationFn_median +--- + +# Variable: aggregationFn\_median + +```ts +const aggregationFn_median: AggregationFn; +``` + +Defined in: [fns/aggregationFns.ts:145](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L145) + +Aggregation function for finding the median value of a column. diff --git a/docs/reference/variables/aggregationFn_min.md b/docs/reference/variables/aggregationFn_min.md new file mode 100644 index 0000000000..b5ceab3d37 --- /dev/null +++ b/docs/reference/variables/aggregationFn_min.md @@ -0,0 +1,14 @@ +--- +id: aggregationFn_min +title: aggregationFn_min +--- + +# Variable: aggregationFn\_min + +```ts +const aggregationFn_min: AggregationFn; +``` + +Defined in: [fns/aggregationFns.ts:29](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L29) + +Aggregation function for finding the minimum value of a column. diff --git a/docs/reference/variables/aggregationFn_sum.md b/docs/reference/variables/aggregationFn_sum.md new file mode 100644 index 0000000000..aeece8ec0a --- /dev/null +++ b/docs/reference/variables/aggregationFn_sum.md @@ -0,0 +1,14 @@ +--- +id: aggregationFn_sum +title: aggregationFn_sum +--- + +# Variable: aggregationFn\_sum + +```ts +const aggregationFn_sum: AggregationFn; +``` + +Defined in: [fns/aggregationFns.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L10) + +Aggregation function for summing up the values of a column. diff --git a/docs/reference/variables/aggregationFn_unique.md b/docs/reference/variables/aggregationFn_unique.md new file mode 100644 index 0000000000..d04181e153 --- /dev/null +++ b/docs/reference/variables/aggregationFn_unique.md @@ -0,0 +1,14 @@ +--- +id: aggregationFn_unique +title: aggregationFn_unique +--- + +# Variable: aggregationFn\_unique + +```ts +const aggregationFn_unique: AggregationFn; +``` + +Defined in: [fns/aggregationFns.ts:172](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L172) + +Aggregation function for finding the unique values of a column. diff --git a/docs/reference/variables/aggregationFn_uniqueCount.md b/docs/reference/variables/aggregationFn_uniqueCount.md new file mode 100644 index 0000000000..f45e125c82 --- /dev/null +++ b/docs/reference/variables/aggregationFn_uniqueCount.md @@ -0,0 +1,14 @@ +--- +id: aggregationFn_uniqueCount +title: aggregationFn_uniqueCount +--- + +# Variable: aggregationFn\_uniqueCount + +```ts +const aggregationFn_uniqueCount: AggregationFn; +``` + +Defined in: [fns/aggregationFns.ts:185](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L185) + +Aggregation function for finding the count of unique values of a column. diff --git a/docs/reference/variables/aggregationFns.md b/docs/reference/variables/aggregationFns.md new file mode 100644 index 0000000000..392a7fbc83 --- /dev/null +++ b/docs/reference/variables/aggregationFns.md @@ -0,0 +1,68 @@ +--- +id: aggregationFns +title: aggregationFns +--- + +# Variable: aggregationFns + +```ts +const aggregationFns: object; +``` + +Defined in: [fns/aggregationFns.ts:208](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L208) + +## Type Declaration + +### count + +```ts +count: AggregationFn = aggregationFn_count; +``` + +### extent + +```ts +extent: AggregationFn = aggregationFn_extent; +``` + +### max + +```ts +max: AggregationFn = aggregationFn_max; +``` + +### mean + +```ts +mean: AggregationFn = aggregationFn_mean; +``` + +### median + +```ts +median: AggregationFn = aggregationFn_median; +``` + +### min + +```ts +min: AggregationFn = aggregationFn_min; +``` + +### sum + +```ts +sum: AggregationFn = aggregationFn_sum; +``` + +### unique + +```ts +unique: AggregationFn = aggregationFn_unique; +``` + +### uniqueCount + +```ts +uniqueCount: AggregationFn = aggregationFn_uniqueCount; +``` diff --git a/docs/reference/variables/columnFacetingFeature.md b/docs/reference/variables/columnFacetingFeature.md new file mode 100644 index 0000000000..762d001aff --- /dev/null +++ b/docs/reference/variables/columnFacetingFeature.md @@ -0,0 +1,14 @@ +--- +id: columnFacetingFeature +title: columnFacetingFeature +--- + +# Variable: columnFacetingFeature + +```ts +const columnFacetingFeature: TableFeature>; +``` + +Defined in: [features/column-faceting/columnFacetingFeature.ts:112](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.ts#L112) + +The Column Faceting feature adds column faceting APIs to the column objects. diff --git a/docs/reference/variables/columnFilteringFeature.md b/docs/reference/variables/columnFilteringFeature.md new file mode 100644 index 0000000000..31cd19216c --- /dev/null +++ b/docs/reference/variables/columnFilteringFeature.md @@ -0,0 +1,15 @@ +--- +id: columnFilteringFeature +title: columnFilteringFeature +--- + +# Variable: columnFilteringFeature + +```ts +const columnFilteringFeature: TableFeature>; +``` + +Defined in: [features/column-filtering/columnFilteringFeature.ts:121](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.ts#L121) + +The Column Filtering feature adds column filtering state and APIs to the table, row, and column objects. +**Note:** This does not include Global Filtering. The globalFilteringFeature feature has been split out into its own standalone feature. diff --git a/docs/reference/variables/columnGroupingFeature.md b/docs/reference/variables/columnGroupingFeature.md new file mode 100644 index 0000000000..976efc4a12 --- /dev/null +++ b/docs/reference/variables/columnGroupingFeature.md @@ -0,0 +1,14 @@ +--- +id: columnGroupingFeature +title: columnGroupingFeature +--- + +# Variable: columnGroupingFeature + +```ts +const columnGroupingFeature: TableFeature>; +``` + +Defined in: [features/column-grouping/columnGroupingFeature.ts:151](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.ts#L151) + +The (Column) Grouping feature adds column grouping state and APIs to the table, row, column, and cell objects. diff --git a/docs/reference/variables/columnOrderingFeature.md b/docs/reference/variables/columnOrderingFeature.md new file mode 100644 index 0000000000..d55cd22c99 --- /dev/null +++ b/docs/reference/variables/columnOrderingFeature.md @@ -0,0 +1,14 @@ +--- +id: columnOrderingFeature +title: columnOrderingFeature +--- + +# Variable: columnOrderingFeature + +```ts +const columnOrderingFeature: TableFeature>; +``` + +Defined in: [features/column-ordering/columnOrderingFeature.ts:96](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.ts#L96) + +The Column Ordering feature adds column ordering state and APIs to the table and column objects. diff --git a/docs/reference/variables/columnPinningFeature.md b/docs/reference/variables/columnPinningFeature.md new file mode 100644 index 0000000000..3cebea02a9 --- /dev/null +++ b/docs/reference/variables/columnPinningFeature.md @@ -0,0 +1,14 @@ +--- +id: columnPinningFeature +title: columnPinningFeature +--- + +# Variable: columnPinningFeature + +```ts +const columnPinningFeature: TableFeature>; +``` + +Defined in: [features/column-pinning/columnPinningFeature.ts:324](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.ts#L324) + +The Column Pinning feature adds column pinning state and APIs to the table, row, and column objects. diff --git a/docs/reference/variables/columnResizingFeature.md b/docs/reference/variables/columnResizingFeature.md new file mode 100644 index 0000000000..f847f2fdb3 --- /dev/null +++ b/docs/reference/variables/columnResizingFeature.md @@ -0,0 +1,15 @@ +--- +id: columnResizingFeature +title: columnResizingFeature +--- + +# Variable: columnResizingFeature + +```ts +const columnResizingFeature: TableFeature>; +``` + +Defined in: [features/column-resizing/columnResizingFeature.ts:92](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.ts#L92) + +The Column Resizing feature adds column resizing state and APIs to the table and column objects. +**Note:** This is dependent on the Column Sizing feature. diff --git a/docs/reference/variables/columnSizingFeature.md b/docs/reference/variables/columnSizingFeature.md new file mode 100644 index 0000000000..88fd49ca3d --- /dev/null +++ b/docs/reference/variables/columnSizingFeature.md @@ -0,0 +1,15 @@ +--- +id: columnSizingFeature +title: columnSizingFeature +--- + +# Variable: columnSizingFeature + +```ts +const columnSizingFeature: TableFeature>; +``` + +Defined in: [features/column-sizing/columnSizingFeature.ts:146](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.ts#L146) + +The Column Sizing feature adds column sizing state and APIs to the table, header, and column objects. +**Note:** This does not include column resizing. The columnResizingFeature feature has been split out into its own standalone feature. diff --git a/docs/reference/variables/columnVisibilityFeature.md b/docs/reference/variables/columnVisibilityFeature.md new file mode 100644 index 0000000000..765e55cfb2 --- /dev/null +++ b/docs/reference/variables/columnVisibilityFeature.md @@ -0,0 +1,14 @@ +--- +id: columnVisibilityFeature +title: columnVisibilityFeature +--- + +# Variable: columnVisibilityFeature + +```ts +const columnVisibilityFeature: TableFeature>; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.ts:155](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.ts#L155) + +The Column Visibility feature adds column visibility state and APIs to the table, row, and column objects. diff --git a/docs/reference/variables/coreCellsFeature.md b/docs/reference/variables/coreCellsFeature.md new file mode 100644 index 0000000000..6b3d4f07fc --- /dev/null +++ b/docs/reference/variables/coreCellsFeature.md @@ -0,0 +1,14 @@ +--- +id: coreCellsFeature +title: coreCellsFeature +--- + +# Variable: coreCellsFeature + +```ts +const coreCellsFeature: TableFeature>; +``` + +Defined in: [core/cells/coreCellsFeature.ts:44](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.ts#L44) + +The Core Cells feature provides the core cell functionality. diff --git a/docs/reference/variables/coreColumnsFeature.md b/docs/reference/variables/coreColumnsFeature.md new file mode 100644 index 0000000000..469959cf1e --- /dev/null +++ b/docs/reference/variables/coreColumnsFeature.md @@ -0,0 +1,14 @@ +--- +id: coreColumnsFeature +title: coreColumnsFeature +--- + +# Variable: coreColumnsFeature + +```ts +const coreColumnsFeature: TableFeature>; +``` + +Defined in: [core/columns/coreColumnsFeature.ts:90](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.ts#L90) + +The Core Columns feature provides the core column functionality. diff --git a/docs/reference/variables/coreFeatures.md b/docs/reference/variables/coreFeatures.md new file mode 100644 index 0000000000..281500dbe2 --- /dev/null +++ b/docs/reference/variables/coreFeatures.md @@ -0,0 +1,12 @@ +--- +id: coreFeatures +title: coreFeatures +--- + +# Variable: coreFeatures + +```ts +const coreFeatures: CoreFeatures; +``` + +Defined in: [core/coreFeatures.ts:17](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/coreFeatures.ts#L17) diff --git a/docs/reference/variables/coreHeadersFeature.md b/docs/reference/variables/coreHeadersFeature.md new file mode 100644 index 0000000000..95f38f5015 --- /dev/null +++ b/docs/reference/variables/coreHeadersFeature.md @@ -0,0 +1,14 @@ +--- +id: coreHeadersFeature +title: coreHeadersFeature +--- + +# Variable: coreHeadersFeature + +```ts +const coreHeadersFeature: TableFeature>; +``` + +Defined in: [core/headers/coreHeadersFeature.ts:98](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.ts#L98) + +The Core Headers feature provides the core header functionality. diff --git a/docs/reference/variables/coreRowModelsFeature.md b/docs/reference/variables/coreRowModelsFeature.md new file mode 100644 index 0000000000..6a897fb13e --- /dev/null +++ b/docs/reference/variables/coreRowModelsFeature.md @@ -0,0 +1,14 @@ +--- +id: coreRowModelsFeature +title: coreRowModelsFeature +--- + +# Variable: coreRowModelsFeature + +```ts +const coreRowModelsFeature: TableFeature>; +``` + +Defined in: [core/row-models/coreRowModelsFeature.ts:78](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.ts#L78) + +The Core Row Models feature provides the core row model functionality. diff --git a/docs/reference/variables/coreRowsFeature.md b/docs/reference/variables/coreRowsFeature.md new file mode 100644 index 0000000000..119f8eae33 --- /dev/null +++ b/docs/reference/variables/coreRowsFeature.md @@ -0,0 +1,14 @@ +--- +id: coreRowsFeature +title: coreRowsFeature +--- + +# Variable: coreRowsFeature + +```ts +const coreRowsFeature: TableFeature>; +``` + +Defined in: [core/rows/coreRowsFeature.ts:84](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.ts#L84) + +The Core Rows feature provides the core row functionality. diff --git a/docs/reference/variables/coreTablesFeature.md b/docs/reference/variables/coreTablesFeature.md new file mode 100644 index 0000000000..6fbe70b188 --- /dev/null +++ b/docs/reference/variables/coreTablesFeature.md @@ -0,0 +1,14 @@ +--- +id: coreTablesFeature +title: coreTablesFeature +--- + +# Variable: coreTablesFeature + +```ts +const coreTablesFeature: TableFeature>; +``` + +Defined in: [core/table/coreTablesFeature.ts:36](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.ts#L36) + +The Core Tables feature provides the core table functionality for handling state and options. diff --git a/docs/reference/variables/filterFn_arrHas.md b/docs/reference/variables/filterFn_arrHas.md new file mode 100644 index 0000000000..09c7f6330e --- /dev/null +++ b/docs/reference/variables/filterFn_arrHas.md @@ -0,0 +1,14 @@ +--- +id: filterFn_arrHas +title: filterFn_arrHas +--- + +# Variable: filterFn\_arrHas + +```ts +const filterFn_arrHas: FilterFn; +``` + +Defined in: [fns/filterFns.ts:287](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L287) + +Filter function for checking if an array has a given value. diff --git a/docs/reference/variables/filterFn_arrIncludes.md b/docs/reference/variables/filterFn_arrIncludes.md new file mode 100644 index 0000000000..7ef63136e6 --- /dev/null +++ b/docs/reference/variables/filterFn_arrIncludes.md @@ -0,0 +1,14 @@ +--- +id: filterFn_arrIncludes +title: filterFn_arrIncludes +--- + +# Variable: filterFn\_arrIncludes + +```ts +const filterFn_arrIncludes: FilterFn; +``` + +Defined in: [fns/filterFns.ts:301](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L301) + +Filter function for checking if an array includes a given value. diff --git a/docs/reference/variables/filterFn_arrIncludesAll.md b/docs/reference/variables/filterFn_arrIncludesAll.md new file mode 100644 index 0000000000..ba14ab386c --- /dev/null +++ b/docs/reference/variables/filterFn_arrIncludesAll.md @@ -0,0 +1,14 @@ +--- +id: filterFn_arrIncludesAll +title: filterFn_arrIncludesAll +--- + +# Variable: filterFn\_arrIncludesAll + +```ts +const filterFn_arrIncludesAll: FilterFn; +``` + +Defined in: [fns/filterFns.ts:321](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L321) + +Filter function for checking if an array includes all of the given values. diff --git a/docs/reference/variables/filterFn_arrIncludesSome.md b/docs/reference/variables/filterFn_arrIncludesSome.md new file mode 100644 index 0000000000..3f583c3da2 --- /dev/null +++ b/docs/reference/variables/filterFn_arrIncludesSome.md @@ -0,0 +1,14 @@ +--- +id: filterFn_arrIncludesSome +title: filterFn_arrIncludesSome +--- + +# Variable: filterFn\_arrIncludesSome + +```ts +const filterFn_arrIncludesSome: FilterFn; +``` + +Defined in: [fns/filterFns.ts:340](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L340) + +Filter function for checking if an array includes any of the given values. diff --git a/docs/reference/variables/filterFn_equals.md b/docs/reference/variables/filterFn_equals.md new file mode 100644 index 0000000000..ff3f1adaf8 --- /dev/null +++ b/docs/reference/variables/filterFn_equals.md @@ -0,0 +1,14 @@ +--- +id: filterFn_equals +title: filterFn_equals +--- + +# Variable: filterFn\_equals + +```ts +const filterFn_equals: FilterFn; +``` + +Defined in: [fns/filterFns.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L11) + +Filter function for checking if a value is exactly equal to a given value. (JS === comparison) diff --git a/docs/reference/variables/filterFn_equalsString.md b/docs/reference/variables/filterFn_equalsString.md new file mode 100644 index 0000000000..f7feb8f0ce --- /dev/null +++ b/docs/reference/variables/filterFn_equalsString.md @@ -0,0 +1,14 @@ +--- +id: filterFn_equalsString +title: filterFn_equalsString +--- + +# Variable: filterFn\_equalsString + +```ts +const filterFn_equalsString: FilterFn; +``` + +Defined in: [fns/filterFns.ts:85](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L85) + +Filter function for checking if a string is exactly equal to a given string. (Non-case-sensitive) diff --git a/docs/reference/variables/filterFn_equalsStringSensitive.md b/docs/reference/variables/filterFn_equalsStringSensitive.md new file mode 100644 index 0000000000..2dd960758c --- /dev/null +++ b/docs/reference/variables/filterFn_equalsStringSensitive.md @@ -0,0 +1,14 @@ +--- +id: filterFn_equalsStringSensitive +title: filterFn_equalsStringSensitive +--- + +# Variable: filterFn\_equalsStringSensitive + +```ts +const filterFn_equalsStringSensitive: FilterFn; +``` + +Defined in: [fns/filterFns.ts:104](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L104) + +Filter function for checking if a string is exactly equal to a given string. (Case-sensitive) diff --git a/docs/reference/variables/filterFn_greaterThan.md b/docs/reference/variables/filterFn_greaterThan.md new file mode 100644 index 0000000000..c1a86a2c1d --- /dev/null +++ b/docs/reference/variables/filterFn_greaterThan.md @@ -0,0 +1,14 @@ +--- +id: filterFn_greaterThan +title: filterFn_greaterThan +--- + +# Variable: filterFn\_greaterThan + +```ts +const filterFn_greaterThan: FilterFn; +``` + +Defined in: [fns/filterFns.ts:122](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L122) + +Filter function for checking if a number is greater than a given number. diff --git a/docs/reference/variables/filterFn_greaterThanOrEqualTo.md b/docs/reference/variables/filterFn_greaterThanOrEqualTo.md new file mode 100644 index 0000000000..513c1e07cc --- /dev/null +++ b/docs/reference/variables/filterFn_greaterThanOrEqualTo.md @@ -0,0 +1,14 @@ +--- +id: filterFn_greaterThanOrEqualTo +title: filterFn_greaterThanOrEqualTo +--- + +# Variable: filterFn\_greaterThanOrEqualTo + +```ts +const filterFn_greaterThanOrEqualTo: FilterFn; +``` + +Defined in: [fns/filterFns.ts:149](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L149) + +Filter function for checking if a number is greater than or equal to a given number. diff --git a/docs/reference/variables/filterFn_inNumberRange.md b/docs/reference/variables/filterFn_inNumberRange.md new file mode 100644 index 0000000000..363992954d --- /dev/null +++ b/docs/reference/variables/filterFn_inNumberRange.md @@ -0,0 +1,14 @@ +--- +id: filterFn_inNumberRange +title: filterFn_inNumberRange +--- + +# Variable: filterFn\_inNumberRange + +```ts +const filterFn_inNumberRange: FilterFn; +``` + +Defined in: [fns/filterFns.ts:244](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L244) + +Filter function for checking if a number is within a given range. diff --git a/docs/reference/variables/filterFn_includesString.md b/docs/reference/variables/filterFn_includesString.md new file mode 100644 index 0000000000..ac378ce25d --- /dev/null +++ b/docs/reference/variables/filterFn_includesString.md @@ -0,0 +1,14 @@ +--- +id: filterFn_includesString +title: filterFn_includesString +--- + +# Variable: filterFn\_includesString + +```ts +const filterFn_includesString: FilterFn; +``` + +Defined in: [fns/filterFns.ts:63](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L63) + +Filter function for checking if a string includes a given substring. (Non-case-sensitive) diff --git a/docs/reference/variables/filterFn_includesStringSensitive.md b/docs/reference/variables/filterFn_includesStringSensitive.md new file mode 100644 index 0000000000..244397153f --- /dev/null +++ b/docs/reference/variables/filterFn_includesStringSensitive.md @@ -0,0 +1,14 @@ +--- +id: filterFn_includesStringSensitive +title: filterFn_includesStringSensitive +--- + +# Variable: filterFn\_includesStringSensitive + +```ts +const filterFn_includesStringSensitive: FilterFn; +``` + +Defined in: [fns/filterFns.ts:45](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L45) + +Filter function for checking if a string includes a given substring. (Case-sensitive) diff --git a/docs/reference/variables/filterFn_lessThan.md b/docs/reference/variables/filterFn_lessThan.md new file mode 100644 index 0000000000..3917d74e60 --- /dev/null +++ b/docs/reference/variables/filterFn_lessThan.md @@ -0,0 +1,14 @@ +--- +id: filterFn_lessThan +title: filterFn_lessThan +--- + +# Variable: filterFn\_lessThan + +```ts +const filterFn_lessThan: FilterFn; +``` + +Defined in: [fns/filterFns.ts:168](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L168) + +Filter function for checking if a number is less than a given number. diff --git a/docs/reference/variables/filterFn_lessThanOrEqualTo.md b/docs/reference/variables/filterFn_lessThanOrEqualTo.md new file mode 100644 index 0000000000..7febfe8575 --- /dev/null +++ b/docs/reference/variables/filterFn_lessThanOrEqualTo.md @@ -0,0 +1,14 @@ +--- +id: filterFn_lessThanOrEqualTo +title: filterFn_lessThanOrEqualTo +--- + +# Variable: filterFn\_lessThanOrEqualTo + +```ts +const filterFn_lessThanOrEqualTo: FilterFn; +``` + +Defined in: [fns/filterFns.ts:184](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L184) + +Filter function for checking if a number is less than or equal to a given number. diff --git a/docs/reference/variables/filterFn_weakEquals.md b/docs/reference/variables/filterFn_weakEquals.md new file mode 100644 index 0000000000..44c176be0a --- /dev/null +++ b/docs/reference/variables/filterFn_weakEquals.md @@ -0,0 +1,14 @@ +--- +id: filterFn_weakEquals +title: filterFn_weakEquals +--- + +# Variable: filterFn\_weakEquals + +```ts +const filterFn_weakEquals: FilterFn; +``` + +Defined in: [fns/filterFns.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L27) + +Filter function for checking if a value is weakly equal to a given value. (JS == comparison) diff --git a/docs/reference/variables/filterFns.md b/docs/reference/variables/filterFns.md new file mode 100644 index 0000000000..f2aed593e9 --- /dev/null +++ b/docs/reference/variables/filterFns.md @@ -0,0 +1,86 @@ +--- +id: filterFns +title: filterFns +--- + +# Variable: filterFns + +```ts +const filterFns: object; +``` + +Defined in: [fns/filterFns.ts:358](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L358) + +## Type Declaration + +### arrHas + +```ts +arrHas: FilterFn = filterFn_arrHas; +``` + +### arrIncludes + +```ts +arrIncludes: FilterFn = filterFn_arrIncludes; +``` + +### arrIncludesAll + +```ts +arrIncludesAll: FilterFn = filterFn_arrIncludesAll; +``` + +### arrIncludesSome + +```ts +arrIncludesSome: FilterFn = filterFn_arrIncludesSome; +``` + +### between + +```ts +between: FilterFn = filterFn_between; +``` + +### betweenInclusive + +```ts +betweenInclusive: FilterFn = filterFn_betweenInclusive; +``` + +### equals + +```ts +equals: FilterFn = filterFn_equals; +``` + +### equalsString + +```ts +equalsString: FilterFn = filterFn_equalsString; +``` + +### includesString + +```ts +includesString: FilterFn = filterFn_includesString; +``` + +### includesStringSensitive + +```ts +includesStringSensitive: FilterFn = filterFn_includesStringSensitive; +``` + +### inNumberRange + +```ts +inNumberRange: FilterFn = filterFn_inNumberRange; +``` + +### weakEquals + +```ts +weakEquals: FilterFn = filterFn_weakEquals; +``` diff --git a/docs/reference/variables/globalFilteringFeature.md b/docs/reference/variables/globalFilteringFeature.md new file mode 100644 index 0000000000..e2932ee79b --- /dev/null +++ b/docs/reference/variables/globalFilteringFeature.md @@ -0,0 +1,15 @@ +--- +id: globalFilteringFeature +title: globalFilteringFeature +--- + +# Variable: globalFilteringFeature + +```ts +const globalFilteringFeature: TableFeature>; +``` + +Defined in: [features/global-filtering/globalFilteringFeature.ts:92](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.ts#L92) + +The Global Filtering feature adds global filtering state and APIs to the table and column objects. +**Note:** This is dependent on the columnFilteringFeature feature. diff --git a/docs/reference/variables/reSplitAlphaNumeric.md b/docs/reference/variables/reSplitAlphaNumeric.md new file mode 100644 index 0000000000..0eb55d9773 --- /dev/null +++ b/docs/reference/variables/reSplitAlphaNumeric.md @@ -0,0 +1,12 @@ +--- +id: reSplitAlphaNumeric +title: reSplitAlphaNumeric +--- + +# Variable: reSplitAlphaNumeric + +```ts +const reSplitAlphaNumeric: RegExp; +``` + +Defined in: [fns/sortFns.ts:6](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/sortFns.ts#L6) diff --git a/docs/reference/variables/rowExpandingFeature.md b/docs/reference/variables/rowExpandingFeature.md new file mode 100644 index 0000000000..622b01793c --- /dev/null +++ b/docs/reference/variables/rowExpandingFeature.md @@ -0,0 +1,14 @@ +--- +id: rowExpandingFeature +title: rowExpandingFeature +--- + +# Variable: rowExpandingFeature + +```ts +const rowExpandingFeature: TableFeature>; +``` + +Defined in: [features/row-expanding/rowExpandingFeature.ts:122](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.ts#L122) + +The Row Expanding feature adds row expanding state and APIs to the table and row objects. diff --git a/docs/reference/variables/rowPaginationFeature.md b/docs/reference/variables/rowPaginationFeature.md new file mode 100644 index 0000000000..4ef8e48c85 --- /dev/null +++ b/docs/reference/variables/rowPaginationFeature.md @@ -0,0 +1,14 @@ +--- +id: rowPaginationFeature +title: rowPaginationFeature +--- + +# Variable: rowPaginationFeature + +```ts +const rowPaginationFeature: TableFeature>; +``` + +Defined in: [features/row-pagination/rowPaginationFeature.ts:121](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.ts#L121) + +The (Row) Pagination feature adds pagination state and APIs to the table object. diff --git a/docs/reference/variables/rowPinningFeature.md b/docs/reference/variables/rowPinningFeature.md new file mode 100644 index 0000000000..29549d5254 --- /dev/null +++ b/docs/reference/variables/rowPinningFeature.md @@ -0,0 +1,14 @@ +--- +id: rowPinningFeature +title: rowPinningFeature +--- + +# Variable: rowPinningFeature + +```ts +const rowPinningFeature: TableFeature>; +``` + +Defined in: [features/row-pinning/rowPinningFeature.ts:121](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.ts#L121) + +The Row Pinning feature adds row pinning state and APIs to the table and row objects. diff --git a/docs/reference/variables/rowSelectionFeature.md b/docs/reference/variables/rowSelectionFeature.md new file mode 100644 index 0000000000..7e19f680a0 --- /dev/null +++ b/docs/reference/variables/rowSelectionFeature.md @@ -0,0 +1,14 @@ +--- +id: rowSelectionFeature +title: rowSelectionFeature +--- + +# Variable: rowSelectionFeature + +```ts +const rowSelectionFeature: TableFeature>; +``` + +Defined in: [features/row-selection/rowSelectionFeature.ts:164](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.ts#L164) + +The Row Selection feature adds row selection state and APIs to the table and row objects. diff --git a/docs/reference/variables/rowSortingFeature.md b/docs/reference/variables/rowSortingFeature.md new file mode 100644 index 0000000000..a929094ad3 --- /dev/null +++ b/docs/reference/variables/rowSortingFeature.md @@ -0,0 +1,14 @@ +--- +id: rowSortingFeature +title: rowSortingFeature +--- + +# Variable: rowSortingFeature + +```ts +const rowSortingFeature: TableFeature>; +``` + +Defined in: [features/row-sorting/rowSortingFeature.ts:136](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.ts#L136) + +The (Row) Sorting feature adds sorting state and APIs to the table and column objects. diff --git a/docs/reference/variables/sortFn_alphanumeric.md b/docs/reference/variables/sortFn_alphanumeric.md new file mode 100644 index 0000000000..f08578160f --- /dev/null +++ b/docs/reference/variables/sortFn_alphanumeric.md @@ -0,0 +1,12 @@ +--- +id: sortFn_alphanumeric +title: sortFn_alphanumeric +--- + +# Variable: sortFn\_alphanumeric + +```ts +const sortFn_alphanumeric: SortFn; +``` + +Defined in: [fns/sortFns.ts:8](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/sortFns.ts#L8) diff --git a/docs/reference/variables/sortFn_alphanumericCaseSensitive.md b/docs/reference/variables/sortFn_alphanumericCaseSensitive.md new file mode 100644 index 0000000000..fca198b9c8 --- /dev/null +++ b/docs/reference/variables/sortFn_alphanumericCaseSensitive.md @@ -0,0 +1,12 @@ +--- +id: sortFn_alphanumericCaseSensitive +title: sortFn_alphanumericCaseSensitive +--- + +# Variable: sortFn\_alphanumericCaseSensitive + +```ts +const sortFn_alphanumericCaseSensitive: SortFn; +``` + +Defined in: [fns/sortFns.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/sortFns.ts#L22) diff --git a/docs/reference/variables/sortFn_basic.md b/docs/reference/variables/sortFn_basic.md new file mode 100644 index 0000000000..23254748e1 --- /dev/null +++ b/docs/reference/variables/sortFn_basic.md @@ -0,0 +1,12 @@ +--- +id: sortFn_basic +title: sortFn_basic +--- + +# Variable: sortFn\_basic + +```ts +const sortFn_basic: SortFn; +``` + +Defined in: [fns/sortFns.ts:85](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/sortFns.ts#L85) diff --git a/docs/reference/variables/sortFn_datetime.md b/docs/reference/variables/sortFn_datetime.md new file mode 100644 index 0000000000..bc6db999c2 --- /dev/null +++ b/docs/reference/variables/sortFn_datetime.md @@ -0,0 +1,12 @@ +--- +id: sortFn_datetime +title: sortFn_datetime +--- + +# Variable: sortFn\_datetime + +```ts +const sortFn_datetime: SortFn; +``` + +Defined in: [fns/sortFns.ts:68](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/sortFns.ts#L68) diff --git a/docs/reference/variables/sortFn_text.md b/docs/reference/variables/sortFn_text.md new file mode 100644 index 0000000000..c8489ca808 --- /dev/null +++ b/docs/reference/variables/sortFn_text.md @@ -0,0 +1,12 @@ +--- +id: sortFn_text +title: sortFn_text +--- + +# Variable: sortFn\_text + +```ts +const sortFn_text: SortFn; +``` + +Defined in: [fns/sortFns.ts:38](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/sortFns.ts#L38) diff --git a/docs/reference/variables/sortFn_textCaseSensitive.md b/docs/reference/variables/sortFn_textCaseSensitive.md new file mode 100644 index 0000000000..9ae4279f4d --- /dev/null +++ b/docs/reference/variables/sortFn_textCaseSensitive.md @@ -0,0 +1,12 @@ +--- +id: sortFn_textCaseSensitive +title: sortFn_textCaseSensitive +--- + +# Variable: sortFn\_textCaseSensitive + +```ts +const sortFn_textCaseSensitive: SortFn; +``` + +Defined in: [fns/sortFns.ts:54](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/sortFns.ts#L54) diff --git a/docs/reference/variables/sortFns.md b/docs/reference/variables/sortFns.md new file mode 100644 index 0000000000..7a8413794e --- /dev/null +++ b/docs/reference/variables/sortFns.md @@ -0,0 +1,50 @@ +--- +id: sortFns +title: sortFns +--- + +# Variable: sortFns + +```ts +const sortFns: object; +``` + +Defined in: [fns/sortFns.ts:164](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/sortFns.ts#L164) + +## Type Declaration + +### alphanumeric + +```ts +alphanumeric: SortFn = sortFn_alphanumeric; +``` + +### alphanumericCaseSensitive + +```ts +alphanumericCaseSensitive: SortFn = sortFn_alphanumericCaseSensitive; +``` + +### basic + +```ts +basic: SortFn = sortFn_basic; +``` + +### datetime + +```ts +datetime: SortFn = sortFn_datetime; +``` + +### text + +```ts +text: SortFn = sortFn_text; +``` + +### textCaseSensitive + +```ts +textCaseSensitive: SortFn = sortFn_textCaseSensitive; +``` diff --git a/docs/reference/variables/stockFeatures.md b/docs/reference/variables/stockFeatures.md new file mode 100644 index 0000000000..5e4b24bffd --- /dev/null +++ b/docs/reference/variables/stockFeatures.md @@ -0,0 +1,12 @@ +--- +id: stockFeatures +title: stockFeatures +--- + +# Variable: stockFeatures + +```ts +const stockFeatures: StockFeatures; +``` + +Defined in: [features/stockFeatures.ts:33](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L33) diff --git a/docs/static/manager.32cbfa2b6d56d1f8fbac.bundle.js b/docs/static/manager.32cbfa2b6d56d1f8fbac.bundle.js deleted file mode 100644 index debf566c12..0000000000 --- a/docs/static/manager.32cbfa2b6d56d1f8fbac.bundle.js +++ /dev/null @@ -1,33 +0,0 @@ -!function(modules){function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={exports:{},id:moduleId,loaded:!1};return modules[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.loaded=!0,module.exports}var installedModules={};return __webpack_require__.m=modules,__webpack_require__.c=installedModules,__webpack_require__.p="",__webpack_require__(0)}(function(modules){for(var i in modules)if(Object.prototype.hasOwnProperty.call(modules,i))switch(typeof modules[i]){case"function":break;case"object":modules[i]=function(_m){var args=_m.slice(1),fn=modules[_m[0]];return function(a,b,c){fn.apply(this,[a,b,c].concat(args))}}(modules[i]);break;default:modules[i]=modules[modules[i]]}return modules}([function(module,exports,__webpack_require__){__webpack_require__(848),__webpack_require__(347),module.exports=__webpack_require__(838)},function(module,exports,__webpack_require__){"use strict";function invariant(condition,format,a,b,c,d,e,f){if(validateFormat(format),!condition){var error;if(void 0===format)error=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var args=[a,b,c,d,e,f],argIndex=0;error=new Error(format.replace(/%s/g,function(){return args[argIndex++]})),error.name="Invariant Violation"}throw error.framesToPop=1,error}}var validateFormat=function(format){};"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV&&(validateFormat=function(format){if(void 0===format)throw new Error("invariant requires an error message argument")}),module.exports=invariant},function(module,exports,__webpack_require__){"use strict";var emptyFunction=__webpack_require__(10),warning=emptyFunction;"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV&&!function(){var printWarning=function(format){for(var _len=arguments.length,args=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)args[_key-1]=arguments[_key];var argIndex=0,message="Warning: "+format.replace(/%s/g,function(){return args[argIndex++]});"undefined"!=typeof console&&console.error(message);try{throw new Error(message)}catch(x){}};warning=function(condition,format){if(void 0===format)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==format.indexOf("Failed Composite propType: ")&&!condition){for(var _len2=arguments.length,args=Array(_len2>2?_len2-2:0),_key2=2;_key2<_len2;_key2++)args[_key2-2]=arguments[_key2];printWarning.apply(void 0,[format].concat(args))}}}(),module.exports=warning},function(module,exports,__webpack_require__){"use strict";module.exports=__webpack_require__(50)},function(module,exports){"use strict";function reactProdInvariant(code){for(var argCount=arguments.length-1,message="Minified React error #"+code+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+code,argIdx=0;argIdx1){for(var childArray=Array(childrenLength),i=0;i1){for(var childArray=Array(childrenLength),i=0;i2?arguments[2]:{},props=keys(map);hasSymbols&&(props=props.concat(Object.getOwnPropertySymbols(map))),foreach(props,function(name){defineProperty(object,name,map[name],predicates[name])})};defineProperties.supportsDescriptors=!!supportsDescriptors,module.exports=defineProperties},function(module,exports,__webpack_require__){var implementation=__webpack_require__(411);module.exports=Function.prototype.bind||implementation},function(module,exports){function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}function runTimeout(fun){if(cachedSetTimeout===setTimeout)return setTimeout(fun,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(fun,0);try{return cachedSetTimeout(fun,0)}catch(e){try{return cachedSetTimeout.call(null,fun,0)}catch(e){return cachedSetTimeout.call(this,fun,0)}}}function runClearTimeout(marker){if(cachedClearTimeout===clearTimeout)return clearTimeout(marker);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(marker);try{return cachedClearTimeout(marker)}catch(e){try{return cachedClearTimeout.call(null,marker)}catch(e){return cachedClearTimeout.call(this,marker)}}}function cleanUpNextTick(){draining&¤tQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var timeout=runTimeout(cleanUpNextTick);draining=!0;for(var len=queue.length;len;){for(currentQueue=queue,queue=[];++queueIndex1)for(var i=1;i-1?void 0:"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?invariant(!1,"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.",pluginName):_prodInvariant("96",pluginName),!EventPluginRegistry.plugins[pluginIndex]){pluginModule.extractEvents?void 0:"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?invariant(!1,"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.",pluginName):_prodInvariant("97",pluginName),EventPluginRegistry.plugins[pluginIndex]=pluginModule;var publishedEvents=pluginModule.eventTypes;for(var eventName in publishedEvents)publishEventForPlugin(publishedEvents[eventName],pluginModule,eventName)?void 0:"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?invariant(!1,"EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.",eventName,pluginName):_prodInvariant("98",eventName,pluginName)}}}function publishEventForPlugin(dispatchConfig,pluginModule,eventName){EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName)?"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?invariant(!1,"EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.",eventName):_prodInvariant("99",eventName):void 0,EventPluginRegistry.eventNameDispatchConfigs[eventName]=dispatchConfig;var phasedRegistrationNames=dispatchConfig.phasedRegistrationNames;if(phasedRegistrationNames){for(var phaseName in phasedRegistrationNames)if(phasedRegistrationNames.hasOwnProperty(phaseName)){var phasedRegistrationName=phasedRegistrationNames[phaseName];publishRegistrationName(phasedRegistrationName,pluginModule,eventName)}return!0}return!!dispatchConfig.registrationName&&(publishRegistrationName(dispatchConfig.registrationName,pluginModule,eventName),!0)}function publishRegistrationName(registrationName,pluginModule,eventName){if(EventPluginRegistry.registrationNameModules[registrationName]?"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?invariant(!1,"EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.",registrationName):_prodInvariant("100",registrationName):void 0,EventPluginRegistry.registrationNameModules[registrationName]=pluginModule,EventPluginRegistry.registrationNameDependencies[registrationName]=pluginModule.eventTypes[eventName].dependencies,"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV){var lowerCasedName=registrationName.toLowerCase();EventPluginRegistry.possibleRegistrationNames[lowerCasedName]=registrationName,"onDoubleClick"===registrationName&&(EventPluginRegistry.possibleRegistrationNames.ondblclick=registrationName)}}var _prodInvariant=__webpack_require__(4),invariant=__webpack_require__(1),eventPluginOrder=null,namesToPlugins={},EventPluginRegistry={ -plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?{}:null,injectEventPluginOrder:function(injectedEventPluginOrder){eventPluginOrder?"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?invariant(!1,"EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React."):_prodInvariant("101"):void 0,eventPluginOrder=Array.prototype.slice.call(injectedEventPluginOrder),recomputePluginOrdering()},injectEventPluginsByName:function(injectedNamesToPlugins){var isOrderingDirty=!1;for(var pluginName in injectedNamesToPlugins)if(injectedNamesToPlugins.hasOwnProperty(pluginName)){var pluginModule=injectedNamesToPlugins[pluginName];namesToPlugins.hasOwnProperty(pluginName)&&namesToPlugins[pluginName]===pluginModule||(namesToPlugins[pluginName]?"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?invariant(!1,"EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.",pluginName):_prodInvariant("102",pluginName):void 0,namesToPlugins[pluginName]=pluginModule,isOrderingDirty=!0)}isOrderingDirty&&recomputePluginOrdering()},getPluginModuleForEvent:function(event){var dispatchConfig=event.dispatchConfig;if(dispatchConfig.registrationName)return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName]||null;if(void 0!==dispatchConfig.phasedRegistrationNames){var phasedRegistrationNames=dispatchConfig.phasedRegistrationNames;for(var phase in phasedRegistrationNames)if(phasedRegistrationNames.hasOwnProperty(phase)){var pluginModule=EventPluginRegistry.registrationNameModules[phasedRegistrationNames[phase]];if(pluginModule)return pluginModule}}return null},_resetEventPlugins:function(){eventPluginOrder=null;for(var pluginName in namesToPlugins)namesToPlugins.hasOwnProperty(pluginName)&&delete namesToPlugins[pluginName];EventPluginRegistry.plugins.length=0;var eventNameDispatchConfigs=EventPluginRegistry.eventNameDispatchConfigs;for(var eventName in eventNameDispatchConfigs)eventNameDispatchConfigs.hasOwnProperty(eventName)&&delete eventNameDispatchConfigs[eventName];var registrationNameModules=EventPluginRegistry.registrationNameModules;for(var registrationName in registrationNameModules)registrationNameModules.hasOwnProperty(registrationName)&&delete registrationNameModules[registrationName];if("production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV){var possibleRegistrationNames=EventPluginRegistry.possibleRegistrationNames;for(var lowerCasedName in possibleRegistrationNames)possibleRegistrationNames.hasOwnProperty(lowerCasedName)&&delete possibleRegistrationNames[lowerCasedName]}}};module.exports=EventPluginRegistry},function(module,exports,__webpack_require__){"use strict";function getListeningForDocument(mountAt){return Object.prototype.hasOwnProperty.call(mountAt,topListenersIDKey)||(mountAt[topListenersIDKey]=reactTopListenersCounter++,alreadyListeningTo[mountAt[topListenersIDKey]]={}),alreadyListeningTo[mountAt[topListenersIDKey]]}var hasEventPageXY,_assign=__webpack_require__(6),EventPluginRegistry=__webpack_require__(74),ReactEventEmitterMixin=__webpack_require__(482),ViewportMetrics=__webpack_require__(257),getVendorPrefixedEventName=__webpack_require__(518),isEventSupported=__webpack_require__(133),alreadyListeningTo={},isMonitoringScrollValue=!1,reactTopListenersCounter=0,topEventMapping={topAbort:"abort",topAnimationEnd:getVendorPrefixedEventName("animationend")||"animationend",topAnimationIteration:getVendorPrefixedEventName("animationiteration")||"animationiteration",topAnimationStart:getVendorPrefixedEventName("animationstart")||"animationstart",topBlur:"blur",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topTransitionEnd:getVendorPrefixedEventName("transitionend")||"transitionend",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},topListenersIDKey="_reactListenersID"+String(Math.random()).slice(2),ReactBrowserEventEmitter=_assign({},ReactEventEmitterMixin,{ReactEventListener:null,injection:{injectReactEventListener:function(ReactEventListener){ReactEventListener.setHandleTopLevel(ReactBrowserEventEmitter.handleTopLevel),ReactBrowserEventEmitter.ReactEventListener=ReactEventListener}},setEnabled:function(enabled){ReactBrowserEventEmitter.ReactEventListener&&ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled)},isEnabled:function(){return!(!ReactBrowserEventEmitter.ReactEventListener||!ReactBrowserEventEmitter.ReactEventListener.isEnabled())},listenTo:function(registrationName,contentDocumentHandle){for(var mountAt=contentDocumentHandle,isListening=getListeningForDocument(mountAt),dependencies=EventPluginRegistry.registrationNameDependencies[registrationName],i=0;i]/;module.exports=escapeTextContentForBrowser},function(module,exports,__webpack_require__){"use strict";var reusableSVGContainer,ExecutionEnvironment=__webpack_require__(7),DOMNamespaces=__webpack_require__(122),WHITESPACE_TEST=/^[ \r\n\t\f]/,NONVISIBLE_TEST=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,createMicrosoftUnsafeLocalFunction=__webpack_require__(129),setInnerHTML=createMicrosoftUnsafeLocalFunction(function(node,html){if(node.namespaceURI!==DOMNamespaces.svg||"innerHTML"in node)node.innerHTML=html;else{reusableSVGContainer=reusableSVGContainer||document.createElement("div"),reusableSVGContainer.innerHTML=""+html+"";for(var svgNode=reusableSVGContainer.firstChild;svgNode.firstChild;)node.appendChild(svgNode.firstChild)}});if(ExecutionEnvironment.canUseDOM){var testElement=document.createElement("div");testElement.innerHTML=" ",""===testElement.innerHTML&&(setInnerHTML=function(node,html){if(node.parentNode&&node.parentNode.replaceChild(node,node),WHITESPACE_TEST.test(html)||"<"===html[0]&&NONVISIBLE_TEST.test(html)){node.innerHTML=String.fromCharCode(65279)+html;var textNode=node.firstChild;1===textNode.data.length?node.removeChild(textNode):textNode.deleteData(0,1)}else node.innerHTML=html}),testElement=null}module.exports=setInnerHTML},function(module,exports){exports.f={}.propertyIsEnumerable},function(module,exports){var id=0,px=Math.random();module.exports=function(key){return"Symbol(".concat(void 0===key?"":key,")_",(++id+px).toString(36))}},[1335,591,277],6,21,[1312,302,178],66,81,21,,21,[1327,429,317,90],11,21,11,21,function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _manager=__webpack_require__(330);Object.defineProperty(exports,"register",{enumerable:!0,get:function(){return _manager.register}});var _preview=__webpack_require__(331);Object.defineProperty(exports,"linkTo",{enumerable:!0,get:function(){return _preview.linkTo}});var ADDON_ID=exports.ADDON_ID="kadirahq/storybook-addon-links";exports.EVENT_ID=ADDON_ID+"/link-to-message"},[1290,172],[1293,84,67,648,173],33,[1305,210,650,344,97],[1321,651,334],function(module,exports){module.exports=function(it){if(void 0==it)throw TypeError("Can't call method on "+it);return it}},49,[1317,180,87],function(module,exports){var ceil=Math.ceil,floor=Math.floor;module.exports=function(it){return isNaN(it=+it)?0:(it>0?floor:ceil)(it)}},[1323,102],[1290,183],[1293,88,70,674,184],33,[1305,220,676,375,107],[1321,677,365],,,function(module,exports){"use strict";function is(x,y){return x===y?0!==x||0!==y||1/x===1/y:x!==x&&y!==y}function shallowEqual(objA,objB){if(is(objA,objB))return!0;if("object"!=typeof objA||null===objA||"object"!=typeof objB||null===objB)return!1;var keysA=Object.keys(objA),keysB=Object.keys(objB);if(keysA.length!==keysB.length)return!1;for(var i=0;i0&&keys.length<20?displayName+" (keys: "+keys.join(", ")+")":displayName}function getInternalInstanceReadyForUpdate(publicInstance,callerName){var internalInstance=ReactInstanceMap.get(publicInstance);if(!internalInstance){if("production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV){var ctor=publicInstance.constructor;"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?warning(!callerName,"%s(...): Can only update a mounted or mounting component. This usually means you called %s() on an unmounted component. This is a no-op. Please check the code for the %s component.",callerName,callerName,ctor&&(ctor.displayName||ctor.name)||"ReactClass"):void 0}return null}return"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV&&("production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?warning(null==ReactCurrentOwner.current,"%s(...): Cannot update during an existing state transition (such as within `render` or another component's constructor). Render methods should be a pure function of props and state; constructor side-effects are an anti-pattern, but can be moved to `componentWillMount`.",callerName):void 0),internalInstance}var _prodInvariant=__webpack_require__(4),ReactCurrentOwner=__webpack_require__(14),ReactInstanceMap=__webpack_require__(61),ReactInstrumentation=__webpack_require__(9),ReactUpdates=__webpack_require__(13),invariant=__webpack_require__(1),warning=__webpack_require__(2),ReactUpdateQueue={isMounted:function(publicInstance){if("production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV){var owner=ReactCurrentOwner.current;null!==owner&&("production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?warning(owner._warnedAboutRefsInRender,"%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",owner.getName()||"A component"):void 0,owner._warnedAboutRefsInRender=!0)}var internalInstance=ReactInstanceMap.get(publicInstance);return!!internalInstance&&!!internalInstance._renderedComponent},enqueueCallback:function(publicInstance,callback,callerName){ReactUpdateQueue.validateCallback(callback,callerName);var internalInstance=getInternalInstanceReadyForUpdate(publicInstance);return internalInstance?(internalInstance._pendingCallbacks?internalInstance._pendingCallbacks.push(callback):internalInstance._pendingCallbacks=[callback],void enqueueUpdate(internalInstance)):null},enqueueCallbackInternal:function(internalInstance,callback){internalInstance._pendingCallbacks?internalInstance._pendingCallbacks.push(callback):internalInstance._pendingCallbacks=[callback],enqueueUpdate(internalInstance)},enqueueForceUpdate:function(publicInstance){var internalInstance=getInternalInstanceReadyForUpdate(publicInstance,"forceUpdate");internalInstance&&(internalInstance._pendingForceUpdate=!0,enqueueUpdate(internalInstance))},enqueueReplaceState:function(publicInstance,completeState){var internalInstance=getInternalInstanceReadyForUpdate(publicInstance,"replaceState");internalInstance&&(internalInstance._pendingStateQueue=[completeState],internalInstance._pendingReplaceState=!0,enqueueUpdate(internalInstance))},enqueueSetState:function(publicInstance,partialState){"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV&&(ReactInstrumentation.debugTool.onSetState(),"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?warning(null!=partialState,"setState(...): You passed an undefined or null state object; instead, use forceUpdate()."):void 0);var internalInstance=getInternalInstanceReadyForUpdate(publicInstance,"setState");if(internalInstance){var queue=internalInstance._pendingStateQueue||(internalInstance._pendingStateQueue=[]);queue.push(partialState),enqueueUpdate(internalInstance)}},enqueueElementInternal:function(internalInstance,nextElement,nextContext){internalInstance._pendingElement=nextElement,internalInstance._context=nextContext,enqueueUpdate(internalInstance)},validateCallback:function(callback,callerName){callback&&"function"!=typeof callback?"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?invariant(!1,"%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",callerName,formatUnexpectedArgument(callback)):_prodInvariant("122",callerName,formatUnexpectedArgument(callback)):void 0}};module.exports=ReactUpdateQueue},function(module,exports){"use strict";var createMicrosoftUnsafeLocalFunction=function(func){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(arg0,arg1,arg2,arg3){MSApp.execUnsafeLocalFunction(function(){return func(arg0,arg1,arg2,arg3)})}:func};module.exports=createMicrosoftUnsafeLocalFunction},function(module,exports){"use strict";function getEventCharCode(nativeEvent){var charCode,keyCode=nativeEvent.keyCode;return"charCode"in nativeEvent?(charCode=nativeEvent.charCode,0===charCode&&13===keyCode&&(charCode=13)):charCode=keyCode,charCode>=32||13===charCode?charCode:0}module.exports=getEventCharCode},function(module,exports){"use strict";function modifierStateGetter(keyArg){var syntheticEvent=this,nativeEvent=syntheticEvent.nativeEvent;if(nativeEvent.getModifierState)return nativeEvent.getModifierState(keyArg);var keyProp=modifierKeyToProp[keyArg];return!!keyProp&&!!nativeEvent[keyProp]}function getEventModifierState(nativeEvent){return modifierStateGetter}var modifierKeyToProp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};module.exports=getEventModifierState},function(module,exports){"use strict";function getEventTarget(nativeEvent){var target=nativeEvent.target||nativeEvent.srcElement||window;return target.correspondingUseElement&&(target=target.correspondingUseElement),3===target.nodeType?target.parentNode:target}module.exports=getEventTarget},function(module,exports,__webpack_require__){"use strict";function isEventSupported(eventNameSuffix,capture){if(!ExecutionEnvironment.canUseDOM||capture&&!("addEventListener"in document))return!1;var eventName="on"+eventNameSuffix,isSupported=eventName in document;if(!isSupported){var element=document.createElement("div");element.setAttribute(eventName,"return;"),isSupported="function"==typeof element[eventName]}return!isSupported&&useHasFeature&&"wheel"===eventNameSuffix&&(isSupported=document.implementation.hasFeature("Events.wheel","3.0")),isSupported}var useHasFeature,ExecutionEnvironment=__webpack_require__(7);ExecutionEnvironment.canUseDOM&&(useHasFeature=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),module.exports=isEventSupported},function(module,exports){"use strict";function shouldUpdateReactComponent(prevElement,nextElement){var prevEmpty=null===prevElement||prevElement===!1,nextEmpty=null===nextElement||nextElement===!1;if(prevEmpty||nextEmpty)return prevEmpty===nextEmpty;var prevType=typeof prevElement,nextType=typeof nextElement;return"string"===prevType||"number"===prevType?"string"===nextType||"number"===nextType:"object"===nextType&&prevElement.type===nextElement.type&&prevElement.key===nextElement.key}module.exports=shouldUpdateReactComponent},function(module,exports,__webpack_require__){"use strict";var _assign=__webpack_require__(6),emptyFunction=__webpack_require__(10),warning=__webpack_require__(2),validateDOMNesting=emptyFunction;if("production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV){var specialTags=["address","applet","area","article","aside","base","basefont","bgsound","blockquote","body","br","button","caption","center","col","colgroup","dd","details","dir","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","isindex","li","link","listing","main","marquee","menu","menuitem","meta","nav","noembed","noframes","noscript","object","ol","p","param","plaintext","pre","script","section","select","source","style","summary","table","tbody","td","template","textarea","tfoot","th","thead","title","tr","track","ul","wbr","xmp"],inScopeTags=["applet","caption","html","table","td","th","marquee","object","template","foreignObject","desc","title"],buttonScopeTags=inScopeTags.concat(["button"]),impliedEndTags=["dd","dt","li","option","optgroup","p","rp","rt"],emptyAncestorInfo={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null},updatedAncestorInfo=function(oldInfo,tag,instance){var ancestorInfo=_assign({},oldInfo||emptyAncestorInfo),info={tag:tag,instance:instance};return inScopeTags.indexOf(tag)!==-1&&(ancestorInfo.aTagInScope=null,ancestorInfo.buttonTagInScope=null,ancestorInfo.nobrTagInScope=null),buttonScopeTags.indexOf(tag)!==-1&&(ancestorInfo.pTagInButtonScope=null),specialTags.indexOf(tag)!==-1&&"address"!==tag&&"div"!==tag&&"p"!==tag&&(ancestorInfo.listItemTagAutoclosing=null,ancestorInfo.dlItemTagAutoclosing=null),ancestorInfo.current=info,"form"===tag&&(ancestorInfo.formTag=info),"a"===tag&&(ancestorInfo.aTagInScope=info),"button"===tag&&(ancestorInfo.buttonTagInScope=info),"nobr"===tag&&(ancestorInfo.nobrTagInScope=info),"p"===tag&&(ancestorInfo.pTagInButtonScope=info),"li"===tag&&(ancestorInfo.listItemTagAutoclosing=info),"dd"!==tag&&"dt"!==tag||(ancestorInfo.dlItemTagAutoclosing=info),ancestorInfo},isTagValidWithParent=function(tag,parentTag){switch(parentTag){case"select":return"option"===tag||"optgroup"===tag||"#text"===tag;case"optgroup":return"option"===tag||"#text"===tag;case"option":return"#text"===tag;case"tr":return"th"===tag||"td"===tag||"style"===tag||"script"===tag||"template"===tag;case"tbody":case"thead":case"tfoot":return"tr"===tag||"style"===tag||"script"===tag||"template"===tag;case"colgroup":return"col"===tag||"template"===tag;case"table":return"caption"===tag||"colgroup"===tag||"tbody"===tag||"tfoot"===tag||"thead"===tag||"style"===tag||"script"===tag||"template"===tag;case"head":return"base"===tag||"basefont"===tag||"bgsound"===tag||"link"===tag||"meta"===tag||"title"===tag||"noscript"===tag||"noframes"===tag||"style"===tag||"script"===tag||"template"===tag;case"html":return"head"===tag||"body"===tag;case"#document":return"html"===tag}switch(tag){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return"h1"!==parentTag&&"h2"!==parentTag&&"h3"!==parentTag&&"h4"!==parentTag&&"h5"!==parentTag&&"h6"!==parentTag;case"rp":case"rt":return impliedEndTags.indexOf(parentTag)===-1;case"body":case"caption":case"col":case"colgroup":case"frame":case"head":case"html":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return null==parentTag}return!0},findInvalidAncestorForTag=function(tag,ancestorInfo){switch(tag){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return ancestorInfo.pTagInButtonScope;case"form":return ancestorInfo.formTag||ancestorInfo.pTagInButtonScope;case"li":return ancestorInfo.listItemTagAutoclosing;case"dd":case"dt":return ancestorInfo.dlItemTagAutoclosing;case"button":return ancestorInfo.buttonTagInScope;case"a":return ancestorInfo.aTagInScope;case"nobr":return ancestorInfo.nobrTagInScope}return null},findOwnerStack=function(instance){if(!instance)return[];var stack=[];do stack.push(instance);while(instance=instance._currentElement._owner);return stack.reverse(),stack},didWarn={};validateDOMNesting=function(childTag,childText,childInstance,ancestorInfo){ancestorInfo=ancestorInfo||emptyAncestorInfo;var parentInfo=ancestorInfo.current,parentTag=parentInfo&&parentInfo.tag;null!=childText&&("production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?warning(null==childTag,"validateDOMNesting: when childText is passed, childTag should be null"):void 0,childTag="#text");var invalidParent=isTagValidWithParent(childTag,parentTag)?null:parentInfo,invalidAncestor=invalidParent?null:findInvalidAncestorForTag(childTag,ancestorInfo),problematic=invalidParent||invalidAncestor;if(problematic){var i,ancestorTag=problematic.tag,ancestorInstance=problematic.instance,childOwner=childInstance&&childInstance._currentElement._owner,ancestorOwner=ancestorInstance&&ancestorInstance._currentElement._owner,childOwners=findOwnerStack(childOwner),ancestorOwners=findOwnerStack(ancestorOwner),minStackLen=Math.min(childOwners.length,ancestorOwners.length),deepestCommon=-1;for(i=0;i "),warnKey=!!invalidParent+"|"+childTag+"|"+ancestorTag+"|"+ownerInfo;if(didWarn[warnKey])return;didWarn[warnKey]=!0;var tagDisplayName=childTag,whitespaceInfo="";if("#text"===childTag?/\S/.test(childText)?tagDisplayName="Text nodes":(tagDisplayName="Whitespace text nodes",whitespaceInfo=" Make sure you don't have any extra whitespace between tags on each line of your source code."):tagDisplayName="<"+childTag+">",invalidParent){var info="";"table"===ancestorTag&&"tr"===childTag&&(info+=" Add a
to your code to match the DOM tree generated by the browser."),"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?warning(!1,"validateDOMNesting(...): %s cannot appear as a child of <%s>.%s See %s.%s",tagDisplayName,ancestorTag,whitespaceInfo,ownerInfo,info):void 0}else"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?warning(!1,"validateDOMNesting(...): %s cannot appear as a descendant of <%s>. See %s.",tagDisplayName,ancestorTag,ownerInfo):void 0}},validateDOMNesting.updatedAncestorInfo=updatedAncestorInfo,validateDOMNesting.isTagValidInContext=function(tag,ancestorInfo){ancestorInfo=ancestorInfo||emptyAncestorInfo;var parentInfo=ancestorInfo.current,parentTag=parentInfo&&parentInfo.tag;return isTagValidWithParent(tag,parentTag)&&!findInvalidAncestorForTag(tag,ancestorInfo)}}module.exports=validateDOMNesting},[1290,267],33,[1305,266,719,531,136],[1321,1136,521],function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(exports,"__esModule",{value:!0});var _extends2=__webpack_require__(16),_extends3=_interopRequireDefault(_extends2),_react=__webpack_require__(3),_react2=_interopRequireDefault(_react),_createStyles=__webpack_require__(20),_createStyles2=_interopRequireDefault(_createStyles),ObjectName=function(_ref,_ref2){var name=_ref.name,dimmed=_ref.dimmed,theme=_ref2.theme,styles=(0,_createStyles2.default)("ObjectName",theme);return _react2.default.createElement("span",{style:(0,_extends3.default)({},styles.base,dimmed&&styles.dimmed)},name)};ObjectName.propTypes={name:_react.PropTypes.string,dimmed:_react.PropTypes.bool},ObjectName.defaultProps={dimmed:!1},ObjectName.contextTypes={theme:_react2.default.PropTypes.oneOfType([_react.PropTypes.string,_react.PropTypes.object])},exports.default=ObjectName},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(exports,"__esModule",{value:!0});var _typeof2=__webpack_require__(17),_typeof3=_interopRequireDefault(_typeof2),_react=__webpack_require__(3),_react2=_interopRequireDefault(_react),_createStyles=__webpack_require__(20),_createStyles2=_interopRequireDefault(_createStyles),ObjectValue=function(_ref,_ref2){var object=_ref.object,theme=_ref2.theme,styles=(0,_createStyles2.default)("ObjectValue",theme);switch("undefined"==typeof object?"undefined":(0,_typeof3.default)(object)){case"number":return _react2.default.createElement("span",{style:styles.objectValueNumber},object);case"string":return _react2.default.createElement("span",{style:styles.objectValueString},'"',object,'"');case"boolean":return _react2.default.createElement("span",{style:styles.objectValueBoolean},String(object));case"undefined":return _react2.default.createElement("span",{style:styles.objectValueUndefined},"undefined");case"object":return null===object?_react2.default.createElement("span",{style:styles.objectValueNull},"null"):object instanceof Date?_react2.default.createElement("span",null,object.toString()):object instanceof RegExp?_react2.default.createElement("span",{style:styles.objectValueRegExp},object.toString()):Array.isArray(object)?_react2.default.createElement("span",null,"Array["+object.length+"]"):_react2.default.createElement("span",null,object.constructor.name);case"function":return _react2.default.createElement("span",null,_react2.default.createElement("span",{style:styles.objectValueFunctionKeyword},"function"),_react2.default.createElement("span",{style:styles.objectValueFunctionName}," ",object.name,"()"));case"symbol":return _react2.default.createElement("span",{style:styles.objectValueSymbol},object.toString());default:return _react2.default.createElement("span",null)}};ObjectValue.propTypes={object:_react.PropTypes.any},ObjectValue.contextTypes={theme:_react.PropTypes.oneOfType([_react.PropTypes.string,_react.PropTypes.object])},exports.default=ObjectValue},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(exports,"__esModule",{value:!0});var _classCallCheck2=__webpack_require__(26),_classCallCheck3=_interopRequireDefault(_classCallCheck2),_createClass2=__webpack_require__(27),_createClass3=_interopRequireDefault(_createClass2),_possibleConstructorReturn2=__webpack_require__(29),_possibleConstructorReturn3=_interopRequireDefault(_possibleConstructorReturn2),_inherits2=__webpack_require__(28),_inherits3=_interopRequireDefault(_inherits2),_react=__webpack_require__(3),ThemeProvider=(_interopRequireDefault(_react),function(_Component){function ThemeProvider(){return(0,_classCallCheck3.default)(this,ThemeProvider),(0,_possibleConstructorReturn3.default)(this,Object.getPrototypeOf(ThemeProvider).apply(this,arguments))}return(0,_inherits3.default)(ThemeProvider,_Component),(0,_createClass3.default)(ThemeProvider,[{key:"getChildContext",value:function(){var theme=this.props.theme;return{theme:theme}}},{key:"render",value:function(){return this.props.children}}]),ThemeProvider}(_react.Component));ThemeProvider.childContextTypes={theme:_react.PropTypes.oneOfType([_react.PropTypes.string,_react.PropTypes.object])},exports.default=ThemeProvider},function(module,exports){"use strict";exports.__esModule=!0,exports.default=function(obj,keys){var target={};for(var i in obj)keys.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(obj,i)&&(target[i]=obj[i]);return target}},function(module,exports){var toString={}.toString;module.exports=function(it){return toString.call(it).slice(8,-1)}},[1289,572],102,function(module,exports){module.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(module,exports){module.exports=!0},[1304,30,587,147,152,274,577],function(module,exports){exports.f=Object.getOwnPropertySymbols},[1316,22,33,12],[1317,153,81],[1318,21],105,[1323,146],[1324,64],[1325,21,11,148,158,22],[1326,12],[1339,596,21,48,49,12],[1290,285],33,[1305,284,739,620,160],[1321,1220,610],function(module,exports,__webpack_require__){"use strict";function ReactComponent(props,context,updater){this.props=props,this.context=context,this.refs=emptyObject,this.updater=updater||ReactNoopUpdateQueue}var _prodInvariant=__webpack_require__(36),ReactNoopUpdateQueue=__webpack_require__(165),canDefineProperty=__webpack_require__(167),emptyObject=__webpack_require__(57),invariant=__webpack_require__(1),warning=__webpack_require__(2);if(ReactComponent.prototype.isReactComponent={},ReactComponent.prototype.setState=function(partialState,callback){"object"!=typeof partialState&&"function"!=typeof partialState&&null!=partialState?"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?invariant(!1,"setState(...): takes an object of state variables to update or a function which returns an object of state variables."):_prodInvariant("85"):void 0,this.updater.enqueueSetState(this,partialState),callback&&this.updater.enqueueCallback(this,callback,"setState")},ReactComponent.prototype.forceUpdate=function(callback){this.updater.enqueueForceUpdate(this),callback&&this.updater.enqueueCallback(this,callback,"forceUpdate")},"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV){var deprecatedAPIs={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},defineDeprecationWarning=function(methodName,info){canDefineProperty&&Object.defineProperty(ReactComponent.prototype,methodName,{get:function(){"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?warning(!1,"%s(...) is deprecated in plain JavaScript React classes. %s",info[0],info[1]):void 0}})};for(var fnName in deprecatedAPIs)deprecatedAPIs.hasOwnProperty(fnName)&&defineDeprecationWarning(fnName,deprecatedAPIs[fnName])}module.exports=ReactComponent},function(module,exports,__webpack_require__){"use strict";function warnNoop(publicInstance,callerName){if("production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV){var constructor=publicInstance.constructor;"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?warning(!1,"%s(...): Can only update a mounted or mounting component. This usually means you called %s() on an unmounted component. This is a no-op. Please check the code for the %s component.",callerName,callerName,constructor&&(constructor.displayName||constructor.name)||"ReactClass"):void 0}}var warning=__webpack_require__(2),ReactNoopUpdateQueue={isMounted:function(publicInstance){return!1},enqueueCallback:function(publicInstance,callback){},enqueueForceUpdate:function(publicInstance){warnNoop(publicInstance,"forceUpdate")},enqueueReplaceState:function(publicInstance,completeState){warnNoop(publicInstance,"replaceState")},enqueueSetState:function(publicInstance,partialState){warnNoop(publicInstance,"setState")}};module.exports=ReactNoopUpdateQueue},function(module,exports,__webpack_require__){"use strict";var ReactPropTypeLocationNames={};"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV&&(ReactPropTypeLocationNames={prop:"prop",context:"context",childContext:"child context"}),module.exports=ReactPropTypeLocationNames},function(module,exports,__webpack_require__){"use strict";var canDefineProperty=!1;if("production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV)try{Object.defineProperty({},"x",{get:function(){}}),canDefineProperty=!0}catch(x){}module.exports=canDefineProperty},function(module,exports){"use strict";function getIteratorFn(maybeIterable){var iteratorFn=maybeIterable&&(ITERATOR_SYMBOL&&maybeIterable[ITERATOR_SYMBOL]||maybeIterable[FAUX_ITERATOR_SYMBOL]);if("function"==typeof iteratorFn)return iteratorFn}var ITERATOR_SYMBOL="function"==typeof Symbol&&Symbol.iterator,FAUX_ITERATOR_SYMBOL="@@iterator";module.exports=getIteratorFn},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.setActions=exports.setContext=void 0;var _reactKomposer=__webpack_require__(1161),_context=void 0,_actions=void 0,compose=(exports.setContext=function(c){_context=c},exports.setActions=function(a){_actions=a},(0,_reactKomposer.setDefaults)({propsToWatch:[],pure:!0,env:{context:function(){return _context},actions:function(){return _actions}}}));exports.default=compose},26,[1274,794],52,[1294,100,292,97],[1312,656,335],[1327,342,294,84],26,[1274,348],147,[1316,39,42,40],[1318,38],,,52,[1294,110,307,107],[1312,682,366],[1327,373,309,88],,,,,,[1287,240],52,[1294,119,316,116],,function(module,exports,__webpack_require__){"use strict";module.exports=__webpack_require__(463)},[1293,93,92,717,198],[1294,138,320,136],[1327,529,321,93],[1293,95,94,737,201],[1294,162,323,160],[1327,618,324,95],,function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function isModifierPressed(e){return(e.ctrlKey||91===e.keyCode||e.metaKey)&&e.shiftKey}function focusInInput(e){return/input|textarea/i.test(e.target.tagName)||null!==e.target.getAttribute("contenteditable")}function handle(e){if(e.keyCode===(0,_keycode2.default)("escape"))return features.ESCAPE;if(focusInInput(e))return!1;if(!isModifierPressed(e))return!1;switch(e.keyCode){case(0,_keycode2.default)("F"):return e.preventDefault(),features.FULLSCREEN;case(0,_keycode2.default)("D"):return e.preventDefault(),features.DOWN_PANEL;case(0,_keycode2.default)("L"):return e.preventDefault(),features.LEFT_PANEL;case(0,_keycode2.default)("right"):return e.preventDefault(),features.NEXT_STORY;case(0,_keycode2.default)("left"):return e.preventDefault(),features.PREV_STORY;case(0,_keycode2.default)("P"):return e.preventDefault(),features.SEARCH;case(0,_keycode2.default)("J"):return e.preventDefault(),features.DOWN_PANEL_IN_RIGHT;default:return!1}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.features=void 0,exports.isModifierPressed=isModifierPressed,exports.default=handle;var _keycode=__webpack_require__(418),_keycode2=_interopRequireDefault(_keycode),features=exports.features={FULLSCREEN:1,DOWN_PANEL:2,LEFT_PANEL:3,SHORTCUTS_HELP:4,ESCAPE:5,NEXT_STORY:6,PREV_STORY:7,SEARCH:8,DOWN_PANEL_IN_RIGHT:9}},function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.baseFonts={fontFamily:'\n -apple-system, ".SFNSText-Regular", "San Francisco", "Roboto",\n "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif\n ',color:"#444"}},function(module,exports){"use strict";function genPoddaLoader(fn){return function(props,onData,env){var _env$context=env.context(),clientStore=_env$context.clientStore,processState=function(){try{var state=clientStore.getAll(),data=fn(state,props,env);onData(null,data)}catch(ex){onData(ex)}};return processState(),clientStore.subscribe(processState)}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=genPoddaLoader},[1269,802],[1276,795,793,646],[1277,646],[1287,211],54,function(module,exports,__webpack_require__){module.exports=__webpack_require__(634)},144,[1289,350],[1291,54,38],148,[1304,68,299,178,104,215,352],80,[1324,54],[1287,221],54,function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;!function(){"use strict";function classNames(){for(var classes=[],i=0;i2?arguments[2]:[];if(!this.IsCallable(F))throw new TypeError(F+" is not a function");return F.apply(V,args)},ToPrimitive:toPrimitive,ToNumber:function(argument){var value=isPrimitive(argument)?argument:toPrimitive(argument,"number");if("symbol"==typeof value)throw new TypeError("Cannot convert a Symbol value to a number");if("string"==typeof value){if(isBinary(value))return this.ToNumber(parseInteger(strSlice(value,2),2));if(isOctal(value))return this.ToNumber(parseInteger(strSlice(value,2),8));if(hasNonWS(value)||isInvalidHexLiteral(value))return NaN;var trimmed=trim(value);if(trimmed!==value)return this.ToNumber(trimmed)}return Number(value)},ToInt16:function(argument){var int16bit=this.ToUint16(argument);return int16bit>=32768?int16bit-65536:int16bit},ToInt8:function(argument){var int8bit=this.ToUint8(argument);return int8bit>=128?int8bit-256:int8bit},ToUint8:function(argument){var number=this.ToNumber(argument);if($isNaN(number)||0===number||!$isFinite(number))return 0;var posInt=sign(number)*Math.floor(Math.abs(number));return mod(posInt,256)},ToUint8Clamp:function(argument){var number=this.ToNumber(argument);if($isNaN(number)||number<=0)return 0;if(number>=255)return 255;var f=Math.floor(argument);return f+.5MAX_SAFE_INTEGER?MAX_SAFE_INTEGER:len},CanonicalNumericIndexString:function(argument){if("[object String]"!==toStr.call(argument))throw new TypeError("must be a string"); -if("-0"===argument)return-0;var n=this.ToNumber(argument);return this.SameValue(this.ToString(n),argument)?n:void 0},RequireObjectCoercible:ES5.CheckObjectCoercible,IsArray:Array.isArray||function(argument){return"[object Array]"===toStr.call(argument)},IsConstructor:function(argument){return"function"==typeof argument&&!!argument.prototype},IsExtensible:function(obj){return!Object.preventExtensions||!isPrimitive(obj)&&Object.isExtensible(obj)},IsInteger:function(argument){if("number"!=typeof argument||$isNaN(argument)||!$isFinite(argument))return!1;var abs=Math.abs(argument);return Math.floor(abs)===abs},IsPropertyKey:function(argument){return"string"==typeof argument||"symbol"==typeof argument},IsRegExp:function(argument){if(!argument||"object"!=typeof argument)return!1;if(hasSymbols){var isRegExp=argument[Symbol.match];if("undefined"!=typeof isRegExp)return ES5.ToBoolean(isRegExp)}return hasRegExpMatcher(argument)},SameValueZero:function(x,y){return x===y||$isNaN(x)&&$isNaN(y)},Type:function(x){return"symbol"==typeof x?"Symbol":ES5.Type(x)},SpeciesConstructor:function(O,defaultConstructor){if("Object"!==this.Type(O))throw new TypeError("Assertion failed: Type(O) is not Object");var C=O.constructor;if("undefined"==typeof C)return defaultConstructor;if("Object"!==this.Type(C))throw new TypeError("O.constructor is not an Object");var S=hasSymbols&&Symbol.species?C[Symbol.species]:void 0;if(null==S)return defaultConstructor;if(this.IsConstructor(S))return S;throw new TypeError("no constructor found")}});delete ES6.CheckObjectCoercible,module.exports=ES6},function(module,exports){var has=Object.prototype.hasOwnProperty;module.exports=Object.assign||function(target,source){for(var key in source)has.call(source,key)&&(target[key]=source[key]);return target}},function(module,exports){var $isNaN=Number.isNaN||function(a){return a!==a};module.exports=Number.isFinite||function(x){return"number"==typeof x&&!$isNaN(x)&&x!==1/0&&x!==-(1/0)}},function(module,exports){module.exports=Number.isNaN||function(a){return a!==a}},function(module,exports){module.exports=function(number,modulo){var remain=number%modulo;return Math.floor(remain>=0?remain:remain+modulo)}},function(module,exports){module.exports=function(number){return number>=0?1:-1}},function(module,exports){module.exports=function(value){return null===value||"function"!=typeof value&&"object"!=typeof value}},function(module,exports,__webpack_require__){"use strict";var emptyFunction=__webpack_require__(10),EventListener={listen:function(target,eventType,callback){return target.addEventListener?(target.addEventListener(eventType,callback,!1),{remove:function(){target.removeEventListener(eventType,callback,!1)}}):target.attachEvent?(target.attachEvent("on"+eventType,callback),{remove:function(){target.detachEvent("on"+eventType,callback)}}):void 0},capture:function(target,eventType,callback){return target.addEventListener?(target.addEventListener(eventType,callback,!0),{remove:function(){target.removeEventListener(eventType,callback,!0)}}):("production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV&&console.error("Attempted to listen to events during the capture phase on a browser that does not support the capture phase. Your application will not receive some events."),{remove:emptyFunction})},registerDefault:function(){}};module.exports=EventListener},function(module,exports){"use strict";function focusNode(node){try{node.focus()}catch(e){}}module.exports=focusNode},function(module,exports){"use strict";function getActiveElement(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(e){return document.body}}module.exports=getActiveElement},function(module,exports,__webpack_require__){var bind=__webpack_require__(44);module.exports=bind.call(Function.call,Object.prototype.hasOwnProperty)},function(module,exports){function stringify(obj,replacer,spaces,cycleReplacer){return JSON.stringify(obj,serializer(replacer,cycleReplacer),spaces)}function serializer(replacer,cycleReplacer){var stack=[],keys=[];return null==cycleReplacer&&(cycleReplacer=function(key,value){return stack[0]===value?"[Circular ~]":"[Circular ~."+keys.slice(0,stack.indexOf(value)).join(".")+"]"}),function(key,value){if(stack.length>0){var thisPos=stack.indexOf(this);~thisPos?stack.splice(thisPos+1):stack.push(this),~thisPos?keys.splice(thisPos,1/0,key):keys.push(key),~stack.indexOf(value)&&(value=cycleReplacer.call(this,key,value))}else stack.push(value);return null==replacer?value:replacer.call(this,key,value)}}exports=module.exports=stringify,exports.getSerialize=serializer},function(module,exports){(function(global){function apply(func,thisArg,args){switch(args.length){case 0:return func.call(thisArg);case 1:return func.call(thisArg,args[0]);case 2:return func.call(thisArg,args[0],args[1]);case 3:return func.call(thisArg,args[0],args[1],args[2])}return func.apply(thisArg,args)}function arrayMap(array,iteratee){for(var index=-1,length=array?array.length:0,result=Array(length);++index0&&predicate(value)?depth>1?baseFlatten(value,depth-1,predicate,isStrict,result):arrayPush(result,value):isStrict||(result[result.length]=value)}return result}function basePick(object,props){return object=Object(object),basePickBy(object,props,function(value,key){return key in object})}function basePickBy(object,props,predicate){for(var index=-1,length=props.length,result={};++index-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}function isObjectLike(value){return!!value&&"object"==typeof value}function isSymbol(value){return"symbol"==typeof value||isObjectLike(value)&&objectToString.call(value)==symbolTag}var INFINITY=1/0,MAX_SAFE_INTEGER=9007199254740991,argsTag="[object Arguments]",funcTag="[object Function]",genTag="[object GeneratorFunction]",symbolTag="[object Symbol]",freeGlobal="object"==typeof global&&global&&global.Object===Object&&global,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty,objectToString=objectProto.toString,Symbol=root.Symbol,propertyIsEnumerable=objectProto.propertyIsEnumerable,spreadableSymbol=Symbol?Symbol.isConcatSpreadable:void 0,nativeMax=Math.max,isArray=Array.isArray,pick=baseRest(function(object,props){return null==object?{}:basePick(object,arrayMap(baseFlatten(props,1),toKey))});module.exports=pick}).call(exports,function(){return this}())},[1275,1058],54,[1312,710,423],function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function compose(fn,L1,E1){var _ref=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],contextTypes=_ref.contextTypes,_ref$pure=_ref.pure,pure=void 0===_ref$pure||_ref$pure,_ref$withRef=_ref.withRef,withRef=void 0!==_ref$withRef&&_ref$withRef;return function(ChildComponent,L2,E2){(0,_invariant2.default)(Boolean(ChildComponent),"Should provide a child component to build the higher order container."),(0,_utils.isReactNative)()&&((0,_invariant2.default)(L1||L2,"Should provide a loading component in ReactNative."),(0,_invariant2.default)(E1||E2,"Should provide a error handling component in ReactNative."));var LoadingComponent=L1||L2||(0,_._getDefaultLoadingComponent)(),ErrorComponent=E1||E2||(0,_._getDefaultErrorComponent)();if((0,_.getDisableMode)())return(0,_utils.inheritStatics)(_common_components.DummyComponent,ChildComponent);var Container=function(_React$Component){function Container(props,context){(0,_classCallCheck3.default)(this,Container);var _this=(0,_possibleConstructorReturn3.default)(this,(0,_getPrototypeOf2.default)(Container).call(this,props,context));return _this.getWrappedInstance=_this.getWrappedInstance.bind(_this),_this.state={},_this._subscribe(props,context),_this}return(0,_inherits3.default)(Container,_React$Component),(0,_createClass3.default)(Container,[{key:"componentDidMount",value:function(){this._mounted=!0}},{key:"componentWillReceiveProps",value:function(props,context){this._subscribe(props,context)}},{key:"componentWillUnmount",value:function(){this._mounted=!1,this._unsubscribe()}},{key:"shouldComponentUpdate",value:function(nextProps,nextState){return!pure||(!(0,_shallowequal2.default)(this.props,nextProps)||this.state.error!==nextState.error||!(0,_shallowequal2.default)(this.state.payload,nextState.payload))}},{key:"getWrappedInstance",value:function(){return(0,_invariant2.default)(withRef,"To access the wrapped instance, you need to specify { withRef: true } as the fourth argument of the compose() call."),this.refs.wrappedInstance}},{key:"render",value:function(){var error=this._getError(),loading=this._isLoading();return error?_react2.default.createElement(ErrorComponent,{error:error}):loading?_react2.default.createElement(LoadingComponent,this._getProps()):_react2.default.createElement(ChildComponent,this._getProps())}},{key:"_subscribe",value:function(props,context){var _this2=this;this._unsubscribe();var onData=function(error,payload){error&&(0,_invariant2.default)(error.message&&error.stack,"Passed error should be an instance of an Error.");var state={error:error,payload:payload};_this2._mounted?_this2.setState(state):_this2.state=state};this._stop=fn(props,onData,context)}},{key:"_unsubscribe",value:function(){this._stop&&this._stop()}},{key:"_getProps",value:function(){var _state$payload=this.state.payload,payload=void 0===_state$payload?{}:_state$payload,props=(0,_extends3.default)({},this.props,payload);return withRef&&(props.ref="wrappedInstance"),props}},{key:"_getError",value:function(){var error=this.state.error;return error}},{key:"_isLoading",value:function(){var payload=this.state.payload;return!Boolean(payload)}}]),Container}(_react2.default.Component);return Container.contextTypes=contextTypes,(0,_utils.inheritStatics)(Container,ChildComponent)}}Object.defineProperty(exports,"__esModule",{value:!0});var _extends2=__webpack_require__(239),_extends3=_interopRequireDefault(_extends2),_getPrototypeOf=__webpack_require__(699),_getPrototypeOf2=_interopRequireDefault(_getPrototypeOf),_classCallCheck2=__webpack_require__(419),_classCallCheck3=_interopRequireDefault(_classCallCheck2),_createClass2=__webpack_require__(420),_createClass3=_interopRequireDefault(_createClass2),_possibleConstructorReturn2=__webpack_require__(701),_possibleConstructorReturn3=_interopRequireDefault(_possibleConstructorReturn2),_inherits2=__webpack_require__(700),_inherits3=_interopRequireDefault(_inherits2);exports.default=compose;var _react=__webpack_require__(3),_react2=_interopRequireDefault(_react),_invariant=__webpack_require__(413),_invariant2=_interopRequireDefault(_invariant),_shallowequal=__webpack_require__(753),_shallowequal2=_interopRequireDefault(_shallowequal),_utils=__webpack_require__(714),_common_components=__webpack_require__(435),_=__webpack_require__(436)},function(module,exports){"use strict";var replace=String.prototype.replace,percentTwenties=/%20/g;module.exports={default:"RFC3986",formatters:{RFC1738:function(value){return replace.call(value,percentTwenties,"+")},RFC3986:function(value){return value}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},function(module,exports){"use strict";var has=Object.prototype.hasOwnProperty,hexTable=function(){for(var array=[],i=0;i<256;++i)array.push("%"+((i<16?"0":"")+i.toString(16)).toUpperCase());return array}();exports.arrayToObject=function(source,options){for(var obj=options&&options.plainObjects?Object.create(null):{},i=0;i=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122?out+=string.charAt(i):c<128?out+=hexTable[c]:c<2048?out+=hexTable[192|c>>6]+hexTable[128|63&c]:c<55296||c>=57344?out+=hexTable[224|c>>12]+hexTable[128|c>>6&63]+hexTable[128|63&c]:(i+=1,c=65536+((1023&c)<<10|1023&string.charCodeAt(i)),out+=hexTable[240|c>>18]+hexTable[128|c>>12&63]+hexTable[128|c>>6&63]+hexTable[128|63&c])}return out},exports.compact=function(obj,references){if("object"!=typeof obj||null===obj)return obj;var refs=references||[],lookup=refs.indexOf(obj);if(lookup!==-1)return refs[lookup];if(refs.push(obj),Array.isArray(obj)){for(var compacted=[],i=0;i must be an array if `multiple` is true.%s",propName,getDeclarationErrorAddendum(owner)):void 0:!props.multiple&&isArray&&("production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?warning(!1,"The `%s` prop supplied to ',""],tableWrap=[1,"
","
"],trWrap=[3,"","
"],svgWrap=[1,'',""],markupWrap={"*":[1,"?
","
"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:selectWrap,option:selectWrap,caption:tableWrap,colgroup:tableWrap,tbody:tableWrap,tfoot:tableWrap,thead:tableWrap,td:trWrap,th:trWrap},svgElements=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];svgElements.forEach(function(nodeName){markupWrap[nodeName]=svgWrap,shouldWrap[nodeName]=!0}),module.exports=getMarkupWrap},function(module,exports){"use strict";function getUnboundedScrollPosition(scrollable){return scrollable===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:scrollable.scrollLeft,y:scrollable.scrollTop}}module.exports=getUnboundedScrollPosition},function(module,exports){"use strict";function hyphenate(string){return string.replace(_uppercasePattern,"-$1").toLowerCase()}var _uppercasePattern=/([A-Z])/g;module.exports=hyphenate},function(module,exports,__webpack_require__){"use strict";function hyphenateStyleName(string){return hyphenate(string).replace(msPattern,"-ms-")}var hyphenate=__webpack_require__(403),msPattern=/^ms-/;module.exports=hyphenateStyleName},function(module,exports){"use strict";function isNode(object){ -return!(!object||!("function"==typeof Node?object instanceof Node:"object"==typeof object&&"number"==typeof object.nodeType&&"string"==typeof object.nodeName))}module.exports=isNode},function(module,exports,__webpack_require__){"use strict";function isTextNode(object){return isNode(object)&&3==object.nodeType}var isNode=__webpack_require__(405);module.exports=isTextNode},function(module,exports){"use strict";function memoizeStringOnly(callback){var cache={};return function(string){return cache.hasOwnProperty(string)||(cache[string]=callback.call(this,string)),cache[string]}}module.exports=memoizeStringOnly},function(module,exports,__webpack_require__){"use strict";var performance,ExecutionEnvironment=__webpack_require__(7);ExecutionEnvironment.canUseDOM&&(performance=window.performance||window.msPerformance||window.webkitPerformance),module.exports=performance||{}},function(module,exports,__webpack_require__){"use strict";var performanceNow,performance=__webpack_require__(408);performanceNow=performance.now?function(){return performance.now()}:function(){return Date.now()},module.exports=performanceNow},function(module,exports){var hasOwn=Object.prototype.hasOwnProperty,toString=Object.prototype.toString;module.exports=function(obj,fn,ctx){if("[object Function]"!==toString.call(fn))throw new TypeError("iterator must be a function");var l=obj.length;if(l===+l)for(var i=0;i0&&!has.call(object,0))for(var i=0;i0)for(var j=0;j=0&&"[object Function]"===toStr.call(value.callee)),isArgs}},function(module,exports,__webpack_require__){"use strict";var ES=__webpack_require__(56),has=__webpack_require__(236),bind=__webpack_require__(44),isEnumerable=bind.call(Function.call,Object.prototype.propertyIsEnumerable);module.exports=function(O){var obj=ES.RequireObjectCoercible(O),entrys=[];for(var key in obj)has(obj,key)&&isEnumerable(obj,key)&&entrys.push([key,obj[key]]);return entrys}},function(module,exports,__webpack_require__){"use strict";var implementation=__webpack_require__(439);module.exports=function(){return"function"==typeof Object.entries?Object.entries:implementation}},function(module,exports,__webpack_require__){"use strict";var getPolyfill=__webpack_require__(440),define=__webpack_require__(43);module.exports=function(){var polyfill=getPolyfill();return define(Object,{entries:polyfill},{entries:function(){return Object.entries!==polyfill}}),polyfill}},function(module,exports,__webpack_require__){"use strict";var ES=__webpack_require__(56),defineProperty=Object.defineProperty,getDescriptor=Object.getOwnPropertyDescriptor,getOwnNames=Object.getOwnPropertyNames,getSymbols=Object.getOwnPropertySymbols,concat=Function.call.bind(Array.prototype.concat),reduce=Function.call.bind(Array.prototype.reduce),getAll=getSymbols?function(obj){return concat(getOwnNames(obj),getSymbols(obj))}:getOwnNames,isES5=ES.IsCallable(getDescriptor)&&ES.IsCallable(getOwnNames),safePut=function(obj,prop,val){defineProperty&&prop in obj?defineProperty(obj,prop,{configurable:!0,enumerable:!0,value:val,writable:!0}):obj[prop]=val};module.exports=function(value){if(ES.RequireObjectCoercible(value),!isES5)throw new TypeError("getOwnPropertyDescriptors requires Object.getOwnPropertyDescriptor");var O=ES.ToObject(value);return reduce(getAll(O),function(acc,key){var descriptor=getDescriptor(O,key);return"undefined"!=typeof descriptor&&safePut(acc,key,descriptor),acc},{})}},function(module,exports,__webpack_require__){"use strict";var implementation=__webpack_require__(442);module.exports=function(){return"function"==typeof Object.getOwnPropertyDescriptors?Object.getOwnPropertyDescriptors:implementation}},function(module,exports,__webpack_require__){"use strict";var getPolyfill=__webpack_require__(443),define=__webpack_require__(43);module.exports=function(){var polyfill=getPolyfill();return define(Object,{getOwnPropertyDescriptors:polyfill},{getOwnPropertyDescriptors:function(){return Object.getOwnPropertyDescriptors!==polyfill}}),polyfill}},function(module,exports,__webpack_require__){"use strict";var ES=__webpack_require__(56),has=__webpack_require__(236),bind=__webpack_require__(44),isEnumerable=bind.call(Function.call,Object.prototype.propertyIsEnumerable);module.exports=function(O){var obj=ES.RequireObjectCoercible(O),vals=[];for(var key in obj)has(obj,key)&&isEnumerable(obj,key)&&vals.push(obj[key]);return vals}},function(module,exports,__webpack_require__){"use strict";var implementation=__webpack_require__(445);module.exports=function(){return"function"==typeof Object.values?Object.values:implementation}},function(module,exports,__webpack_require__){"use strict";var getPolyfill=__webpack_require__(446),define=__webpack_require__(43);module.exports=function(){var polyfill=getPolyfill();return define(Object,{values:polyfill},{values:function(){return Object.values!==polyfill}}),polyfill}},function(module,exports,__webpack_require__){"use strict";var utils=__webpack_require__(244),has=Object.prototype.hasOwnProperty,defaults={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:utils.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},parseValues=function(str,options){for(var obj={},parts=str.split(options.delimiter,options.parameterLimit===1/0?void 0:options.parameterLimit),i=0;i=0&&options.parseArrays&&index<=options.arrayLimit?(obj=[],obj[index]=parseObject(chain,val,options)):obj[cleanRoot]=parseObject(chain,val,options)}return obj},parseKeys=function(givenKey,val,options){if(givenKey){var key=options.allowDots?givenKey.replace(/\.([^\.\[]+)/g,"[$1]"):givenKey,parent=/^([^\[\]]*)/,child=/(\[[^\[\]]*\])/g,segment=parent.exec(key),keys=[];if(segment[1]){if(!options.plainObjects&&has.call(Object.prototype,segment[1])&&!options.allowPrototypes)return;keys.push(segment[1])}for(var i=0;null!==(segment=child.exec(key))&&i8&&documentMode<=11),SPACEBAR_CODE=32,SPACEBAR_CHAR=String.fromCharCode(SPACEBAR_CODE),eventTypes={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:["topBlur","topCompositionEnd","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:["topBlur","topCompositionStart","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:["topBlur","topCompositionUpdate","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]}},hasSpaceKeypress=!1,currentComposition=null,BeforeInputEventPlugin={eventTypes:eventTypes,extractEvents:function(topLevelType,targetInst,nativeEvent,nativeEventTarget){return[extractCompositionEvent(topLevelType,targetInst,nativeEvent,nativeEventTarget),extractBeforeInputEvent(topLevelType,targetInst,nativeEvent,nativeEventTarget)]}};module.exports=BeforeInputEventPlugin},function(module,exports,__webpack_require__){"use strict";var CSSProperty=__webpack_require__(245),ExecutionEnvironment=__webpack_require__(7),ReactInstrumentation=__webpack_require__(9),camelizeStyleName=__webpack_require__(397),dangerousStyleValue=__webpack_require__(511),hyphenateStyleName=__webpack_require__(404),memoizeStringOnly=__webpack_require__(407),warning=__webpack_require__(2),processStyleName=memoizeStringOnly(function(styleName){ -return hyphenateStyleName(styleName)}),hasShorthandPropertyBug=!1,styleFloatAccessor="cssFloat";if(ExecutionEnvironment.canUseDOM){var tempStyle=document.createElement("div").style;try{tempStyle.font=""}catch(e){hasShorthandPropertyBug=!0}void 0===document.documentElement.style.cssFloat&&(styleFloatAccessor="styleFloat")}if("production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV)var badVendoredStyleNamePattern=/^(?:webkit|moz|o)[A-Z]/,badStyleValueWithSemicolonPattern=/;\s*$/,warnedStyleNames={},warnedStyleValues={},warnedForNaNValue=!1,warnHyphenatedStyleName=function(name,owner){warnedStyleNames.hasOwnProperty(name)&&warnedStyleNames[name]||(warnedStyleNames[name]=!0,"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?warning(!1,"Unsupported style property %s. Did you mean %s?%s",name,camelizeStyleName(name),checkRenderMessage(owner)):void 0)},warnBadVendoredStyleName=function(name,owner){warnedStyleNames.hasOwnProperty(name)&&warnedStyleNames[name]||(warnedStyleNames[name]=!0,"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?warning(!1,"Unsupported vendor-prefixed style property %s. Did you mean %s?%s",name,name.charAt(0).toUpperCase()+name.slice(1),checkRenderMessage(owner)):void 0)},warnStyleValueWithSemicolon=function(name,value,owner){warnedStyleValues.hasOwnProperty(value)&&warnedStyleValues[value]||(warnedStyleValues[value]=!0,"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?warning(!1,'Style property values shouldn\'t contain a semicolon.%s Try "%s: %s" instead.',checkRenderMessage(owner),name,value.replace(badStyleValueWithSemicolonPattern,"")):void 0)},warnStyleValueIsNaN=function(name,value,owner){warnedForNaNValue||(warnedForNaNValue=!0,"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?warning(!1,"`NaN` is an invalid value for the `%s` css style property.%s",name,checkRenderMessage(owner)):void 0)},checkRenderMessage=function(owner){if(owner){var name=owner.getName();if(name)return" Check the render method of `"+name+"`."}return""},warnValidStyle=function(name,value,component){var owner;component&&(owner=component._currentElement._owner),name.indexOf("-")>-1?warnHyphenatedStyleName(name,owner):badVendoredStyleNamePattern.test(name)?warnBadVendoredStyleName(name,owner):badStyleValueWithSemicolonPattern.test(value)&&warnStyleValueWithSemicolon(name,value,owner),"number"==typeof value&&isNaN(value)&&warnStyleValueIsNaN(name,value,owner)};var CSSPropertyOperations={createMarkupForStyles:function(styles,component){var serialized="";for(var styleName in styles)if(styles.hasOwnProperty(styleName)){var styleValue=styles[styleName];"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV&&warnValidStyle(styleName,styleValue,component),null!=styleValue&&(serialized+=processStyleName(styleName)+":",serialized+=dangerousStyleValue(styleName,styleValue,component)+";")}return serialized||null},setValueForStyles:function(node,styles,component){"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV&&ReactInstrumentation.debugTool.onHostOperation({instanceID:component._debugID,type:"update styles",payload:styles});var style=node.style;for(var styleName in styles)if(styles.hasOwnProperty(styleName)){"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV&&warnValidStyle(styleName,styles[styleName],component);var styleValue=dangerousStyleValue(styleName,styles[styleName],component);if("float"!==styleName&&"cssFloat"!==styleName||(styleName=styleFloatAccessor),styleValue)style[styleName]=styleValue;else{var expansion=hasShorthandPropertyBug&&CSSProperty.shorthandPropertyExpansions[styleName];if(expansion)for(var individualStyleName in expansion)style[individualStyleName]="";else style[styleName]=""}}}};module.exports=CSSPropertyOperations},function(module,exports,__webpack_require__){"use strict";function shouldUseChangeEvent(elem){var nodeName=elem.nodeName&&elem.nodeName.toLowerCase();return"select"===nodeName||"input"===nodeName&&"file"===elem.type}function manualDispatchChangeEvent(nativeEvent){var event=SyntheticEvent.getPooled(eventTypes.change,activeElementInst,nativeEvent,getEventTarget(nativeEvent));EventPropagators.accumulateTwoPhaseDispatches(event),ReactUpdates.batchedUpdates(runEventInBatch,event)}function runEventInBatch(event){EventPluginHub.enqueueEvents(event),EventPluginHub.processEventQueue(!1)}function startWatchingForChangeEventIE8(target,targetInst){activeElement=target,activeElementInst=targetInst,activeElement.attachEvent("onchange",manualDispatchChangeEvent)}function stopWatchingForChangeEventIE8(){activeElement&&(activeElement.detachEvent("onchange",manualDispatchChangeEvent),activeElement=null,activeElementInst=null)}function getTargetInstForChangeEvent(topLevelType,targetInst){if("topChange"===topLevelType)return targetInst}function handleEventsForChangeEventIE8(topLevelType,target,targetInst){"topFocus"===topLevelType?(stopWatchingForChangeEventIE8(),startWatchingForChangeEventIE8(target,targetInst)):"topBlur"===topLevelType&&stopWatchingForChangeEventIE8()}function startWatchingForValueChange(target,targetInst){activeElement=target,activeElementInst=targetInst,activeElementValue=target.value,activeElementValueProp=Object.getOwnPropertyDescriptor(target.constructor.prototype,"value"),Object.defineProperty(activeElement,"value",newValueProp),activeElement.attachEvent?activeElement.attachEvent("onpropertychange",handlePropertyChange):activeElement.addEventListener("propertychange",handlePropertyChange,!1)}function stopWatchingForValueChange(){activeElement&&(delete activeElement.value,activeElement.detachEvent?activeElement.detachEvent("onpropertychange",handlePropertyChange):activeElement.removeEventListener("propertychange",handlePropertyChange,!1),activeElement=null,activeElementInst=null,activeElementValue=null,activeElementValueProp=null)}function handlePropertyChange(nativeEvent){if("value"===nativeEvent.propertyName){var value=nativeEvent.srcElement.value;value!==activeElementValue&&(activeElementValue=value,manualDispatchChangeEvent(nativeEvent))}}function getTargetInstForInputEvent(topLevelType,targetInst){if("topInput"===topLevelType)return targetInst}function handleEventsForInputEventIE(topLevelType,target,targetInst){"topFocus"===topLevelType?(stopWatchingForValueChange(),startWatchingForValueChange(target,targetInst)):"topBlur"===topLevelType&&stopWatchingForValueChange()}function getTargetInstForInputEventIE(topLevelType,targetInst){if(("topSelectionChange"===topLevelType||"topKeyUp"===topLevelType||"topKeyDown"===topLevelType)&&activeElement&&activeElement.value!==activeElementValue)return activeElementValue=activeElement.value,activeElementInst}function shouldUseClickEvent(elem){return elem.nodeName&&"input"===elem.nodeName.toLowerCase()&&("checkbox"===elem.type||"radio"===elem.type)}function getTargetInstForClickEvent(topLevelType,targetInst){if("topClick"===topLevelType)return targetInst}var EventPluginHub=__webpack_require__(59),EventPropagators=__webpack_require__(60),ExecutionEnvironment=__webpack_require__(7),ReactDOMComponentTree=__webpack_require__(5),ReactUpdates=__webpack_require__(13),SyntheticEvent=__webpack_require__(15),getEventTarget=__webpack_require__(132),isEventSupported=__webpack_require__(133),isTextInputElement=__webpack_require__(263),eventTypes={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:["topBlur","topChange","topClick","topFocus","topInput","topKeyDown","topKeyUp","topSelectionChange"]}},activeElement=null,activeElementInst=null,activeElementValue=null,activeElementValueProp=null,doesChangeEventBubble=!1;ExecutionEnvironment.canUseDOM&&(doesChangeEventBubble=isEventSupported("change")&&(!document.documentMode||document.documentMode>8));var isInputEventSupported=!1;ExecutionEnvironment.canUseDOM&&(isInputEventSupported=isEventSupported("input")&&(!document.documentMode||document.documentMode>11));var newValueProp={get:function(){return activeElementValueProp.get.call(this)},set:function(val){activeElementValue=""+val,activeElementValueProp.set.call(this,val)}},ChangeEventPlugin={eventTypes:eventTypes,extractEvents:function(topLevelType,targetInst,nativeEvent,nativeEventTarget){var getTargetInstFunc,handleEventFunc,targetNode=targetInst?ReactDOMComponentTree.getNodeFromInstance(targetInst):window;if(shouldUseChangeEvent(targetNode)?doesChangeEventBubble?getTargetInstFunc=getTargetInstForChangeEvent:handleEventFunc=handleEventsForChangeEventIE8:isTextInputElement(targetNode)?isInputEventSupported?getTargetInstFunc=getTargetInstForInputEvent:(getTargetInstFunc=getTargetInstForInputEventIE,handleEventFunc=handleEventsForInputEventIE):shouldUseClickEvent(targetNode)&&(getTargetInstFunc=getTargetInstForClickEvent),getTargetInstFunc){var inst=getTargetInstFunc(topLevelType,targetInst);if(inst){var event=SyntheticEvent.getPooled(eventTypes.change,inst,nativeEvent,nativeEventTarget);return event.type="change",EventPropagators.accumulateTwoPhaseDispatches(event),event}}handleEventFunc&&handleEventFunc(topLevelType,targetNode,targetInst)}};module.exports=ChangeEventPlugin},function(module,exports,__webpack_require__){"use strict";var _prodInvariant=__webpack_require__(4),DOMLazyTree=__webpack_require__(46),ExecutionEnvironment=__webpack_require__(7),createNodesFromMarkup=__webpack_require__(400),emptyFunction=__webpack_require__(10),invariant=__webpack_require__(1),Danger={dangerouslyReplaceNodeWithMarkup:function(oldChild,markup){if(ExecutionEnvironment.canUseDOM?void 0:"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?invariant(!1,"dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a worker thread. Make sure `window` and `document` are available globally before requiring React when unit testing or use ReactDOMServer.renderToString() for server rendering."):_prodInvariant("56"),markup?void 0:"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?invariant(!1,"dangerouslyReplaceNodeWithMarkup(...): Missing markup."):_prodInvariant("57"),"HTML"===oldChild.nodeName?"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?invariant(!1,"dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the node. This is because browser quirks make this unreliable and/or slow. If you want to render to the root you must use server rendering. See ReactDOMServer.renderToString()."):_prodInvariant("58"):void 0,"string"==typeof markup){var newChild=createNodesFromMarkup(markup,emptyFunction)[0];oldChild.parentNode.replaceChild(newChild,oldChild)}else DOMLazyTree.replaceChildWithTree(oldChild,markup)}};module.exports=Danger},function(module,exports){"use strict";var DefaultEventPluginOrder=["ResponderEventPlugin","SimpleEventPlugin","TapEventPlugin","EnterLeaveEventPlugin","ChangeEventPlugin","SelectEventPlugin","BeforeInputEventPlugin"];module.exports=DefaultEventPluginOrder},function(module,exports,__webpack_require__){"use strict";var EventPropagators=__webpack_require__(60),ReactDOMComponentTree=__webpack_require__(5),SyntheticMouseEvent=__webpack_require__(76),eventTypes={mouseEnter:{registrationName:"onMouseEnter",dependencies:["topMouseOut","topMouseOver"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["topMouseOut","topMouseOver"]}},EnterLeaveEventPlugin={eventTypes:eventTypes,extractEvents:function(topLevelType,targetInst,nativeEvent,nativeEventTarget){if("topMouseOver"===topLevelType&&(nativeEvent.relatedTarget||nativeEvent.fromElement))return null;if("topMouseOut"!==topLevelType&&"topMouseOver"!==topLevelType)return null;var win;if(nativeEventTarget.window===nativeEventTarget)win=nativeEventTarget;else{var doc=nativeEventTarget.ownerDocument;win=doc?doc.defaultView||doc.parentWindow:window}var from,to;if("topMouseOut"===topLevelType){from=targetInst;var related=nativeEvent.relatedTarget||nativeEvent.toElement;to=related?ReactDOMComponentTree.getClosestInstanceFromNode(related):null}else from=null,to=targetInst;if(from===to)return null;var fromNode=null==from?win:ReactDOMComponentTree.getNodeFromInstance(from),toNode=null==to?win:ReactDOMComponentTree.getNodeFromInstance(to),leave=SyntheticMouseEvent.getPooled(eventTypes.mouseLeave,from,nativeEvent,nativeEventTarget);leave.type="mouseleave",leave.target=fromNode,leave.relatedTarget=toNode;var enter=SyntheticMouseEvent.getPooled(eventTypes.mouseEnter,to,nativeEvent,nativeEventTarget);return enter.type="mouseenter",enter.target=toNode,enter.relatedTarget=fromNode,EventPropagators.accumulateEnterLeaveDispatches(leave,enter,from,to),[leave,enter]}};module.exports=EnterLeaveEventPlugin},function(module,exports,__webpack_require__){"use strict";function FallbackCompositionState(root){this._root=root,this._startText=this.getText(),this._fallbackText=null}var _assign=__webpack_require__(6),PooledClass=__webpack_require__(25),getTextContentAccessor=__webpack_require__(261);_assign(FallbackCompositionState.prototype,{destructor:function(){this._root=null,this._startText=null,this._fallbackText=null},getText:function(){return"value"in this._root?this._root.value:this._root[getTextContentAccessor()]},getData:function(){if(this._fallbackText)return this._fallbackText;var start,end,startValue=this._startText,startLength=startValue.length,endValue=this.getText(),endLength=endValue.length;for(start=0;start1?1-end:void 0;return this._fallbackText=endValue.slice(start,sliceTail),this._fallbackText}}),PooledClass.addPoolingTo(FallbackCompositionState),module.exports=FallbackCompositionState},function(module,exports,__webpack_require__){"use strict";var DOMProperty=__webpack_require__(19),MUST_USE_PROPERTY=DOMProperty.injection.MUST_USE_PROPERTY,HAS_BOOLEAN_VALUE=DOMProperty.injection.HAS_BOOLEAN_VALUE,HAS_NUMERIC_VALUE=DOMProperty.injection.HAS_NUMERIC_VALUE,HAS_POSITIVE_NUMERIC_VALUE=DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE,HAS_OVERLOADED_BOOLEAN_VALUE=DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE,HTMLDOMPropertyConfig={isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+DOMProperty.ATTRIBUTE_NAME_CHAR+"]*$")),Properties:{accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:HAS_BOOLEAN_VALUE,allowTransparency:0,alt:0,as:0,async:HAS_BOOLEAN_VALUE,autoComplete:0,autoPlay:HAS_BOOLEAN_VALUE,capture:HAS_BOOLEAN_VALUE,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:MUST_USE_PROPERTY|HAS_BOOLEAN_VALUE,cite:0,classID:0,className:0,cols:HAS_POSITIVE_NUMERIC_VALUE,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:HAS_BOOLEAN_VALUE,coords:0,crossOrigin:0,data:0,dateTime:0,default:HAS_BOOLEAN_VALUE,defer:HAS_BOOLEAN_VALUE,dir:0,disabled:HAS_BOOLEAN_VALUE,download:HAS_OVERLOADED_BOOLEAN_VALUE,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:HAS_BOOLEAN_VALUE,formTarget:0,frameBorder:0,headers:0,height:0,hidden:HAS_BOOLEAN_VALUE,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:HAS_BOOLEAN_VALUE,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:MUST_USE_PROPERTY|HAS_BOOLEAN_VALUE,muted:MUST_USE_PROPERTY|HAS_BOOLEAN_VALUE,name:0,nonce:0,noValidate:HAS_BOOLEAN_VALUE,open:HAS_BOOLEAN_VALUE,optimum:0,pattern:0,placeholder:0,playsInline:HAS_BOOLEAN_VALUE,poster:0,preload:0,profile:0,radioGroup:0,readOnly:HAS_BOOLEAN_VALUE,referrerPolicy:0,rel:0,required:HAS_BOOLEAN_VALUE,reversed:HAS_BOOLEAN_VALUE,role:0,rows:HAS_POSITIVE_NUMERIC_VALUE,rowSpan:HAS_NUMERIC_VALUE,sandbox:0,scope:0,scoped:HAS_BOOLEAN_VALUE,scrolling:0,seamless:HAS_BOOLEAN_VALUE,selected:MUST_USE_PROPERTY|HAS_BOOLEAN_VALUE,shape:0,size:HAS_POSITIVE_NUMERIC_VALUE,sizes:0,span:HAS_POSITIVE_NUMERIC_VALUE,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:HAS_NUMERIC_VALUE,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:HAS_BOOLEAN_VALUE,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{}};module.exports=HTMLDOMPropertyConfig},function(module,exports,__webpack_require__){(function(process){"use strict";function instantiateChild(childInstances,child,name,selfDebugID){var keyUnique=void 0===childInstances[name];"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV&&(ReactComponentTreeHook||(ReactComponentTreeHook=__webpack_require__(8)),keyUnique||("production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?warning(!1,"flattenChildren(...): Encountered two children with the same key, `%s`. Child keys must be unique; when two children share a key, only the first child will be used.%s",KeyEscapeUtils.unescape(name),ReactComponentTreeHook.getStackAddendumByID(selfDebugID)):void 0)),null!=child&&keyUnique&&(childInstances[name]=instantiateReactComponent(child,!0))}var ReactComponentTreeHook,ReactReconciler=__webpack_require__(47),instantiateReactComponent=__webpack_require__(262),KeyEscapeUtils=__webpack_require__(124),shouldUpdateReactComponent=__webpack_require__(134),traverseAllChildren=__webpack_require__(265),warning=__webpack_require__(2);"undefined"!=typeof process&&"test"==={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV&&(ReactComponentTreeHook=__webpack_require__(8));var ReactChildReconciler={instantiateChildren:function(nestedChildNodes,transaction,context,selfDebugID){if(null==nestedChildNodes)return null;var childInstances={};return"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?traverseAllChildren(nestedChildNodes,function(childInsts,child,name){return instantiateChild(childInsts,child,name,selfDebugID)},childInstances):traverseAllChildren(nestedChildNodes,instantiateChild,childInstances),childInstances},updateChildren:function(prevChildren,nextChildren,mountImages,removedNodes,transaction,hostParent,hostContainerInfo,context,selfDebugID){if(nextChildren||prevChildren){var name,prevChild;for(name in nextChildren)if(nextChildren.hasOwnProperty(name)){prevChild=prevChildren&&prevChildren[name];var prevElement=prevChild&&prevChild._currentElement,nextElement=nextChildren[name];if(null!=prevChild&&shouldUpdateReactComponent(prevElement,nextElement))ReactReconciler.receiveComponent(prevChild,nextElement,transaction,context),nextChildren[name]=prevChild;else{prevChild&&(removedNodes[name]=ReactReconciler.getHostNode(prevChild),ReactReconciler.unmountComponent(prevChild,!1));var nextChildInstance=instantiateReactComponent(nextElement,!0);nextChildren[name]=nextChildInstance;var nextChildMountImage=ReactReconciler.mountComponent(nextChildInstance,transaction,hostParent,hostContainerInfo,context,selfDebugID);mountImages.push(nextChildMountImage)}}for(name in prevChildren)!prevChildren.hasOwnProperty(name)||nextChildren&&nextChildren.hasOwnProperty(name)||(prevChild=prevChildren[name],removedNodes[name]=ReactReconciler.getHostNode(prevChild),ReactReconciler.unmountComponent(prevChild,!1))}},unmountChildren:function(renderedChildren,safely){for(var name in renderedChildren)if(renderedChildren.hasOwnProperty(name)){var renderedChild=renderedChildren[name];ReactReconciler.unmountComponent(renderedChild,safely)}}};module.exports=ReactChildReconciler}).call(exports,__webpack_require__(45))},function(module,exports,__webpack_require__){"use strict";var DOMChildrenOperations=__webpack_require__(121),ReactDOMIDOperations=__webpack_require__(468),ReactComponentBrowserEnvironment={processChildrenUpdates:ReactDOMIDOperations.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkup:DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup};module.exports=ReactComponentBrowserEnvironment},function(module,exports,__webpack_require__){"use strict";function StatelessComponent(Component){}function warnIfInvalidElement(Component,element){"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV&&("production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?warning(null===element||element===!1||React.isValidElement(element),"%s(...): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.",Component.displayName||Component.name||"Component"):void 0,"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?warning(!Component.childContextTypes,"%s(...): childContextTypes cannot be defined on a functional component.",Component.displayName||Component.name||"Component"):void 0)}function shouldConstruct(Component){return!(!Component.prototype||!Component.prototype.isReactComponent)}function isPureComponent(Component){return!(!Component.prototype||!Component.prototype.isPureReactComponent)}function measureLifeCyclePerf(fn,debugID,timerType){if(0===debugID)return fn();ReactInstrumentation.debugTool.onBeginLifeCycleTimer(debugID,timerType);try{return fn()}finally{ReactInstrumentation.debugTool.onEndLifeCycleTimer(debugID,timerType)}}var _prodInvariant=__webpack_require__(4),_assign=__webpack_require__(6),React=__webpack_require__(50),ReactComponentEnvironment=__webpack_require__(126),ReactCurrentOwner=__webpack_require__(14),ReactErrorUtils=__webpack_require__(127),ReactInstanceMap=__webpack_require__(61),ReactInstrumentation=__webpack_require__(9),ReactNodeTypes=__webpack_require__(255),ReactReconciler=__webpack_require__(47);if("production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV)var checkReactTypeSpec=__webpack_require__(510);var emptyObject=__webpack_require__(57),invariant=__webpack_require__(1),shallowEqual=__webpack_require__(114),shouldUpdateReactComponent=__webpack_require__(134),warning=__webpack_require__(2),CompositeTypes={ImpureClass:0,PureClass:1,StatelessFunctional:2};StatelessComponent.prototype.render=function(){var Component=ReactInstanceMap.get(this)._currentElement.type,element=Component(this.props,this.context,this.updater);return warnIfInvalidElement(Component,element),element};var nextMountID=1,ReactCompositeComponent={construct:function(element){this._currentElement=element,this._rootNodeID=0,this._compositeType=null,this._instance=null,this._hostParent=null,this._hostContainerInfo=null,this._updateBatchNumber=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedNodeType=null,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._topLevelWrapper=null,this._pendingCallbacks=null,this._calledComponentWillUnmount=!1,"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV&&(this._warnedAboutRefsInRender=!1)},mountComponent:function(transaction,hostParent,hostContainerInfo,context){var _this=this;this._context=context,this._mountOrder=nextMountID++,this._hostParent=hostParent,this._hostContainerInfo=hostContainerInfo;var renderedElement,publicProps=this._currentElement.props,publicContext=this._processContext(context),Component=this._currentElement.type,updateQueue=transaction.getUpdateQueue(),doConstruct=shouldConstruct(Component),inst=this._constructComponent(doConstruct,publicProps,publicContext,updateQueue);if(doConstruct||null!=inst&&null!=inst.render?isPureComponent(Component)?this._compositeType=CompositeTypes.PureClass:this._compositeType=CompositeTypes.ImpureClass:(renderedElement=inst,warnIfInvalidElement(Component,renderedElement),null===inst||inst===!1||React.isValidElement(inst)?void 0:"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?invariant(!1,"%s(...): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.",Component.displayName||Component.name||"Component"):_prodInvariant("105",Component.displayName||Component.name||"Component"),inst=new StatelessComponent(Component),this._compositeType=CompositeTypes.StatelessFunctional),"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV){null==inst.render&&("production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?warning(!1,"%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",Component.displayName||Component.name||"Component"):void 0);var propsMutated=inst.props!==publicProps,componentName=Component.displayName||Component.name||"Component";"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?warning(void 0===inst.props||!propsMutated,"%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",componentName,componentName):void 0}inst.props=publicProps,inst.context=publicContext,inst.refs=emptyObject,inst.updater=updateQueue,this._instance=inst,ReactInstanceMap.set(inst,this),"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV&&("production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?warning(!inst.getInitialState||inst.getInitialState.isReactClassApproved||inst.state,"getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",this.getName()||"a component"):void 0,"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?warning(!inst.getDefaultProps||inst.getDefaultProps.isReactClassApproved,"getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",this.getName()||"a component"):void 0,"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?warning(!inst.propTypes,"propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",this.getName()||"a component"):void 0,"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?warning(!inst.contextTypes,"contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",this.getName()||"a component"):void 0,"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?warning("function"!=typeof inst.componentShouldUpdate,"%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",this.getName()||"A component"):void 0,"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?warning("function"!=typeof inst.componentDidUnmount,"%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",this.getName()||"A component"):void 0,"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?warning("function"!=typeof inst.componentWillRecieveProps,"%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",this.getName()||"A component"):void 0);var initialState=inst.state;void 0===initialState&&(inst.state=initialState=null),"object"!=typeof initialState||Array.isArray(initialState)?"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?invariant(!1,"%s.state: must be set to an object or null",this.getName()||"ReactCompositeComponent"):_prodInvariant("106",this.getName()||"ReactCompositeComponent"):void 0,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1;var markup;return markup=inst.unstable_handleError?this.performInitialMountWithErrorHandling(renderedElement,hostParent,hostContainerInfo,transaction,context):this.performInitialMount(renderedElement,hostParent,hostContainerInfo,transaction,context),inst.componentDidMount&&("production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?transaction.getReactMountReady().enqueue(function(){measureLifeCyclePerf(function(){return inst.componentDidMount()},_this._debugID,"componentDidMount")}):transaction.getReactMountReady().enqueue(inst.componentDidMount,inst)),markup},_constructComponent:function(doConstruct,publicProps,publicContext,updateQueue){if("production"==={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV)return this._constructComponentWithoutOwner(doConstruct,publicProps,publicContext,updateQueue);ReactCurrentOwner.current=this;try{return this._constructComponentWithoutOwner(doConstruct,publicProps,publicContext,updateQueue)}finally{ReactCurrentOwner.current=null}},_constructComponentWithoutOwner:function(doConstruct,publicProps,publicContext,updateQueue){var Component=this._currentElement.type;return doConstruct?"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?measureLifeCyclePerf(function(){return new Component(publicProps,publicContext,updateQueue)},this._debugID,"ctor"):new Component(publicProps,publicContext,updateQueue):"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?measureLifeCyclePerf(function(){return Component(publicProps,publicContext,updateQueue)},this._debugID,"render"):Component(publicProps,publicContext,updateQueue)},performInitialMountWithErrorHandling:function(renderedElement,hostParent,hostContainerInfo,transaction,context){var markup,checkpoint=transaction.checkpoint();try{markup=this.performInitialMount(renderedElement,hostParent,hostContainerInfo,transaction,context)}catch(e){transaction.rollback(checkpoint),this._instance.unstable_handleError(e),this._pendingStateQueue&&(this._instance.state=this._processPendingState(this._instance.props,this._instance.context)),checkpoint=transaction.checkpoint(),this._renderedComponent.unmountComponent(!0),transaction.rollback(checkpoint),markup=this.performInitialMount(renderedElement,hostParent,hostContainerInfo,transaction,context)}return markup},performInitialMount:function(renderedElement,hostParent,hostContainerInfo,transaction,context){var inst=this._instance,debugID=0;"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV&&(debugID=this._debugID),inst.componentWillMount&&("production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?measureLifeCyclePerf(function(){return inst.componentWillMount()},debugID,"componentWillMount"):inst.componentWillMount(),this._pendingStateQueue&&(inst.state=this._processPendingState(inst.props,inst.context))),void 0===renderedElement&&(renderedElement=this._renderValidatedComponent());var nodeType=ReactNodeTypes.getType(renderedElement);this._renderedNodeType=nodeType;var child=this._instantiateReactComponent(renderedElement,nodeType!==ReactNodeTypes.EMPTY);this._renderedComponent=child;var markup=ReactReconciler.mountComponent(child,transaction,hostParent,hostContainerInfo,this._processChildContext(context),debugID);if("production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV&&0!==debugID){var childDebugIDs=0!==child._debugID?[child._debugID]:[];ReactInstrumentation.debugTool.onSetChildren(debugID,childDebugIDs)}return markup},getHostNode:function(){return ReactReconciler.getHostNode(this._renderedComponent)},unmountComponent:function(safely){if(this._renderedComponent){var inst=this._instance;if(inst.componentWillUnmount&&!inst._calledComponentWillUnmount)if(inst._calledComponentWillUnmount=!0,safely){var name=this.getName()+".componentWillUnmount()";ReactErrorUtils.invokeGuardedCallback(name,inst.componentWillUnmount.bind(inst))}else"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?measureLifeCyclePerf(function(){return inst.componentWillUnmount()},this._debugID,"componentWillUnmount"):inst.componentWillUnmount();this._renderedComponent&&(ReactReconciler.unmountComponent(this._renderedComponent,safely),this._renderedNodeType=null,this._renderedComponent=null,this._instance=null),this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._pendingCallbacks=null,this._pendingElement=null,this._context=null,this._rootNodeID=0, -this._topLevelWrapper=null,ReactInstanceMap.remove(inst)}},_maskContext:function(context){var Component=this._currentElement.type,contextTypes=Component.contextTypes;if(!contextTypes)return emptyObject;var maskedContext={};for(var contextName in contextTypes)maskedContext[contextName]=context[contextName];return maskedContext},_processContext:function(context){var maskedContext=this._maskContext(context);if("production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV){var Component=this._currentElement.type;Component.contextTypes&&this._checkContextTypes(Component.contextTypes,maskedContext,"context")}return maskedContext},_processChildContext:function(currentContext){var childContext,Component=this._currentElement.type,inst=this._instance;if(inst.getChildContext)if("production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV){ReactInstrumentation.debugTool.onBeginProcessingChildContext();try{childContext=inst.getChildContext()}finally{ReactInstrumentation.debugTool.onEndProcessingChildContext()}}else childContext=inst.getChildContext();if(childContext){"object"!=typeof Component.childContextTypes?"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?invariant(!1,"%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",this.getName()||"ReactCompositeComponent"):_prodInvariant("107",this.getName()||"ReactCompositeComponent"):void 0,"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV&&this._checkContextTypes(Component.childContextTypes,childContext,"childContext");for(var name in childContext)name in Component.childContextTypes?void 0:"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?invariant(!1,'%s.getChildContext(): key "%s" is not defined in childContextTypes.',this.getName()||"ReactCompositeComponent",name):_prodInvariant("108",this.getName()||"ReactCompositeComponent",name);return _assign({},currentContext,childContext)}return currentContext},_checkContextTypes:function(typeSpecs,values,location){"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV&&checkReactTypeSpec(typeSpecs,values,location,this.getName(),null,this._debugID)},receiveComponent:function(nextElement,transaction,nextContext){var prevElement=this._currentElement,prevContext=this._context;this._pendingElement=null,this.updateComponent(transaction,prevElement,nextElement,prevContext,nextContext)},performUpdateIfNecessary:function(transaction){null!=this._pendingElement?ReactReconciler.receiveComponent(this,this._pendingElement,transaction,this._context):null!==this._pendingStateQueue||this._pendingForceUpdate?this.updateComponent(transaction,this._currentElement,this._currentElement,this._context,this._context):this._updateBatchNumber=null},updateComponent:function(transaction,prevParentElement,nextParentElement,prevUnmaskedContext,nextUnmaskedContext){var inst=this._instance;null==inst?"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?invariant(!1,"Attempted to update component `%s` that has already been unmounted (or failed to mount).",this.getName()||"ReactCompositeComponent"):_prodInvariant("136",this.getName()||"ReactCompositeComponent"):void 0;var nextContext,willReceive=!1;this._context===nextUnmaskedContext?nextContext=inst.context:(nextContext=this._processContext(nextUnmaskedContext),willReceive=!0);var prevProps=prevParentElement.props,nextProps=nextParentElement.props;prevParentElement!==nextParentElement&&(willReceive=!0),willReceive&&inst.componentWillReceiveProps&&("production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?measureLifeCyclePerf(function(){return inst.componentWillReceiveProps(nextProps,nextContext)},this._debugID,"componentWillReceiveProps"):inst.componentWillReceiveProps(nextProps,nextContext));var nextState=this._processPendingState(nextProps,nextContext),shouldUpdate=!0;this._pendingForceUpdate||(inst.shouldComponentUpdate?shouldUpdate="production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?measureLifeCyclePerf(function(){return inst.shouldComponentUpdate(nextProps,nextState,nextContext)},this._debugID,"shouldComponentUpdate"):inst.shouldComponentUpdate(nextProps,nextState,nextContext):this._compositeType===CompositeTypes.PureClass&&(shouldUpdate=!shallowEqual(prevProps,nextProps)||!shallowEqual(inst.state,nextState))),"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV&&("production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?warning(void 0!==shouldUpdate,"%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",this.getName()||"ReactCompositeComponent"):void 0),this._updateBatchNumber=null,shouldUpdate?(this._pendingForceUpdate=!1,this._performComponentUpdate(nextParentElement,nextProps,nextState,nextContext,transaction,nextUnmaskedContext)):(this._currentElement=nextParentElement,this._context=nextUnmaskedContext,inst.props=nextProps,inst.state=nextState,inst.context=nextContext)},_processPendingState:function(props,context){var inst=this._instance,queue=this._pendingStateQueue,replace=this._pendingReplaceState;if(this._pendingReplaceState=!1,this._pendingStateQueue=null,!queue)return inst.state;if(replace&&1===queue.length)return queue[0];for(var nextState=_assign({},replace?queue[0]:inst.state),i=replace?1:0;i-1&&navigator.userAgent.indexOf("Edge")===-1||navigator.userAgent.indexOf("Firefox")>-1)){var showFileUrlMessage=window.location.protocol.indexOf("http")===-1&&navigator.userAgent.indexOf("Firefox")===-1;console.debug("Download the React DevTools "+(showFileUrlMessage?"and use an HTTP server (instead of a file: URL) ":"")+"for a better development experience: https://fb.me/react-devtools")}var testFunc=function(){};"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?warning((testFunc.name||testFunc.toString()).indexOf("testFn")!==-1,"It looks like you're using a minified copy of the development build of React. When deploying React apps to production, make sure to use the production build which skips development warnings and is faster. See https://fb.me/react-minification for more details."):void 0;var ieCompatibilityMode=document.documentMode&&document.documentMode<8;"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?warning(!ieCompatibilityMode,'Internet Explorer is running in compatibility mode; please add the following tag to your HTML to prevent this from happening: '):void 0;for(var expectedFeatures=[Array.isArray,Array.prototype.every,Array.prototype.forEach,Array.prototype.indexOf,Array.prototype.map,Date.now,Function.prototype.bind,Object.keys,String.prototype.trim],i=0;i",friendlyStringify(style1),friendlyStringify(style2)):void 0)}}function assertValidProps(component,props){props&&(voidElementTags[component._tag]&&(null!=props.children||null!=props.dangerouslySetInnerHTML?"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?invariant(!1,"%s is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.%s",component._tag,component._currentElement._owner?" Check the render method of "+component._currentElement._owner.getName()+".":""):_prodInvariant("137",component._tag,component._currentElement._owner?" Check the render method of "+component._currentElement._owner.getName()+".":""):void 0),null!=props.dangerouslySetInnerHTML&&(null!=props.children?"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?invariant(!1,"Can only set one of `children` or `props.dangerouslySetInnerHTML`."):_prodInvariant("60"):void 0,"object"==typeof props.dangerouslySetInnerHTML&&HTML in props.dangerouslySetInnerHTML?void 0:"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?invariant(!1,"`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information."):_prodInvariant("61")),"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV&&("production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?warning(null==props.innerHTML,"Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."):void 0,"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?warning(props.suppressContentEditableWarning||!props.contentEditable||null==props.children,"A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."):void 0,"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?warning(null==props.onFocusIn&&null==props.onFocusOut,"React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."):void 0),null!=props.style&&"object"!=typeof props.style?"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?invariant(!1,"The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.%s",getDeclarationErrorAddendum(component)):_prodInvariant("62",getDeclarationErrorAddendum(component)):void 0)}function enqueuePutListener(inst,registrationName,listener,transaction){if(!(transaction instanceof ReactServerRenderingTransaction)){"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV&&("production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?warning("onScroll"!==registrationName||isEventSupported("scroll",!0),"This browser doesn't support the `onScroll` event"):void 0);var containerInfo=inst._hostContainerInfo,isDocumentFragment=containerInfo._node&&containerInfo._node.nodeType===DOC_FRAGMENT_TYPE,doc=isDocumentFragment?containerInfo._node:containerInfo._ownerDocument;listenTo(registrationName,doc),transaction.getReactMountReady().enqueue(putListener,{inst:inst,registrationName:registrationName,listener:listener})}}function putListener(){var listenerToPut=this;EventPluginHub.putListener(listenerToPut.inst,listenerToPut.registrationName,listenerToPut.listener)}function inputPostMount(){var inst=this;ReactDOMInput.postMountWrapper(inst)}function textareaPostMount(){var inst=this;ReactDOMTextarea.postMountWrapper(inst)}function optionPostMount(){var inst=this;ReactDOMOption.postMountWrapper(inst)}function trapBubbledEventsLocal(){var inst=this;inst._rootNodeID?void 0:"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?invariant(!1,"Must be mounted to trap events"):_prodInvariant("63");var node=getNode(inst);switch(node?void 0:"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?invariant(!1,"trapBubbledEvent(...): Requires node to be rendered."):_prodInvariant("64"),inst._tag){case"iframe":case"object":inst._wrapperState.listeners=[ReactBrowserEventEmitter.trapBubbledEvent("topLoad","load",node)];break;case"video":case"audio":inst._wrapperState.listeners=[];for(var event in mediaEvents)mediaEvents.hasOwnProperty(event)&&inst._wrapperState.listeners.push(ReactBrowserEventEmitter.trapBubbledEvent(event,mediaEvents[event],node));break;case"source":inst._wrapperState.listeners=[ReactBrowserEventEmitter.trapBubbledEvent("topError","error",node)];break;case"img":inst._wrapperState.listeners=[ReactBrowserEventEmitter.trapBubbledEvent("topError","error",node),ReactBrowserEventEmitter.trapBubbledEvent("topLoad","load",node)];break;case"form":inst._wrapperState.listeners=[ReactBrowserEventEmitter.trapBubbledEvent("topReset","reset",node),ReactBrowserEventEmitter.trapBubbledEvent("topSubmit","submit",node)];break;case"input":case"select":case"textarea":inst._wrapperState.listeners=[ReactBrowserEventEmitter.trapBubbledEvent("topInvalid","invalid",node)]}}function postUpdateSelectWrapper(){ReactDOMSelect.postUpdateWrapper(this)}function validateDangerousTag(tag){hasOwnProperty.call(validatedTagCache,tag)||(VALID_TAG_REGEX.test(tag)?void 0:"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?invariant(!1,"Invalid tag: %s",tag):_prodInvariant("65",tag),validatedTagCache[tag]=!0)}function isCustomComponent(tagName,props){return tagName.indexOf("-")>=0||null!=props.is}function ReactDOMComponent(element){var tag=element.type;validateDangerousTag(tag),this._currentElement=element,this._tag=tag.toLowerCase(),this._namespaceURI=null,this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0,"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV&&(this._ancestorInfo=null,setAndValidateContentChildDev.call(this,null))}var _prodInvariant=__webpack_require__(4),_assign=__webpack_require__(6),AutoFocusUtils=__webpack_require__(451),CSSPropertyOperations=__webpack_require__(453),DOMLazyTree=__webpack_require__(46),DOMNamespaces=__webpack_require__(122),DOMProperty=__webpack_require__(19),DOMPropertyOperations=__webpack_require__(247),EventPluginHub=__webpack_require__(59),EventPluginRegistry=__webpack_require__(74),ReactBrowserEventEmitter=__webpack_require__(75),ReactDOMComponentFlags=__webpack_require__(248),ReactDOMComponentTree=__webpack_require__(5),ReactDOMInput=__webpack_require__(469),ReactDOMOption=__webpack_require__(472),ReactDOMSelect=__webpack_require__(249),ReactDOMTextarea=__webpack_require__(475),ReactInstrumentation=__webpack_require__(9),ReactMultiChild=__webpack_require__(488),ReactServerRenderingTransaction=__webpack_require__(493),emptyFunction=__webpack_require__(10),escapeTextContentForBrowser=__webpack_require__(78),invariant=__webpack_require__(1),isEventSupported=__webpack_require__(133),shallowEqual=__webpack_require__(114),validateDOMNesting=__webpack_require__(135),warning=__webpack_require__(2),Flags=ReactDOMComponentFlags,deleteListener=EventPluginHub.deleteListener,getNode=ReactDOMComponentTree.getNodeFromInstance,listenTo=ReactBrowserEventEmitter.listenTo,registrationNameModules=EventPluginRegistry.registrationNameModules,CONTENT_TYPES={string:!0,number:!0},STYLE="style",HTML="__html",RESERVED_PROPS={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},DOC_FRAGMENT_TYPE=11,styleMutationWarning={},setAndValidateContentChildDev=emptyFunction;"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV&&(setAndValidateContentChildDev=function(content){var hasExistingContent=null!=this._contentDebugID,debugID=this._debugID,contentDebugID=-debugID;return null==content?(hasExistingContent&&ReactInstrumentation.debugTool.onUnmountComponent(this._contentDebugID),void(this._contentDebugID=null)):(validateDOMNesting(null,String(content),this,this._ancestorInfo),this._contentDebugID=contentDebugID,void(hasExistingContent?(ReactInstrumentation.debugTool.onBeforeUpdateComponent(contentDebugID,content),ReactInstrumentation.debugTool.onUpdateComponent(contentDebugID)):(ReactInstrumentation.debugTool.onBeforeMountComponent(contentDebugID,content,debugID),ReactInstrumentation.debugTool.onMountComponent(contentDebugID),ReactInstrumentation.debugTool.onSetChildren(debugID,[contentDebugID]))))});var mediaEvents={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},omittedCloseTags={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},newlineEatingTags={listing:!0,pre:!0,textarea:!0},voidElementTags=_assign({menuitem:!0},omittedCloseTags),VALID_TAG_REGEX=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,validatedTagCache={},hasOwnProperty={}.hasOwnProperty,globalIdCounter=1;ReactDOMComponent.displayName="ReactDOMComponent",ReactDOMComponent.Mixin={mountComponent:function(transaction,hostParent,hostContainerInfo,context){this._rootNodeID=globalIdCounter++,this._domID=hostContainerInfo._idCounter++,this._hostParent=hostParent,this._hostContainerInfo=hostContainerInfo;var props=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},transaction.getReactMountReady().enqueue(trapBubbledEventsLocal,this);break;case"input":ReactDOMInput.mountWrapper(this,props,hostParent),props=ReactDOMInput.getHostProps(this,props),transaction.getReactMountReady().enqueue(trapBubbledEventsLocal,this);break;case"option":ReactDOMOption.mountWrapper(this,props,hostParent),props=ReactDOMOption.getHostProps(this,props);break;case"select":ReactDOMSelect.mountWrapper(this,props,hostParent),props=ReactDOMSelect.getHostProps(this,props),transaction.getReactMountReady().enqueue(trapBubbledEventsLocal,this);break;case"textarea":ReactDOMTextarea.mountWrapper(this,props,hostParent),props=ReactDOMTextarea.getHostProps(this,props),transaction.getReactMountReady().enqueue(trapBubbledEventsLocal,this)}assertValidProps(this,props);var namespaceURI,parentTag;if(null!=hostParent?(namespaceURI=hostParent._namespaceURI,parentTag=hostParent._tag):hostContainerInfo._tag&&(namespaceURI=hostContainerInfo._namespaceURI,parentTag=hostContainerInfo._tag),(null==namespaceURI||namespaceURI===DOMNamespaces.svg&&"foreignobject"===parentTag)&&(namespaceURI=DOMNamespaces.html),namespaceURI===DOMNamespaces.html&&("svg"===this._tag?namespaceURI=DOMNamespaces.svg:"math"===this._tag&&(namespaceURI=DOMNamespaces.mathml)),this._namespaceURI=namespaceURI,"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV){var parentInfo;null!=hostParent?parentInfo=hostParent._ancestorInfo:hostContainerInfo._tag&&(parentInfo=hostContainerInfo._ancestorInfo),parentInfo&&validateDOMNesting(this._tag,null,this,parentInfo),this._ancestorInfo=validateDOMNesting.updatedAncestorInfo(parentInfo,this._tag,this)}var mountImage;if(transaction.useCreateElement){var el,ownerDocument=hostContainerInfo._ownerDocument;if(namespaceURI===DOMNamespaces.html)if("script"===this._tag){var div=ownerDocument.createElement("div"),type=this._currentElement.type;div.innerHTML="<"+type+">",el=div.removeChild(div.firstChild)}else el=props.is?ownerDocument.createElement(this._currentElement.type,props.is):ownerDocument.createElement(this._currentElement.type);else el=ownerDocument.createElementNS(namespaceURI,this._currentElement.type);ReactDOMComponentTree.precacheNode(this,el),this._flags|=Flags.hasCachedChildNodes,this._hostParent||DOMPropertyOperations.setAttributeForRoot(el),this._updateDOMProperties(null,props,transaction);var lazyTree=DOMLazyTree(el);this._createInitialChildren(transaction,props,context,lazyTree),mountImage=lazyTree}else{var tagOpen=this._createOpenTagMarkupAndPutListeners(transaction,props),tagContent=this._createContentMarkup(transaction,props,context);mountImage=!tagContent&&omittedCloseTags[this._tag]?tagOpen+"/>":tagOpen+">"+tagContent+""}switch(this._tag){case"input":transaction.getReactMountReady().enqueue(inputPostMount,this),props.autoFocus&&transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent,this);break;case"textarea":transaction.getReactMountReady().enqueue(textareaPostMount,this),props.autoFocus&&transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent,this);break;case"select":props.autoFocus&&transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent,this);break;case"button":props.autoFocus&&transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent,this);break;case"option":transaction.getReactMountReady().enqueue(optionPostMount,this)}return mountImage},_createOpenTagMarkupAndPutListeners:function(transaction,props){var ret="<"+this._currentElement.type;for(var propKey in props)if(props.hasOwnProperty(propKey)){var propValue=props[propKey];if(null!=propValue)if(registrationNameModules.hasOwnProperty(propKey))propValue&&enqueuePutListener(this,propKey,propValue,transaction);else{propKey===STYLE&&(propValue&&("production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV&&(this._previousStyle=propValue),propValue=this._previousStyleCopy=_assign({},props.style)),propValue=CSSPropertyOperations.createMarkupForStyles(propValue,this));var markup=null;null!=this._tag&&isCustomComponent(this._tag,props)?RESERVED_PROPS.hasOwnProperty(propKey)||(markup=DOMPropertyOperations.createMarkupForCustomAttribute(propKey,propValue)):markup=DOMPropertyOperations.createMarkupForProperty(propKey,propValue),markup&&(ret+=" "+markup)}}return transaction.renderToStaticMarkup?ret:(this._hostParent||(ret+=" "+DOMPropertyOperations.createMarkupForRoot()),ret+=" "+DOMPropertyOperations.createMarkupForID(this._domID))},_createContentMarkup:function(transaction,props,context){var ret="",innerHTML=props.dangerouslySetInnerHTML;if(null!=innerHTML)null!=innerHTML.__html&&(ret=innerHTML.__html);else{var contentToUse=CONTENT_TYPES[typeof props.children]?props.children:null,childrenToUse=null!=contentToUse?null:props.children;if(null!=contentToUse)ret=escapeTextContentForBrowser(contentToUse),"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV&&setAndValidateContentChildDev.call(this,contentToUse);else if(null!=childrenToUse){var mountImages=this.mountChildren(childrenToUse,transaction,context);ret=mountImages.join("")}}return newlineEatingTags[this._tag]&&"\n"===ret.charAt(0)?"\n"+ret:ret},_createInitialChildren:function(transaction,props,context,lazyTree){var innerHTML=props.dangerouslySetInnerHTML;if(null!=innerHTML)null!=innerHTML.__html&&DOMLazyTree.queueHTML(lazyTree,innerHTML.__html);else{var contentToUse=CONTENT_TYPES[typeof props.children]?props.children:null,childrenToUse=null!=contentToUse?null:props.children;if(null!=contentToUse)""!==contentToUse&&("production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV&&setAndValidateContentChildDev.call(this,contentToUse),DOMLazyTree.queueText(lazyTree,contentToUse));else if(null!=childrenToUse)for(var mountImages=this.mountChildren(childrenToUse,transaction,context),i=0;i tried to unmount. Because of cross-browser quirks it is impossible to unmount some top-level components (eg , , and ) reliably and efficiently. To fix this, have a single top-level component that never unmounts render these elements.",this._tag):_prodInvariant("66",this._tag)}this.unmountChildren(safely),ReactDOMComponentTree.uncacheNode(this),EventPluginHub.deleteAllListeners(this),this._rootNodeID=0,this._domID=0,this._wrapperState=null,"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV&&setAndValidateContentChildDev.call(this,null)},getPublicInstance:function(){return getNode(this)}},_assign(ReactDOMComponent.prototype,ReactDOMComponent.Mixin,ReactMultiChild.Mixin),module.exports=ReactDOMComponent},function(module,exports,__webpack_require__){"use strict";function ReactDOMContainerInfo(topLevelWrapper,node){var info={_topLevelWrapper:topLevelWrapper,_idCounter:1,_ownerDocument:node?node.nodeType===DOC_NODE_TYPE?node:node.ownerDocument:null,_node:node,_tag:node?node.nodeName.toLowerCase():null,_namespaceURI:node?node.namespaceURI:null};return"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV&&(info._ancestorInfo=node?validateDOMNesting.updatedAncestorInfo(null,info._tag,null):null),info}var validateDOMNesting=__webpack_require__(135),DOC_NODE_TYPE=9;module.exports=ReactDOMContainerInfo},function(module,exports,__webpack_require__){"use strict";var _assign=__webpack_require__(6),DOMLazyTree=__webpack_require__(46),ReactDOMComponentTree=__webpack_require__(5),ReactDOMEmptyComponent=function(instantiate){this._currentElement=null,this._hostNode=null,this._hostParent=null,this._hostContainerInfo=null,this._domID=0};_assign(ReactDOMEmptyComponent.prototype,{mountComponent:function(transaction,hostParent,hostContainerInfo,context){var domID=hostContainerInfo._idCounter++;this._domID=domID,this._hostParent=hostParent,this._hostContainerInfo=hostContainerInfo;var nodeValue=" react-empty: "+this._domID+" ";if(transaction.useCreateElement){var ownerDocument=hostContainerInfo._ownerDocument,node=ownerDocument.createComment(nodeValue);return ReactDOMComponentTree.precacheNode(this,node),DOMLazyTree(node)}return transaction.renderToStaticMarkup?"":""},receiveComponent:function(){},getHostNode:function(){return ReactDOMComponentTree.getNodeFromInstance(this)},unmountComponent:function(){ReactDOMComponentTree.uncacheNode(this)}}),module.exports=ReactDOMEmptyComponent},function(module,exports){"use strict";var ReactDOMFeatureFlags={useCreateElement:!0,useFiber:!1};module.exports=ReactDOMFeatureFlags},function(module,exports,__webpack_require__){"use strict";var DOMChildrenOperations=__webpack_require__(121),ReactDOMComponentTree=__webpack_require__(5),ReactDOMIDOperations={dangerouslyProcessChildrenUpdates:function(parentInst,updates){var node=ReactDOMComponentTree.getNodeFromInstance(parentInst);DOMChildrenOperations.processUpdates(node,updates)}};module.exports=ReactDOMIDOperations},function(module,exports,__webpack_require__){"use strict";function forceUpdateIfMounted(){this._rootNodeID&&ReactDOMInput.updateWrapper(this)}function isControlled(props){var usesChecked="checkbox"===props.type||"radio"===props.type;return usesChecked?null!=props.checked:null!=props.value}function _handleChange(event){var props=this._currentElement.props,returnValue=LinkedValueUtils.executeOnChange(props,event);ReactUpdates.asap(forceUpdateIfMounted,this);var name=props.name;if("radio"===props.type&&null!=name){for(var rootNode=ReactDOMComponentTree.getNodeFromInstance(this),queryRoot=rootNode;queryRoot.parentNode;)queryRoot=queryRoot.parentNode;for(var group=queryRoot.querySelectorAll("input[name="+JSON.stringify(""+name)+'][type="radio"]'),i=0;i tag. For details, see https://fb.me/invalid-aria-prop%s",unknownPropString,element.type,ReactComponentTreeHook.getStackAddendumByID(debugID)):void 0:invalidProps.length>1&&("production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?warning(!1,"Invalid aria props %s on <%s> tag. For details, see https://fb.me/invalid-aria-prop%s",unknownPropString,element.type,ReactComponentTreeHook.getStackAddendumByID(debugID)):void 0)}function handleElement(debugID,element){null!=element&&"string"==typeof element.type&&(element.type.indexOf("-")>=0||element.props.is||warnInvalidARIAProps(debugID,element))}var DOMProperty=__webpack_require__(19),ReactComponentTreeHook=__webpack_require__(8),warning=__webpack_require__(2),warnedProperties={},rARIA=new RegExp("^(aria)-["+DOMProperty.ATTRIBUTE_NAME_CHAR+"]*$"),ReactDOMInvalidARIAHook={onBeforeMountComponent:function(debugID,element){"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV&&handleElement(debugID,element)},onBeforeUpdateComponent:function(debugID,element){"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV&&handleElement(debugID,element)}};module.exports=ReactDOMInvalidARIAHook},function(module,exports,__webpack_require__){"use strict";function handleElement(debugID,element){null!=element&&("input"!==element.type&&"textarea"!==element.type&&"select"!==element.type||null==element.props||null!==element.props.value||didWarnValueNull||("production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?warning(!1,"`value` prop on `%s` should not be null. Consider using the empty string to clear the component or `undefined` for uncontrolled components.%s",element.type,ReactComponentTreeHook.getStackAddendumByID(debugID)):void 0,didWarnValueNull=!0))}var ReactComponentTreeHook=__webpack_require__(8),warning=__webpack_require__(2),didWarnValueNull=!1,ReactDOMNullInputValuePropHook={onBeforeMountComponent:function(debugID,element){handleElement(debugID,element)},onBeforeUpdateComponent:function(debugID,element){handleElement(debugID,element)}};module.exports=ReactDOMNullInputValuePropHook},function(module,exports,__webpack_require__){"use strict";function flattenChildren(children){var content="";return React.Children.forEach(children,function(child){null!=child&&("string"==typeof child||"number"==typeof child?content+=child:didWarnInvalidOptionChildren||(didWarnInvalidOptionChildren=!0,"production"!=={NODE_ENV:"production",PUBLIC_URL:"."}.NODE_ENV?warning(!1,"Only strings and numbers are supported as