-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[data grid] Limit to one expanded row group at a time #7782
Comments
Hey @swathign-sbdinc Is this what you're looking for? It uses the |
Hi,
Does this work for Data Grid pro ?
Thanks for the quick response.
Thanks,
Swathi
From: Andrew Cherniavskii ***@***.***>
Date: Wednesday, 1 February 2023 at 6:40 PM
To: mui/mui-x ***@***.***>
Cc: GN, Swathi ***@***.***>, Mention ***@***.***>
Subject: Re: [mui/mui-x] [data grid] Limit to one expanded row group at a time (Issue #7782)
***CAUTION: EXTERNAL MESSAGE***
Hey @swathign-sbdinc<https://urldefense.com/v3/__https:/github.com/swathign-sbdinc__;!!JCruJraw!Mu9MKD2IwSAfWjcBQ0wquFNACjVHtKv2AmmymGxEqw8Gs2L5D06sjwdfwdAGym7zGPycT1J3hXDf-VTxUES0SuLI$>
If the rows are grouped only by one column - then this should work:
https://codesandbox.io/s/kind-dewdney-mx5ivo?file=/demo.tsx<https://urldefense.com/v3/__https:/codesandbox.io/s/kind-dewdney-mx5ivo?file=*demo.tsx__;Lw!!JCruJraw!Mu9MKD2IwSAfWjcBQ0wquFNACjVHtKv2AmmymGxEqw8Gs2L5D06sjwdfwdAGym7zGPycT1J3hXDf-VTxUO-FQlgi$>
It's using rowExpansionChange event which is not documented publically yet (there's a separate issue for it: #6335<https://urldefense.com/v3/__https:/github.com/mui/mui-x/issues/6335__;!!JCruJraw!Mu9MKD2IwSAfWjcBQ0wquFNACjVHtKv2AmmymGxEqw8Gs2L5D06sjwdfwdAGym7zGPycT1J3hXDf-VTxUIqgPpYU$>)
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/mui/mui-x/issues/7782*issuecomment-1412033701__;Iw!!JCruJraw!Mu9MKD2IwSAfWjcBQ0wquFNACjVHtKv2AmmymGxEqw8Gs2L5D06sjwdfwdAGym7zGPycT1J3hXDf-VTxUCCRaatX$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ARV3XUCRUGJKG3BRFFU4WCTWVJOD7ANCNFSM6AAAAAAUNJ6F4E__;!!JCruJraw!Mu9MKD2IwSAfWjcBQ0wquFNACjVHtKv2AmmymGxEqw8Gs2L5D06sjwdfwdAGym7zGPycT1J3hXDf-VTxUN2ZmFQx$>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
This message and any attachments may contain Stanley Black & Decker confidential information. Any unauthorized review, use, disclosure or distribution of any such information is prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Este mensaje y los archivos adjuntos pueden contener información confidencial de Stanley Black & Decker. Se prohíbe cualquier revisión, uso, divulgación o distribución no autorizados de dicha información. Si no es el destinatario previsto, comuníquese con el remitente y elimine todas las copias.
????????????????????????????,????????????????????????????,??????????????????
|
@swathign-sbdinc I assumed your question was about Row grouping feature, which is only available in the Premium plan. |
Hi,
My question is using Data grid pro, when user expands one row, other opened row should auto close, is there any other feature to do the same ?
Thanks,
Swathi
From: Andrew Cherniavskii ***@***.***>
Date: Thursday, 2 February 2023 at 12:10 AM
To: mui/mui-x ***@***.***>
Cc: GN, Swathi ***@***.***>, Mention ***@***.***>
Subject: Re: [mui/mui-x] [data grid] Limit to one expanded row group at a time (Issue #7782)
***CAUTION: EXTERNAL MESSAGE***
@swathign-sbdinc<https://urldefense.com/v3/__https:/github.com/swathign-sbdinc__;!!JCruJraw!KFG6Oar9NBPFtedC4AOuaR0HP_0ZBnJ5KZKnA8O1pecqrMQmgzI1LkJlxkLtZNyYsOHcnVz1T5MnMMSI8bqDfIXT$> I assumed your question was about Row grouping feature<https://urldefense.com/v3/__https:/mui.com/x/react-data-grid/row-grouping/__;!!JCruJraw!KFG6Oar9NBPFtedC4AOuaR0HP_0ZBnJ5KZKnA8O1pecqrMQmgzI1LkJlxkLtZNyYsOHcnVz1T5MnMMSI8YfMsVXU$>, which is only available in the Premium plan.
If my assumption is correct, then it won't work for DataGrid Pro.
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/mui/mui-x/issues/7782*issuecomment-1412541751__;Iw!!JCruJraw!KFG6Oar9NBPFtedC4AOuaR0HP_0ZBnJ5KZKnA8O1pecqrMQmgzI1LkJlxkLtZNyYsOHcnVz1T5MnMMSI8Z2ZA_eR$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ARV3XUAFPA2NYXUF7VSDDJ3WVKU2ZANCNFSM6AAAAAAUNJ6F4E__;!!JCruJraw!KFG6Oar9NBPFtedC4AOuaR0HP_0ZBnJ5KZKnA8O1pecqrMQmgzI1LkJlxkLtZNyYsOHcnVz1T5MnMMSI8bgrPgvZ$>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
This message and any attachments may contain Stanley Black & Decker confidential information. Any unauthorized review, use, disclosure or distribution of any such information is prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Este mensaje y los archivos adjuntos pueden contener información confidencial de Stanley Black & Decker. Se prohíbe cualquier revisión, uso, divulgación o distribución no autorizados de dicha información. Si no es el destinatario previsto, comuníquese con el remitente y elimine todas las copias.
????????????????????????????,????????????????????????????,??????????????????
|
Are you referring to the Master detail feature? |
Yes, I am using Data grid pro Master detail feature<https://urldefense.com/v3/__https:/mui.com/x/react-data-grid/master-detail/__;!!JCruJraw!IpSgfoo6RxFNK7OGldMEf4mhxK_oWLZxtdAJnk3ShDJL5hOCLT2ahsWUSgEz2V_RwFpJ6AgE6t7QhmgL4SbiBtS3$> , see you observe when one row expands and if we try to expand 2nd row both are opening
My use case is restrict the use of expanding/opening more than one row.
Thanks,
Swathi
From: Andrew Cherniavskii ***@***.***>
Date: Thursday, 2 February 2023 at 4:24 PM
To: mui/mui-x ***@***.***>
Cc: GN, Swathi ***@***.***>, Mention ***@***.***>
Subject: Re: [mui/mui-x] [data grid] Limit to one expanded row group at a time (Issue #7782)
***CAUTION: EXTERNAL MESSAGE***
My question is using Data grid pro, when user expands one row
Are you referring to the Master detail feature<https://urldefense.com/v3/__https:/mui.com/x/react-data-grid/master-detail/__;!!JCruJraw!IpSgfoo6RxFNK7OGldMEf4mhxK_oWLZxtdAJnk3ShDJL5hOCLT2ahsWUSgEz2V_RwFpJ6AgE6t7QhmgL4SbiBtS3$>?
Could you provide more details on your use case?
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/mui/mui-x/issues/7782*issuecomment-1413545379__;Iw!!JCruJraw!IpSgfoo6RxFNK7OGldMEf4mhxK_oWLZxtdAJnk3ShDJL5hOCLT2ahsWUSgEz2V_RwFpJ6AgE6t7QhmgL4YQSErVe$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ARV3XUCXXHU4MXRBCDLTGB3WVOG73ANCNFSM6AAAAAAUNJ6F4E__;!!JCruJraw!IpSgfoo6RxFNK7OGldMEf4mhxK_oWLZxtdAJnk3ShDJL5hOCLT2ahsWUSgEz2V_RwFpJ6AgE6t7QhmgL4dDjQmfW$>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
This message and any attachments may contain Stanley Black & Decker confidential information. Any unauthorized review, use, disclosure or distribution of any such information is prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Este mensaje y los archivos adjuntos pueden contener información confidencial de Stanley Black & Decker. Se prohíbe cualquier revisión, uso, divulgación o distribución no autorizados de dicha información. Si no es el destinatario previsto, comuníquese con el remitente y elimine todas las copias.
????????????????????????????,????????????????????????????,??????????????????
|
Also I have one more query Please respond : #7812
Thanks,
Swathi
From: GN, Swathi ***@***.***>
Date: Friday, 3 February 2023 at 4:43 PM
To: mui/mui-x ***@***.***>, mui/mui-x ***@***.***>
Cc: Mention ***@***.***>
Subject: Re: [mui/mui-x] [data grid] Limit to one expanded row group at a time (Issue #7782)
Yes, I am using Data grid pro Master detail feature<https://urldefense.com/v3/__https:/mui.com/x/react-data-grid/master-detail/__;!!JCruJraw!IpSgfoo6RxFNK7OGldMEf4mhxK_oWLZxtdAJnk3ShDJL5hOCLT2ahsWUSgEz2V_RwFpJ6AgE6t7QhmgL4SbiBtS3$> , see you observe when one row expands and if we try to expand 2nd row both are opening
My use case is restrict the use of expanding/opening more than one row.
Thanks,
Swathi
From: Andrew Cherniavskii ***@***.***>
Date: Thursday, 2 February 2023 at 4:24 PM
To: mui/mui-x ***@***.***>
Cc: GN, Swathi ***@***.***>, Mention ***@***.***>
Subject: Re: [mui/mui-x] [data grid] Limit to one expanded row group at a time (Issue #7782)
***CAUTION: EXTERNAL MESSAGE***
My question is using Data grid pro, when user expands one row
Are you referring to the Master detail feature<https://urldefense.com/v3/__https:/mui.com/x/react-data-grid/master-detail/__;!!JCruJraw!IpSgfoo6RxFNK7OGldMEf4mhxK_oWLZxtdAJnk3ShDJL5hOCLT2ahsWUSgEz2V_RwFpJ6AgE6t7QhmgL4SbiBtS3$>?
Could you provide more details on your use case?
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/mui/mui-x/issues/7782*issuecomment-1413545379__;Iw!!JCruJraw!IpSgfoo6RxFNK7OGldMEf4mhxK_oWLZxtdAJnk3ShDJL5hOCLT2ahsWUSgEz2V_RwFpJ6AgE6t7QhmgL4YQSErVe$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ARV3XUCXXHU4MXRBCDLTGB3WVOG73ANCNFSM6AAAAAAUNJ6F4E__;!!JCruJraw!IpSgfoo6RxFNK7OGldMEf4mhxK_oWLZxtdAJnk3ShDJL5hOCLT2ahsWUSgEz2V_RwFpJ6AgE6t7QhmgL4dDjQmfW$>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
This message and any attachments may contain Stanley Black & Decker confidential information. Any unauthorized review, use, disclosure or distribution of any such information is prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Este mensaje y los archivos adjuntos pueden contener información confidencial de Stanley Black & Decker. Se prohíbe cualquier revisión, uso, divulgación o distribución no autorizados de dicha información. Si no es el destinatario previsto, comuníquese con el remitente y elimine todas las copias.
????????????????????????????,????????????????????????????,??????????????????
|
Alright. For the Master detail you can control the expanded panels and limit to one opened panel at a time, see this demo: https://codesandbox.io/s/pedantic-field-xn5uk1?file=/demo.tsx |
Since the issue is missing key information and has been inactive for 7 days, it has been automatically closed. If you wish to see the issue reopened, please provide the missing information. |
Since the issue is missing key information and has been inactive for 7 days, it has been automatically closed. If you wish to see the issue reopened, please provide the missing information. |
Since the issue is missing key information and has been inactive for 7 days, it has been automatically closed. If you wish to see the issue reopened, please provide the missing information. |
Duplicates
Latest version
Steps to reproduce 🕹
Link to live example:
Steps:
1.
2.
3.
Current behavior 😯 It is expanding everything
No response
Expected behavior 🤔
I need to expand only one row at a time (if 1 row is expanding any other previously expanded row should auto collapse)
Context 🔦
No response
Your environment 🌎
npx @mui/envinfo
Order ID 💳 (optional)
No response
The text was updated successfully, but these errors were encountered: