List-Formatting icon indicating copy to clipboard operation
List-Formatting copied to clipboard

openContextMenu doesnt work

Open dborchers-gc opened this issue 2 years ago • 12 comments

Does anyone tested the new customRowAction "openContextMenu"? it is in the v2 schema.

I try to use it but nothing happens: { "elmType": "button", "customRowAction": { "action": "openContextMenu" }, "txtContent": "Kontextmenü", "attributes": { "class": "sp-row-button ms-bgColor-neutralLighter ms-fontWeight-semibold" }, "style": { "width": "145px", "height": "48px", "margin": "20px 0 10px 0" } }

dborchers-gc avatar Mar 04 '22 12:03 dborchers-gc

@dborchers-gc Yes i tested you need to have selection option avaliable. ""hideSelection": false"

aaclage avatar Mar 04 '22 12:03 aaclage

Thank you @aaclage but i think thats not necessary because when i do this i can use the right-click but when i click on my button - who should open the context menu - nothing happens to ;-)

I would like to use ""hideSelection": false" but then i have many other issues with my formatting becuase my lines are not fullwith

dborchers-gc avatar Mar 04 '22 13:03 dborchers-gc

@dborchers-gc image

aaclage avatar Mar 04 '22 13:03 aaclage

have you left click on the button or only right click somewhere in the row?

dborchers-gc avatar Mar 04 '22 19:03 dborchers-gc

Hey @aaclage ich tried to use my formatting with the hideSelection false way but i am unable to use a formatting to strech my div in 100%

I find out that i have to customize the first div next to the selection button but dont know how to get it, do you have an idea?

image

dborchers-gc avatar Mar 09 '22 06:03 dborchers-gc

Hallo @dborchers-gc,

Kein problem, Go to List Setting > View Area > click on view you want to edit "7828321" > "Tabular View" area > uncheck "Allow individual item checkboxes"

aaclage avatar Mar 09 '22 07:03 aaclage

Oh okay du sprichst deutsch @aaclage :D aber ich denke wir machen auf englisch weiter vielleicht hilft es anderen ;-)

I unchekced it but it doesnt help. What i want is that my first div is width 100% and with activated Selection its not working image

That was the reason why i tried to use teh openContextMenu option

dborchers-gc avatar Mar 09 '22 07:03 dborchers-gc

@dborchers-gc This is the problem of the selection you lose control of that area because MS List will include the row style and that impact the width, sincerely am not aware on how you change that and what property to include.

aaclage avatar Mar 09 '22 08:03 aaclage

hey @aaclage in your sample you have no time set to the field, that seems to work but in my case i need a timestamp with date and time and that doesnt work with set Value and @now

dborchers-gc avatar Jul 26 '22 04:07 dborchers-gc

Hallo @dborchers-gc

Didn't try dont know if this is possible, a option you can test/try is to pick the modified date and see if has date and time or create a support field with date and time and the update with @ now. After this just output the data.

aaclage avatar Jul 26 '22 04:07 aaclage

Ups @aaclage i just saw that i´ve posted my comment in the wrong issue 😂

dborchers-gc avatar Jul 26 '22 05:07 dborchers-gc

@dborchers-gc And you get a answer anyway 😃

aaclage avatar Jul 26 '22 06:07 aaclage