Filter

Facade APIPaid VersionUniver ServerUniver on Node.jsPreset
--UniverSheetsFilterPreset

The filter plugin provides filtering functionality for cells.

This feature includes the following plugin packages:

Installation with Presets

import { createUniver, defaultTheme, LocaleType, Tools } from '@univerjs/presets';
import { UniverSheetsCorePreset } from '@univerjs/presets/preset-sheets-core';
import UniverPresetSheetsCoreEnUS from '@univerjs/presets/preset-sheets-core/locales/en-US';
import { UniverSheetsFilterPreset } from '@univerjs/presets/preset-sheets-filter';
import UniverPresetSheetsFilterEnUS from '@univerjs/presets/preset-sheets-filter/locales/en-US';
 
const { univerAPI } = createUniver({
  locale: LocaleType.EN_US,
  locales: {
    enUS: Tools.deepMerge(
      {},
      UniverPresetSheetsCoreEnUS,
      UniverPresetSheetsFilterEnUS
    ),
  },
  theme: defaultTheme,
  presets: [
    UniverSheetsCorePreset(),
    UniverSheetsFilterPreset(),
  ],
});

Advanced Installation

npm install @univerjs/sheets-filter @univerjs/sheets-filter-ui
import { LocaleType, Tools } from '@univerjs/core';
import { UniverSheetsFilterPlugin } from '@univerjs/sheets-filter';
import { UniverSheetsFilterUIPlugin } from '@univerjs/sheets-filter-ui';
import SheetsFilterUIEnUS from '@univerjs/sheets-filter-ui/locale/en-US';
 
import '@univerjs/sheets-filter-ui/lib/index.css';
 
import '@univerjs/sheets-filter/facade';
 
const univer = new Univer({
  theme: defaultTheme,
  locale: LocaleType.en_US,
  locales: {
    [LocaleType.en_US]: Tools.deepMerge(
      SheetsFilterUIEnUS
    ),
  },
});
 
univer.registerPlugin(UniverSheetsFilterPlugin);
univer.registerPlugin(UniverSheetsFilterUIPlugin);

Installation for Univer on Node.js

npm install @univerjs/sheets-filter
import { LocaleType, Tools } from '@univerjs/core';
import { UniverSheetsFilterPlugin } from '@univerjs/sheets-filter';
 
import '@univerjs/sheets-filter/facade';
 
const univer = new Univer({
  theme: defaultTheme,
  locale: LocaleType.ZH_CN,
});
 
univer.registerPlugin(UniverSheetsFilterPlugin);

Facade API