Skip to content
MUI’s hosted AI Assistant backend shuts down at the end of 2026.Switch in two lines →
  • Products
    • AG Grid AI Toolkit Early accessThe model and the server behind the toolkit.
    • MUI X Data Grid StableThe backend for the Premium AI Assistant.
    • TanStack Table Public alphaA plugin that applies each answer to your table.
    • AG Studio Early accessA hosted backend for its assistant, not built yet.
  • How it works
  • Accuracy
  • Pricing
  • Security
  • Docs
    • Quickstart: server route
    • Quickstart: TanStack Table
    • Browser keys
    • Moving from MUI’s hosted service
    • Guide: when MUI’s service retires
Sign inStart a 7-day trial
Menu
  • Products
    • AG Grid AI Toolkit Early access
    • MUI X Data Grid Stable
    • TanStack Table Public alpha
    • AG Studio Early access
  • How it works
  • Accuracy
  • Pricing
  • Security
  • Docs
    • Quickstart: server route
    • Quickstart: TanStack Table
    • Browser keys
    • Moving from MUI’s hosted service
    • Guide: when MUI’s service retires
  • Sign in

Product

  • How it works
  • Accuracy
  • Pricing
  • Data and security

Grids

  • AG Grid AI ToolkitEarly access
  • MUI X Data Grid PremiumStable
  • TanStack TablePublic alpha
  • AG StudioEarly access

Docs

  • Quickstart: server route
  • Browser keys
  • Guide: when MUI’s service retires

Company

  • Contact
  • Terms
  • Privacy

Not affiliated with or endorsed by MUI or AG Grid. MUI and AG Grid are trademarks of their respective owners.

© 2026 Gridsay

Docs pages
Start
  • Documentation
  • How it works
  • Examples
MUI X Data Grid
  • Quickstart: server route
  • From the browser
  • Using the helper
  • Filtering
  • Sorting
  • Grouping
  • Aggregation
  • Pivoting
  • Charts
  • Row selection
  • Follow-up questions
  • Refusals and errors
  • Moving from MUI’s service
  • Reference
TanStack Table
  • Quickstart
  • Describing columns
  • Filtering
  • Sorting
  • Grouping
  • Row selection
  • Server-side data
  • Controlled state
  • Undo and reset
  • Refusals and errors
  • API reference
Keys and sign-in
  • Secret and publishable keys
  • Browser keys
  • JWT and OIDC
  • Session tokens
  • Identity webhook
  • Per-user limits
  • The console
  • Data and privacy
HTTP API
  • HTTP API
  • Authentication
  • Data Grid endpoint
  • Follow-up questions
  • Private mode
Reference
  • Errors
  • Limits
  • Tiers and credits
  • @gridsay/core
On this page

On this page

  1. undo()
  2. reset()
  3. Next
Skip to the article
Start
  • Documentation
  • How it works
  • Examples
MUI X Data Grid
  • Quickstart: server route
  • From the browser
  • Using the helper
  • Filtering
  • Sorting
  • Grouping
  • Aggregation
  • Pivoting
  • Charts
  • Row selection
  • Follow-up questions
  • Refusals and errors
  • Moving from MUI’s service
  • Reference
TanStack Table
  • Quickstart
  • Describing columns
  • Filtering
  • Sorting
  • Grouping
  • Row selection
  • Server-side data
  • Controlled state
  • Undo and reset
  • Refusals and errors
  • API reference
Keys and sign-in
  • Secret and publishable keys
  • Browser keys
  • JWT and OIDC
  • Session tokens
  • Identity webhook
  • Per-user limits
  • The console
  • Data and privacy
HTTP API
  • HTTP API
  • Authentication
  • Data Grid endpoint
  • Follow-up questions
  • Private mode
Reference
  • Errors
  • Limits
  • Tiers and credits
  • @gridsay/core

Undo and reset

On this page

  1. undo()
  2. reset()
  3. Next

Undo puts back what the last answer changed. Reset starts a new conversation and leaves the table as it is. Both are buttons you add next to the question box, in the same component and from the same hook: a second useTableAssistant has a conversation of its own, and its undo knows nothing of the first one's answers.

TSX
import { type AssistantTable, useTableAssistant } from '@gridsay/tanstack-table/react';import { useState } from 'react'; export function AskBox({ table }: { table: AssistantTable }) {  const { ask, undo, reset, canUndo, pending, error } = useTableAssistant(table, {    url: '/api/tanstack-table',  });  const [question, setQuestion] = useState('');  return (    <form      onSubmit={async (event) => {        event.preventDefault();        if (await ask(question)) setQuestion('');      }}    >      <input aria-label="Ask about the table" value={question} onChange={(event) => setQuestion(event.target.value)} />      <button type="submit" disabled={pending || !question.trim()}>Ask</button>      <button type="button" disabled={pending || !canUndo} onClick={() => undo()}>        Undo      </button>      <button type="button" onClick={reset}>        New conversation      </button>      {error ? <p role="alert">{error.message}</p> : null}    </form>  );}

undo()#

  • Puts back the state the last answer changed: filters, sorting, grouping or selection. Then it puts back the page and the open groups, once the table has recomputed its rows.
  • Leaves everything else as it is now.
  • Undoes one answer. After an undo, there is nothing more to undo until the next answer.
  • Returns true when it put something back, at once; it is not a promise. It returns false and does nothing when there is no answer to undo, or while a question is pending.
  • A refusal keeps the answer to undo as it was.
  • A successful undo clears error.
  • Does not refund the question, and does not start a new conversation: the next question sends the table as it is after the undo.

canUndo is true after an applied answer, and false while a question is pending. Bind it to the button's disabled, as above.

reset()#

  • Starts a new conversation: the next question does not build on earlier ones.
  • Forgets the answer to undo and clears error.
  • Keeps the table as it is. It does not clear filters, collapse groups or clear the selection.
  • A question waiting for its answer changes the table no further, and the hook resolves its ask with false and no error. Questions queued behind it are not sent.
  • A request already sent is not cancelled. Gridsay may still answer it, and charge for it.
  • If reset comes while an answer is being applied, the part already written stays.

Name the button for what it does, such as New conversation, not Clear filters.

Next#

  • Controlled state
  • Refusals and errors
  • API reference