-
Notifications
You must be signed in to change notification settings - Fork 859
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
View Formatting - Group - GroupProps To Trigger Expand / Contract Without Malforming Header #824
Comments
As you can see, I started with a simple base of the accordion example, here, by @anandragav 👍 ... |
I used the code below, with small changes (deleted "hideListHeader": true, since it's a not documented property). In this particular sample, we are using a group header in a smart way, to build a FAQ, in order to contain just a single related item represented by a question, but I don't think that Lists is able to "understand" that you want to run a "defaultClick". From its point of view, is something like "hey, you are asking me to perform a defaultClick, but which item should trigger that action? I was born to group many items! Which of them?" I hope I got it right, maybe another expert could add further details I'm still not aware of... |
Here is the code I used to test:
|
I'll take a look at your code, presently, and merge it into what I have, thanks, @Fedes365 ... I would add to anyone (and I'll edit the question) not to concentrate too hard on the |
Looks like I might be tilting at windmills due to a more pervasive issue: List Formatting: Group header cannot be clicked even when setting defaultClick to headerFormatter in groupProps in the newer? Microsoft Lists #9756This is causing various issues, and I think one of my attempts mirrors one of the videos in that particular issue. It's also mentioned in the following PNP issues: |
Hi @influential-eliot just wondering if you were able to find a way to resolve this in the end? I think I am experiencing the same issue. I would like users to be able to click on the "Question" and have the "Answer" box appear below, the same effect achieved by clicking the small arrow beside the "Question". Thank you. |
Hi, @lara-g07 ... I'm not sure that I have, no. |
Hi, sorry for being brief, but the official MS Q&A just kept deleting my question when I added the view JSON.
Broad Overview
I would like to affect the same action as tapping the chevron in a Grouped view, without malforming the header.
Illustrated
One attempt that I have made to try and resolve this was to add a
customRowAction
(as per the code below) I get the following annoyance:Before
After
More Information
Attempts
I have tried issuing the base object as both a button and a div, neither make a difference.
On top of that, I have tried a few different attributes ripped from the chevron button's HTML code, but they don't change anything.
I have also tried shoehorning in the
customRowAction
, in both the Group/Header and the RowFormatter, neither assist, here.Plus, as @Fedes365 asserts, it really needs to be in the RowFormatter anyway. But, hey ... I was trying stuff out.
Full Code
This includes the
customRowAction
in the header ...The text was updated successfully, but these errors were encountered: