RowList
Represents rows of the [DataFrame].
Refrain from accessing data via [RowList] and [Row] in performance-critical scenarios. To maximize performance, get values via [DataFrame.columns], instead.
Constructors
new RowList()
new RowList(
table
,dart
):RowList
Parameters
Parameter | Type |
---|---|
table | DataFrame |
dart | any |
Returns
Source
Properties
Property | Modifier | Type |
---|---|---|
dart | readonly | any |
table | readonly | DataFrame |
Accessors
filters
get
filters():DartList
<string
>
List of textual descriptions of currently applied filters
Returns
DartList
<string
>
Source
mouseOverRowFunc
get
mouseOverRowFunc():IndexPredicate
Returns
Source
Methods
[iterator]
()
[iterator]():
Generator
<Row
,void
,unknown
>
Iterates over all rows.
Returns
Generator
<Row
, void
, unknown
>
Source
_applyPredicate()
_applyPredicate(
bitset
,rowPredicate
):void
Parameters
Parameter | Type | Description |
---|---|---|
bitset | BitSet | |
rowPredicate | RowPredicate |
Returns
void
Source
addFilterState()
addFilterState(
state
):void
Adds a filter state. This should be done in the onRowsFiltering handler. This is needed for filter synchronization.
Parameters
Parameter | Type |
---|---|
state | FilterState |
Returns
void
Source
addNew()
addNew(
values
,notify
):Row
Appends a new row with the specified values
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
values | null | any [] | null | List of values (length and types should match columns) |
notify | boolean | true | Whether a change notification should be fired. |
Returns
Source
filter()
filter(
rowPredicate
):void
Filters rows by predicate. See DataFrame.filter Sample: https://public.datagrok.ai/js/samples/data-frame/row-matching/select-rows
Parameters
Parameter | Type |
---|---|
rowPredicate | RowPredicate |
Returns
void
Source
get()
get(
i
):Row
Gets i-th row. DO NOT USE IN PERFORMANCE-CRITICAL CODE!
Parameters
Parameter | Type |
---|---|
i | number |
Returns
Source
highlight()
highlight(
indexPredicate
):void
Highlights the corresponding rows.
Parameters
Parameter | Type |
---|---|
indexPredicate | null | IndexPredicate |
Returns
void
Source
insertAt()
insertAt(
idx
,count
?,notify
?):void
Inserts empty rows at the specified position
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
idx | number | undefined | |
count ? | number | 1 | Number of rows to insert. |
notify ? | boolean | true | Whether a change notification should be fired. |
Returns
void
Source
match()
match(
query
):RowMatcher
Creates a query matcher. Sample: https://public.datagrok.ai/js/samples/data-frame/row-matching/patterns
Parameters
Parameter | Type | Description |
---|---|---|
query | string | object |
Returns
Source
removeAt()
removeAt(
idx
,count
?,notify
?):void
Removes specified rows
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
idx | number | undefined | |
count ? | number | 1 | Number of rows to remove. |
notify ? | boolean | true | Whether a change notification should be fired. |
Returns
void
Source
removeWhere()
removeWhere(
rowPredicate
):void
Removes specified rows
Parameters
Parameter | Type | Description |
---|---|---|
rowPredicate | RowPredicate |
Returns
void
Source
removeWhereIdx()
removeWhereIdx(
indexPredicate
):void
Removes specified rows
Parameters
Parameter | Type | Description |
---|---|---|
indexPredicate | IndexPredicate |
Returns
void
Source
requestFilter()
requestFilter():
void
Viewers that filter rows should subscribe to DataFrame.onRowsFiltering event. When filtering conditions are changed, viewers should call requestFilter().
Returns
void
Source
select()
select(
rowPredicate
):void
Selects rows by predicate. See DataFrame.selection Sample: https://public.datagrok.ai/js/samples/data-frame/row-matching/select-rows
Parameters
Parameter | Type |
---|---|
rowPredicate | RowPredicate |
Returns
void
Source
setValues()
setValues(
idx
,values
,notify
):void
Sets values for the specified row.
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
idx | number | undefined | Row index. |
values | any [] | undefined | List of values (length and types should match columns) |
notify | boolean | true | Raise onDataChanged event |
Returns
void
Source
toString()
toString():
string
Returns
string
Source
where()
where(
indexPredicate
):Iterable
<any
>
Parameters
Parameter | Type |
---|---|
indexPredicate | IndexPredicate |
Returns
Iterable
<any
>