mirror of https://github.com/grafana/grafana.git
				
				
				
			UI: Add id to splitter primaryProps (#106408)
This commit is contained in:
		
							parent
							
								
									1df888c517
								
							
						
					
					
						commit
						d59f9599b6
					
				|  | @ -308,6 +308,8 @@ export function useSplitter(options: UseSplitterOptions) { | |||
|     secondaryStyles.flexBasis = `${initialSize}px`; | ||||
|   } | ||||
| 
 | ||||
|   const primaryId = `start-panel-${id}`; | ||||
| 
 | ||||
|   return { | ||||
|     containerProps: { | ||||
|       ref: containerRef, | ||||
|  | @ -317,6 +319,7 @@ export function useSplitter(options: UseSplitterOptions) { | |||
|       ref: firstPaneRef, | ||||
|       className: styles.panel, | ||||
|       style: primaryStyles, | ||||
|       id: primaryId, | ||||
|     }, | ||||
|     secondaryProps: { | ||||
|       ref: secondPaneRef, | ||||
|  | @ -337,7 +340,7 @@ export function useSplitter(options: UseSplitterOptions) { | |||
|       'aria-valuemin': 0, | ||||
|       'aria-valuemax': 100, | ||||
|       'aria-valuenow': initialSize * 100, | ||||
|       'aria-controls': `start-panel-${id}`, | ||||
|       'aria-controls': primaryId, | ||||
|       'aria-label': 'Pane resize widget', | ||||
|       tabIndex: 0, | ||||
|       className: dragHandleStyle, | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue