File

src/ui/grid/services/smart-grid-lasso-selection.service.ts

Index

Properties
Methods

Methods

destroy
destroy()

Destroys the service by cleaning up all DOM elements and event listeners.

Returns : void
initialize
initialize(gridWrapperEl: HTMLElement)

Initializes the service for a specific grid wrapper element. Re-initializing will automatically clean up previous listeners.

Parameters :
Name Type Optional Description
gridWrapperEl HTMLElement No

The grid wrapper element (typically grid.wrapper.nativeElement).

Returns : void
isBottomToTop
isBottomToTop()

Determines whether the most recent lasso gesture was drawn bottom-to-top.

Returns : boolean

true if the mouse-up Y coordinate is above the mouse-down Y coordinate.

reset
reset()

Resets any in-progress lasso selection gesture and clears internal state. This should be called when the grid data changes (e.g., page change, sort, filter).

Returns : void

Properties

getCurrentSelection
Type : function

Callback returning the current selection snapshot.

getDataItems
Type : function

Callback returning the current data items displayed in the grid.

getGridSkip
Type : function

Callback returning the current grid skip offset (for paged grids).

getRowElements
Type : function

Callback returning the <tr> elements representing data rows.

onLassoCancel
Type : function

Callback invoked when lasso selection is cancelled (ESC).

Parameters :
Name Description
previous

The selection snapshot that should be restored.

onLassoEnd
Type : function

Callback invoked when the lasso selection completes.

Parameters :
Name Description
rows

The final selected rows.

Readonly selectedRecordsSignal
Type : WritableSignal<any[]>
Default value : signal<any[]>([])

Signal containing the currently lasso-selected records (dataItems).

results matching ""

    No results matching ""