menu icon indicating copy to clipboard operation
menu copied to clipboard

feat: Default payloads

Open KnorpelSenf opened this issue 4 years ago • 0 comments

It's a common thing to create menu ranges where all buttons have the same payload object.

It would be useful if one could do

const range = new MenuRange({ payload: 'default-payload' })

which would then be set as the default value for all buttons on that range. Hence, it is sufficient to pass a string to range.text instead of always having to specify the same payload.

It needs yet to be decided whether or not the default payload should be passed on the menu ranges created for dynamic ranges inside range, but it's likely this this is not a good idea.

KnorpelSenf avatar Dec 03 '21 01:12 KnorpelSenf