A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
Dear Nguyen Tien Thanh,
Thank you for posting your question in the Microsoft Community.
From your description, it seems that you are facing an issue where the SharePoint List layout is not responsive when using the "group by" feature while working with CSS flexbox (flex-wrap: wrap). However, the layout works fine when you don't use "group by".
This issue might be related to the way flexbox interacts with SharePoint's "group by" functionality. When using "group by", SharePoint might override or conflict with the flex-wrap property, affecting the layout responsiveness.
I apologize for redirecting you to the relevant support community, as our expertise and resources are primarily focused on SharePoint general and built-in feature queries. For more specialized support regarding CSS flexbox issues in SharePoint, I recommend posting your question in the Ask a question - Microsoft Q&A under SharePoint related tags, where experts in these areas can provide more specialized suggestions.
Your patience and understanding are greatly appreciated.
If you have any other issues, feel free to reach out in this community again. I'm always here to help you.
Sincerely,
Sophia