Skip to content
Discussion options

You must be logged in to vote
  1. Using Univer’s Built-in Group Plugin

Univer already has a GroupPlugin that lets you group rows/columns and collapse/expand them. Example usage:

import { GroupPlugin } from '@univerjs/sheets-group-ui';

// Register the plugin
univer.registerPlugin(GroupPlugin);

// Group rows
univerAPI.getActiveWorkbook()?.getActiveSheet()?.getRowManager().group(2, 5); // groups rows 2-5

// Collapse (hide) the group
univerAPI.getActiveWorkbook()?.getActiveSheet()?.getRowManager().collapse(2);

// Expand (show) the group
univerAPI.getActiveWorkbook()?.getActiveSheet()?.getRowManager().expand(2);


Same API exists for columns via getColumnManager().

2. Manual Show/Hide via API
```bash
If you don’t need f…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@joaquinniicolas
Comment options

Answer selected by joaquinniicolas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants