1- import { useState } from 'react' ;
1+ import { useId , useState } from 'react' ;
22import DialogTitle from '@mui/material/DialogTitle' ;
33import PropTypes from 'prop-types' ;
44import {
@@ -13,10 +13,11 @@ import ScrollIndicatedDialogContent from '../containers/ScrollIndicatedDialogCon
1313/**
1414 */
1515export function WorkspaceImport ( {
16- addError, importConfig, classes = { } , handleClose, open = false ,
16+ addError, id = undefined , importConfig, classes = { } , handleClose, open = false ,
1717} ) {
1818 const { t } = useTranslation ( ) ;
1919 const [ configImportValue , setConfigImportValue ] = useState ( '' ) ;
20+ const titleId = useId ( ) ;
2021
2122 /** */
2223 const handleChange = ( event ) => {
@@ -37,14 +38,14 @@ export function WorkspaceImport({
3738
3839 return (
3940 < WorkspaceDialog
40- aria-labelledby = "workspace-import-title"
41- id = "workspace-import"
41+ aria-labelledby = { titleId }
42+ id = { id }
4243 onClose = { handleClose }
4344 open = { open }
4445 fullWidth
4546 maxWidth = "sm"
4647 >
47- < DialogTitle id = "workspace-import-title" >
48+ < DialogTitle id = { titleId } >
4849 { t ( 'importWorkspace' ) }
4950 </ DialogTitle >
5051 < ScrollIndicatedDialogContent >
@@ -79,6 +80,7 @@ WorkspaceImport.propTypes = {
7980 addError : PropTypes . func . isRequired ,
8081 classes : PropTypes . objectOf ( PropTypes . string ) ,
8182 handleClose : PropTypes . func . isRequired ,
83+ id : PropTypes . string ,
8284 importConfig : PropTypes . func . isRequired ,
8385 open : PropTypes . bool ,
8486} ;
0 commit comments