react-spectrum icon indicating copy to clipboard operation
react-spectrum copied to clipboard

Is there nested menu support?

Open osequi opened this issue 3 years ago • 6 comments

❔ Question

I've been looking for nested menu support both in Spectrum and Aria. No mentions found.

🔦 Context

Nested menus are as necessary as nested lists.

osequi avatar Dec 08 '20 07:12 osequi

The foundation is present: https://react-spectrum.adobe.com/react-stately/useTreeData.html So theoretically is possible.

osequi avatar Dec 08 '20 12:12 osequi

hi @osequi, nested menus are not supported yet, but it's something we absolutely plan to address down the line

matthewdeutsch avatar Dec 10 '20 01:12 matthewdeutsch

hi, any news on nested menus? 😃

hehex9 avatar Dec 09 '21 02:12 hehex9

Hi guys, same question. Maybe someone can suggest at least a temporary workaround for this? It feels like its possible to use useTreeState for this, as it has an "expanded" keys collection. Is there a particular blocker why I won't be able to implement this using current functionality, even if it's not supported out of the box?

I think I need to implement a new type for nested data structure the same way as we have Item and section or even reuse menu itself, not sure how hard it can be :)

Lighttree avatar Dec 29 '21 14:12 Lighttree

Any update on this?

torgeadelin avatar Aug 16 '22 10:08 torgeadelin

Apologies about the delayed response, the team still hasn't picked up nested menus due to other component priorities. We're are also still waiting on some additional design/a11y support for certain facets of nested menu items. I honestly can't say whether or not useTreeState would be sufficient for an implementation of nest menus without trying it myself (my gut feeling is that it should be enough though).

For now you can reference https://github.com/adobe/react-spectrum/projects/1 to see what the team is currently working on.

LFDanLu avatar Aug 18 '22 23:08 LFDanLu