logo

S2

  • Manual
  • API
  • Examples
  • Playground
  • ChangeLog
  • Productsantv logo arrow
  • 2.x
  • Common Configuration
    • S2DataConfig
    • S2Options
      Updated
    • S2Theme
      Updated
    • S2Event
  • Basic Class
    • SpreadSheet
    • Interaction
      Updated
    • Store
    • BaseCell
      Updated
    • BaseDataSet
    • Node
    • BaseTooltip
    • BaseFacet
      Updated
    • Hierarchy
      New
    • BaseBBox
      New
    • CellData
      New
  • Components
    • table component
    • DrillDown
    • Switcher
    • Advanced Sort
    • Export
      Updated
  • Graphic style
  • 透视组合图拓展 S2Options

DrillDown

Previous
table component
Next
Switcher

Resources

Ant Design
Galacea Effects
Umi-React Application Framework
Dumi-Component doc generator
ahooks-React Hooks Library

Community

Ant Financial Experience Tech
seeconfSEE Conf-Experience Tech Conference

Help

GitHub
StackOverflow

more productsMore Productions

Ant DesignAnt Design-Enterprise UI design language
yuqueYuque-Knowledge creation and Sharing tool
EggEgg-Enterprise-class Node development framework
kitchenKitchen-Sketch Tool set
GalaceanGalacean-互动图形解决方案
xtechLiven Experience technology
© Copyright 2025 Ant Group Co., Ltd..备案号:京ICP备15032932号-38

Loading...

React Drilldown Components

const s2Options = {
width: 600,
height: 480,
hierarchyType: 'tree', // 树形结构
};
<SheetComponent
options={s2Options}
partDrillDown={PartDrillDown}
sheetType="pivot" // 透视模式
/>

​📊 Check out the React version of the drilldown demo

Vue drilldown component

The drill-down component can only be used in table and perspective mode.

const s2Options = {
width: 600,
height: 480,
hierarchyType: 'tree',
};
<template>
<SheetComponent
ref="s2"
:sheetType="pivot"
:partDrillDown="partDrillDown"
:options="s2Options"
/>
</template>

​📊 Check out the Vue version of the drilldown demo

public API

Function description: Configure dimension drill-down, currently only supports drill-down in the perspective mode tree structure, row header dimension drill-down

Part Drill Down

Type: object , optional , default: {}

parameterillustratetypeDefaultsrequiredRemarkVersion
drillConfigDrill down menu component configuration itemsDrillDownProps-✓
drillItemsNumThe number of displayed items after the drill-down is completed, and all are displayed by defaultnumber-1
fetchDataCallback after clicking the drilldownFetchCallBack-✓
clearDrillDownClear the drill-down information. When the specified rowId is passed, clear the drill-down information corresponding to the rowId; if the parameter is an empty object {}, clear all the drill-down information{rowId: string;}-Only React components support this property
displayConditionConfigure the display conditions of the drilldown icon , same as HeaderActionIcon(meta: Node, iconName: string) => boolean-Only React components support this property1.26.0 returns the iconName and presses a single icon to control the display and hiding

Note: The drillConfig and displayCondition fields in PartDrillDown will affect the re-rendering of the drill-down mode, please note that use memo or state to control its variability.

FetchCallBack

(meta: Node, drillFields: string[]) => Promise<PartDrillDownInfo>

Function description: Callback parameters after clicking the drilldown: PartDrillDownInfo

PartDrillDownInfo

Type: object , required , default value: {}

Function description: Drill down data request parameter configuration

parameterillustratetyperequiredDefaults
drillDatadrill down dataRecord<string, stringnumber>[]✓
drillFieldDrill down dimension value valuestring✓

DrillDownProps

Type: object , required , default value: {}

Function description: Drill down menu component configuration items

parameterillustratetypeDefaultsrequiredRemark
dataSetDrill down to data source configurationDataSet[]✓
classNameTransparent style namestring
titletitlestring
searchTextSearch Box Copywritingstring
clearTextreset button copystring
disabledFieldsDimensions that do not allow drill-downstring[]
getDrillFieldsInternally get the callback of the current drill-down dimensionFunction
setDrillFieldsInternally set the callback of the current drill-down dimensionFunction
extraCustomize the inserted node, inserted between the search box and the drill-down menuReactNodeOnly React components support this property
drillFieldsDimensions that allow drill-downstring[]Only React components support this property
DataSet

Type: object , required , default value: {}

Function description: drill down data source configuration

parameterillustratetypeDefaultsrequired
nameshow namestring✓
valuespecific valuestring✓
typeDimension type, different types correspond to different iconstext | location | date
disabledIs it allowed to chooseboolean
iconThe icon of the list itemReactNode