Winter Cardinal UI - v0.442.0 / DListData

Interface: DListData<ITEM>

DList data.

Type parameters

Name
ITEM

Implemented by

Table of contents

Properties

Methods

Properties

accessor

Readonly accessor: DListItemAccessor<ITEM>

Defined in

src/main/typescript/wcardinal/ui/d-list-data.ts:45


after

after: ITEM[]

Defined in

src/main/typescript/wcardinal/ui/d-list-data.ts:43


before

before: ITEM[]

Defined in

src/main/typescript/wcardinal/ui/d-list-data.ts:41


items

items: ITEM[]

Defined in

src/main/typescript/wcardinal/ui/d-list-data.ts:42


mapped

Readonly mapped: DListDataMapped<ITEM>

Defined in

src/main/typescript/wcardinal/ui/d-list-data.ts:44


selection

Readonly selection: DListDataSelection<ITEM>

Defined in

src/main/typescript/wcardinal/ui/d-list-data.ts:46

Methods

add

add(item, index?): boolean

Adds the given item. If the index is given, inserts the given item at that index.

Parameters

Name Type Description
item ITEM an item
index? number an index

Returns

boolean

true if the data is changed

Defined in

src/main/typescript/wcardinal/ui/d-list-data.ts:78


addAll

addAll(newItems, index?): boolean

Adds all the given items. If the index is given, inserts all the given items at that index.

Parameters

Name Type Description
newItems ITEM[] items
index? number an index

Returns

boolean

true if the data is changed

Defined in

src/main/typescript/wcardinal/ui/d-list-data.ts:88


clear

clear(): boolean

Removes all the items.

Returns

boolean

true if the data is changed

Defined in

src/main/typescript/wcardinal/ui/d-list-data.ts:103


clearAndAdd

clearAndAdd(item): boolean

Removes all the existing items and adds the given item.

Parameters

Name Type Description
item ITEM an item

Returns

boolean

true if the data is changed

Defined in

src/main/typescript/wcardinal/ui/d-list-data.ts:111


clearAndAddAll

clearAndAddAll(newItems): boolean

Removes all the existing items and adds all the given items.

Parameters

Name Type Description
newItems ITEM[] items to be inserted

Returns

boolean

true if the data is changed.

Defined in

src/main/typescript/wcardinal/ui/d-list-data.ts:119


each

each(iteratee, ifrom?, ito?): void

Calls the specified iteratee on each datum of the specified index range. If called iteratee explicitly returns false, stops an iteration.

Parameters

Name Type Description
iteratee DListDataIteratee<ITEM> an function called on each datum
ifrom? number an index to start an iteration
ito? number an index before which an interation stops

Returns

void

Defined in

src/main/typescript/wcardinal/ui/d-list-data.ts:129


get

get(index): null | ITEM

Returns an item at the specified index. The index is an index on itemsrows filters and sorters are not applied.

Parameters

Name Type Description
index number an index on rows filters and sorters are not applied

Returns

null | ITEM

Defined in

src/main/typescript/wcardinal/ui/d-list-data.ts:59


remove

remove(index): null | ITEM

Removes an item at the given index.

Parameters

Name Type Description
index number an index of the item to be removed.

Returns

null | ITEM

a removed item or null

Defined in

src/main/typescript/wcardinal/ui/d-list-data.ts:96


set

set(index, item): null | ITEM

Replaces an item at the specified index with the given item.

Parameters

Name Type Description
index number an index of the item to be replaced.
item ITEM an item

Returns

null | ITEM

a replaced item or null

Defined in

src/main/typescript/wcardinal/ui/d-list-data.ts:68


size

size(): number

Returns a size of data.

Returns

number

Defined in

src/main/typescript/wcardinal/ui/d-list-data.ts:51