Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tree selection types #2355

Closed
VsevolodGolovanov opened this issue Oct 19, 2021 · 1 comment
Closed

Tree selection types #2355

VsevolodGolovanov opened this issue Oct 19, 2021 · 1 comment
Assignees

Comments

@VsevolodGolovanov
Copy link

VsevolodGolovanov commented Oct 19, 2021

I'm submitting a ... (check one with "x")

[x] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://forum.primefaces.org/viewforum.php?f=57

Codesandbox Case (Bug Reports)
https://codesandbox.io/s/primereact-tree-selection-types-k8r44

Current behavior
Typed as

export interface TreeProps {
    selectionKeys?: TreeSelectionKeys;
    onSelectionChange?(e: TreeSelectionParams): void;
}

type TreeSelectionKeys = string | TreeSelectionKeysType | undefined | null;

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

So selectionKeys supports single and multiple modes, onSelectionChange only supports multiple mode.

Expected behavior
selectionKeys and onSelectionChange should support all modes: single (simple string), multiple (object with key strings and boolean values) and checkbox (object with key strings and object values with booleans checked and partialChecked).

Minimal reproduction of the problem with instructions
Open codesandbox, change selection, see selectionKeys values in console.

Please tell us about your environment:

  • React version:
  • PrimeReact version:
    6.6.0

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

  • Language: [all | TypeScript X.X | ES6/7 | ES5]
@mertsincan mertsincan added this to the 7.0.0.Final milestone Nov 3, 2021
@mertsincan mertsincan added the Type: Bug Issue contains a defect related to a specific component. label Nov 3, 2021
@mertsincan mertsincan self-assigned this Nov 3, 2021
@mertsincan mertsincan removed the Type: Bug Issue contains a defect related to a specific component. label Nov 8, 2021
@mertsincan mertsincan removed this from the 7.0.0.Final milestone Nov 8, 2021
@mertsincan
Copy link
Member

Fixed in #2276

Best Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants