diff --git a/components/lib/cascadeselect/CascadeSelect.d.ts b/components/lib/cascadeselect/CascadeSelect.d.ts index 35d24a680..2b92676b0 100644 --- a/components/lib/cascadeselect/CascadeSelect.d.ts +++ b/components/lib/cascadeselect/CascadeSelect.d.ts @@ -460,6 +460,10 @@ export interface CascadeSelectSlots { * Option instance */ option: any; + /** + * Selection state + */ + selected: boolean; }): VNode[]; /** * Custom value template. diff --git a/components/lib/cascadeselect/CascadeSelectSub.vue b/components/lib/cascadeselect/CascadeSelectSub.vue index f9b77416a..9ee04fdd5 100644 --- a/components/lib/cascadeselect/CascadeSelectSub.vue +++ b/components/lib/cascadeselect/CascadeSelectSub.vue @@ -18,7 +18,7 @@ :data-p-disabled="isOptionDisabled(processedOption)" >
- + {{ getOptionLabelToRender(processedOption) }} - + {{ getOptionLabel(option) }} diff --git a/components/lib/select/Select.d.ts b/components/lib/select/Select.d.ts index 8cf4a1e7a..f088b37ef 100755 --- a/components/lib/select/Select.d.ts +++ b/components/lib/select/Select.d.ts @@ -612,6 +612,10 @@ export interface SelectSlots { * Option instance */ option: any; + /** + * Selection state + */ + selected: boolean; /** * Index of the option */ diff --git a/components/lib/select/Select.vue b/components/lib/select/Select.vue index 3e5dde158..bf6cc8750 100755 --- a/components/lib/select/Select.vue +++ b/components/lib/select/Select.vue @@ -148,7 +148,7 @@ - + {{ getOptionLabel(option) }} diff --git a/components/lib/tree/Tree.d.ts b/components/lib/tree/Tree.d.ts index cbbeaafb6..f1c761146 100755 --- a/components/lib/tree/Tree.d.ts +++ b/components/lib/tree/Tree.d.ts @@ -345,6 +345,10 @@ export interface TreeSlots { * Tree node instance */ node: TreeNode; + /** + * Selection state + */ + selected: boolean; }): VNode[]; /** * Custom loading icon template. diff --git a/components/lib/tree/TreeNode.vue b/components/lib/tree/TreeNode.vue index ad7446e4c..d405b43c7 100755 --- a/components/lib/tree/TreeNode.vue +++ b/components/lib/tree/TreeNode.vue @@ -36,7 +36,7 @@ - +
diff --git a/doc/common/apidoc/index.json b/doc/common/apidoc/index.json index 92e708673..cf27e7097 100644 --- a/doc/common/apidoc/index.json +++ b/doc/common/apidoc/index.json @@ -13273,7 +13273,7 @@ { "name": "scope", "optional": false, - "type": "{\n \t option: any, // Option instance\n }", + "type": "{\n \t option: any, // Option instance\n \t selected: boolean, // Selection state\n }", "description": "option slot's params." } ], @@ -32524,7 +32524,7 @@ { "name": "scope", "optional": false, - "type": "{\n \t option: any, // Option instance\n \t index: number, // Index of the option\n }", + "type": "{\n \t option: any, // Option instance\n \t selected: boolean, // Selection state\n \t index: number, // Index of the option\n }", "description": "option slot's params." } ], @@ -44829,7 +44829,7 @@ { "name": "scope", "optional": false, - "type": "{\n \t option: any, // Option instance\n \t index: number, // Index of the option\n }", + "type": "{\n \t option: any, // Option instance\n \t selected: boolean, // Selection state\n \t index: number, // Index of the option\n }", "description": "option slot's params." } ], @@ -49981,7 +49981,7 @@ { "name": "scope", "optional": false, - "type": "{\n \t option: any, // Option instance\n \t index: number, // Index of the option\n }", + "type": "{\n \t option: any, // Option instance\n \t selected: boolean, // Selection state\n \t index: number, // Index of the option\n }", "description": "option slot's params." } ], @@ -51042,7 +51042,7 @@ { "name": "scope", "optional": false, - "type": "{\n \t item: any, // Item of the component\n \t index: number, // Index of the item.\n }", + "type": "{\n \t item: any, // Item of the component\n \t selected: boolean, // Selection state\n \t index: number, // Index of the item.\n }", "description": "item slot's params." } ], @@ -57039,7 +57039,7 @@ { "name": "scope", "optional": false, - "type": "{\n \t item: any, // Item of the component\n \t index: number, // Index of the item\n }", + "type": "{\n \t item: any, // Item of the component\n \t selected: boolean, // Selection state\n \t index: number, // Index of the item\n }", "description": "item slot's params." } ], @@ -62216,7 +62216,7 @@ { "name": "scope", "optional": false, - "type": "{\n \t option: any, // Option instance\n \t index: number, // Index of the option\n }", + "type": "{\n \t option: any, // Option instance\n \t selected: boolean, // Selection state\n \t index: number, // Index of the option\n }", "description": "option slot's params." } ], @@ -102485,7 +102485,7 @@ { "name": "scope", "optional": false, - "type": "{\n \t node: TreeNode, // Tree node instance\n }" + "type": "{\n \t node: TreeNode, // Tree node instance\n \t selected: boolean, // Selection state\n }" } ], "returnType": "VNode[]", @@ -103367,7 +103367,7 @@ "optional": true, "readonly": false, "type": "string", - "default": "14rem", + "default": "20rem", "description": "Height of the viewport, a scrollbar is defined if height of list exceeds this value." }, {