@univerjsfind-replaceclassesFindmodel

@univerjs/find-replace v0.5.0-beta.1Docs


Class: abstract FindModel

Extends

Constructors

new FindModel()

new FindModel(): FindModel

Returns

FindModel

Inherited from

Disposable.constructor

Properties

PropertyModifierTypeDefault valueDescriptionInherited fromDefined in
_disposedprotectedbooleanfalse-Disposable._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:93
activelyChangingMatch$abstractObservable<IFindMatch<unknown>>undefined--submodules/univer/packages/find-replace/src/services/find-replace.service.ts:69
matchesUpdate$abstractObservable<IFindMatch<unknown>[]>undefinedFind model should emit new matches from this observable if they changed no matter due to incremental or document’s content changes.-submodules/univer/packages/find-replace/src/services/find-replace.service.ts:68
unitIdabstractstringundefined--submodules/univer/packages/find-replace/src/services/find-replace.service.ts:62

Methods

dispose()

dispose(): void

Returns

void

Inherited from

Disposable.dispose

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:106


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:96


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

Disposable.ensureNotDisposed

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:100


getMatches()

abstract getMatches(): IFindMatch<unknown>[]

Returns

IFindMatch<unknown>[]

Defined in

submodules/univer/packages/find-replace/src/services/find-replace.service.ts:71


moveToNextMatch()

abstract moveToNextMatch(params?): null | IFindMatch<unknown>

Parameters

ParameterType
params?IFindMoveParams

Returns

null | IFindMatch<unknown>

Defined in

submodules/univer/packages/find-replace/src/services/find-replace.service.ts:73


moveToPreviousMatch()

abstract moveToPreviousMatch(params?): null | IFindMatch<unknown>

Parameters

ParameterType
params?IFindMoveParams

Returns

null | IFindMatch<unknown>

Defined in

submodules/univer/packages/find-replace/src/services/find-replace.service.ts:74


replace()

abstract replace(replaceString): Promise<boolean>

Replace the currently focused matching if there is one.

Parameters

ParameterType
replaceStringstring

Returns

Promise<boolean>

Defined in

submodules/univer/packages/find-replace/src/services/find-replace.service.ts:77


replaceAll()

abstract replaceAll(replaceString): Promise<IReplaceAllResult>

Replace all matches. This method would return how many

Parameters

ParameterType
replaceStringstring

Returns

Promise<IReplaceAllResult>

Defined in

submodules/univer/packages/find-replace/src/services/find-replace.service.ts:82