@univerjs/sheets-filter v0.5.0-beta.1Docs


Class: FFilter

This interface class provides methods to modify the filter settings of a worksheet.

Constructors

new FFilter()

new FFilter(
   _workbook, 
   _worksheet, 
   _filterModel, 
   _injector, 
   _commandSrv): FFilter

Parameters

ParameterType
_workbookWorkbook
_worksheetWorksheet
_filterModelFilterModel
_injectorInjector
_commandSrvICommandService

Returns

FFilter

Defined in

sheets-filter/src/facade/f-filter.ts:29

Methods

getColumnFilterCriteria()

getColumnFilterCriteria(col): Nullable<IFilterColumn>

Get the filter criteria of a column.

Parameters

ParameterTypeDescription
colnumberThe column number.

Returns

Nullable<IFilterColumn>

The filter criteria of the column.

Defined in

sheets-filter/src/facade/f-filter.ts:52


getFilteredOutRows()

getFilteredOutRows(): number[]

Get the filtered out rows by this filter.

Returns

number[]

Filtered out rows by this filter.

Defined in

sheets-filter/src/facade/f-filter.ts:43


getRange()

getRange(): FRange

Get the range of the filter.

Returns

FRange

The range of the filter.

Defined in

sheets-filter/src/facade/f-filter.ts:89


remove()

remove(): Promise<boolean>

Remove the filter from the worksheet.

Returns

Promise<boolean>

If the filter is removed.

Defined in

sheets-filter/src/facade/f-filter.ts:106


removeColumnFilterCriteria()

removeColumnFilterCriteria(col): Promise<boolean>

Clear the filter criteria of a column.

Parameters

ParameterTypeDescription
colnumberThe column number.

Returns

Promise<boolean>

If the filter criteria is cleared.

Defined in

sheets-filter/src/facade/f-filter.ts:61


removeFilterCriteria()

removeFilterCriteria(): Promise<boolean>

Remove the filter criteria of all columns.

Returns

Promise<boolean>

If the filter criteria is removed.

Defined in

sheets-filter/src/facade/f-filter.ts:98


setColumnFilterCriteria()

setColumnFilterCriteria(col, criteria): Promise<boolean>

Set the filter criteria of a column.

Parameters

ParameterTypeDescription
colnumberThe column number.
criteriaNullable<IFilterColumn>The new filter criteria.

Returns

Promise<boolean>

If the filter criteria is set.

Defined in

sheets-filter/src/facade/f-filter.ts:76