Skip to content

Commit

Permalink
feat(utils): add selectedAt property to DataItem interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Sakchai-Refinitiv committed Sep 15, 2023
1 parent 9bdbf29 commit 4d69419
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
5 changes: 0 additions & 5 deletions packages/elements/src/tree/helpers/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ export interface TreeDataItem extends DataItem {
* If `true`, child items will be visible
*/
expanded?: boolean;

/**
* Timestamp indicating the order of sequential selection
*/
selectedAt?: number;
}

/**
Expand Down
10 changes: 10 additions & 0 deletions packages/utils/src/collection/data-item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,37 @@ export interface DataItem extends CollectionItem {
* when the item is selected.
*/
value?: string;

/**
* Whether to show or hide
* the item from the renderer.
*/
hidden?: boolean;

/**
* Sets the item to be readonly.
* Read only items cannot be selected by a user.
*/
readonly?: boolean;

/**
* Sets the highlight state of the item.
* This is usually used for navigating over items,
* without affecting focus, or, highlighting a multiple selection.
*/
highlighted?: boolean;

/**
* Sets the selection state of the item.
* This is usually used for returning selected values.
*/
selected?: boolean;

/**
* Timestamp indicating the order of sequential selection
*/
selectedAt?: number;

/**
* Sets the item to be disabled.
* This completely prevents the
Expand Down

0 comments on commit 4d69419

Please sign in to comment.