@univerjs/sheets-filter v0.5.4


Class: FFilter

Defined in: sheets-filter/src/facade/f-filter.ts:28

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

Constructors

new FFilter()

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

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

Parameters

ParameterType
_workbookWorkbook
_worksheetWorksheet
_filterModelFilterModel
_injectorInjector
_commandSrvICommandService

Returns

FFilter

Methods

getColumnFilterCriteria()

getColumnFilterCriteria(col): Nullable<IFilterColumn>

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

Get the filter criteria of a column.

Parameters

ParameterTypeDescription
colnumberThe column number.

Returns

Nullable<IFilterColumn>

The filter criteria of the column.


getFilteredOutRows()

getFilteredOutRows(): number[]

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

Get the filtered out rows by this filter.

Returns

number[]

Filtered out rows by this filter.


getRange()

getRange(): FRange

Defined in: sheets-filter/src/facade/f-filter.ts:91

Get the range of the filter.

Returns

FRange

The range of the filter.


remove()

remove(): boolean

Defined in: sheets-filter/src/facade/f-filter.ts:109

Remove the filter from the worksheet.

Returns

boolean

If the filter is removed.


removeColumnFilterCriteria()

removeColumnFilterCriteria(col): FFilter

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

Clear the filter criteria of a column.

Parameters

ParameterTypeDescription
colnumberThe column number.

Returns

FFilter

The interface class to handle the filter.


removeFilterCriteria()

removeFilterCriteria(): FFilter

Defined in: sheets-filter/src/facade/f-filter.ts:100

Remove the filter criteria of all columns.

Returns

FFilter

If the filter criteria is removed.


setColumnFilterCriteria()

setColumnFilterCriteria(col, criteria): FFilter

Defined in: sheets-filter/src/facade/f-filter.ts:77

Set the filter criteria of a column.

Parameters

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

Returns

FFilter

The interface class to handle the filter.