File tree Expand file tree Collapse file tree 2 files changed +31
-37
lines changed Expand file tree Collapse file tree 2 files changed +31
-37
lines changed Original file line number Diff line number Diff line change @@ -39,45 +39,44 @@ function Menu<T extends object>(props: SpectrumMenuProps<T>, ref: DOMRef<HTMLULi
39
39
return (
40
40
< MenuStateContext . Provider value = { { state, container : scopedRef , menu : domRef } } >
41
41
< FocusScope contain = { state . expandedKeys . size > 0 } >
42
- < div ref = { scopedRef } style = { { display : 'inline-flex' , overflow : 'hidden' } } >
43
- < ul
44
- { ...menuProps }
45
- { ...styleProps }
46
- ref = { domRef }
47
- className = {
48
- classNames (
49
- styles ,
50
- 'spectrum-Menu' ,
51
- styleProps . className
52
- )
53
- } >
54
- { [ ...state . collection ] . map ( item => {
55
- if ( item . type === 'section' ) {
56
- return (
57
- < MenuSection
58
- key = { item . key }
59
- item = { item }
60
- state = { state }
61
- onAction = { completeProps . onAction } />
62
- ) ;
63
- }
64
-
65
- let menuItem = (
66
- < MenuItem
42
+ < ul
43
+ { ...menuProps }
44
+ { ...styleProps }
45
+ ref = { domRef }
46
+ className = {
47
+ classNames (
48
+ styles ,
49
+ 'spectrum-Menu' ,
50
+ styleProps . className
51
+ )
52
+ } >
53
+ { [ ...state . collection ] . map ( item => {
54
+ if ( item . type === 'section' ) {
55
+ return (
56
+ < MenuSection
67
57
key = { item . key }
68
58
item = { item }
69
59
state = { state }
70
60
onAction = { completeProps . onAction } />
71
61
) ;
62
+ }
63
+
64
+ let menuItem = (
65
+ < MenuItem
66
+ key = { item . key }
67
+ item = { item }
68
+ state = { state }
69
+ onAction = { completeProps . onAction } />
70
+ ) ;
72
71
73
- if ( item . wrapper ) {
74
- menuItem = item . wrapper ( menuItem ) ;
75
- }
72
+ if ( item . wrapper ) {
73
+ menuItem = item . wrapper ( menuItem ) ;
74
+ }
76
75
77
- return menuItem ;
78
- } ) }
79
- </ ul >
80
- </ div >
76
+ return menuItem ;
77
+ } ) }
78
+ </ ul >
79
+ < div ref = { scopedRef } / >
81
80
</ FocusScope >
82
81
</ MenuStateContext . Provider >
83
82
) ;
Original file line number Diff line number Diff line change 10
10
* governing permissions and limitations under the License.
11
11
*/
12
12
13
- export let unavailableMenuItems = false ;
14
13
export let tableNestedRows = false ;
15
14
16
- export function enableUnavailableMenuItems ( ) {
17
- unavailableMenuItems = true ;
18
- }
19
-
20
15
export function enableTableNestedRows ( ) {
21
16
tableNestedRows = true ;
22
17
}
You can’t perform that action at this time.
0 commit comments