mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 02:02:12 +08:00
UI: Add id to splitter primaryProps (#106408)
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user