Skip to content

feat: add pivot table functionality to DataTable#1349

Open
vinitkhandal717 wants to merge 12 commits intodevfrom
1330-date-table-pivot-table-support
Open

feat: add pivot table functionality to DataTable#1349
vinitkhandal717 wants to merge 12 commits intodevfrom
1330-date-table-pivot-table-support

Conversation

@vinitkhandal717
Copy link
Copy Markdown
Collaborator

@vinitkhandal717 vinitkhandal717 commented Apr 13, 2026

Summary

add pivot table functionality

Issue Ticket

Closes #1330

USES

function App() {
const [isOpen, setIsOpen] = useState(false)
const data = [
{ region: 'North', product: 'Widget', sales: 1000 },
{ region: 'South', product: 'Gadget', sales: 1500 },
]
const columns = [
{ field: 'region', header: 'Region', type: 'text' },
{ field: 'product', header: 'Product', type: 'text' },
{ field: 'sales', header: 'Sales', type: 'number' },
]
return (
<>
<Button
text="Open Pivot Table"
onClick={() => setIsOpen(true)}
/>

  <PivotTableModal
    isOpen={isOpen}
    onClose={() => setIsOpen(false)}
    data={data}
    columns={columns}
    onConfigChange={(config) => console.log(config)}
  />
</>

)
}
Props
Prop Type
isOpen boolean
onClose () => void
data array
columns array
title string
trigger ReactNode
onTriggerClick () => void
onConfigChange (config) => void
onExport (config) => void
How to Use

  1. Select Column - Pick a field from dropdown
  2. Add to Section - Click + button for Rows/Columns/Values
  3. Configure - Change aggregation, toggle totals
  4. Export - Click Download button
    Config Output
    {
    rows: ['region'],
    columns: ['product'],
    values: [{ field: 'sales', aggregation: 'sum' }]
    }

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 5, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@juspay/blend-design-system@1349

commit: d0573bc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Date Table: Pivot Table Support

1 participant