Skip to content

Commit

Permalink
Fixed #2276 - TreeSelect.value should be an array in multiselect mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Nov 6, 2021
1 parent 93754e1 commit 81b3019
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 6 deletions.
11 changes: 9 additions & 2 deletions src/components/tree/Tree.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import TreeNode from '../treenode';

type TreeSelectionModeType = 'single' | 'multiple' | 'checkbox';

type TreeSelectionKeys = string | TreeSelectionKeysType | undefined | null;
type TreeSelectionKeys = string | TreeSelectionKeysType | TreeSelectionKeysType[] | undefined | null;

type TreeSelectionKeyType = boolean | TreeCheckboxSelectionKeyType;

type TreeFilterModeType = 'lenient' | 'strict';

Expand Down Expand Up @@ -48,7 +50,12 @@ interface TreeTogglerTemplateOptions {
}

interface TreeSelectionKeysType {
[key: string]: boolean;
[key: string]: TreeSelectionKeyType;
}

interface TreeCheckboxSelectionKeyType {
checked?: boolean;
partialChecked?: boolean;
}

interface TreeExpandedKeysType {
Expand Down
11 changes: 9 additions & 2 deletions src/components/treeselect/TreeSelect.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import TreeNode from '../treenode';

type TreeSelectSelectionModeType = 'single' | 'multiple' | 'checkbox';

type TreeSelectSelectionKeys = string | TreeSelectSelectionKeysType | undefined | null;
type TreeSelectSelectionKeys = string | TreeSelectSelectionKeysType | TreeSelectSelectionKeysType[] | undefined | null;

type TreeSelectDisplayType = 'comma' | 'chip';

Expand Down Expand Up @@ -42,8 +42,15 @@ interface TreeSelectChangeParams {
target: TreeSelectChangeTargetOptions;
}

type TreeSelectSelectionKeyType = boolean | TreeSelectCheckboxSelectionKeyType;

interface TreeSelectSelectionKeysType {
[key: string]: boolean;
[key: string]: TreeSelectSelectionKeyType;
}

interface TreeSelectCheckboxSelectionKeyType {
checked?: boolean;
partialChecked?: boolean;
}

interface TreeSelectEventNodeParams {
Expand Down
11 changes: 9 additions & 2 deletions src/components/treetable/TreeTable.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,21 @@ type TreeTableFilterMatchModeType = 'startsWith' | 'contains' | 'endsWith' | 'eq

type TreeTableGlobalFilterType = string | undefined | null;

type TreeTableSelectionKeys = string | TreeTableSelectionKeysType | undefined | null;
type TreeTableSelectionKeys = string | TreeTableSelectionKeysType | TreeTableSelectionKeysType[] | undefined | null;

type TreeTableSelectionKeyType = boolean | TreeTableCheckboxSelectionKeyType;

type TreeTableFilterModeType = 'lenient' | 'strict';

type TreeTableAppendToType = 'self' | HTMLElement | undefined | null;

interface TreeTableSelectionKeysType {
[key: string]: boolean;
[key: string]: TreeTableSelectionKeyType;
}

interface TreeTableCheckboxSelectionKeyType {
checked?: boolean;
partialChecked?: boolean;
}

type TreeTableExpandedKeysType = {
Expand Down

0 comments on commit 81b3019

Please sign in to comment.