@@ -43,11 +43,13 @@ export default function Settings() {
4343 const storedTimezone = settingsObj . timezone ;
4444 const storedRowsPerPageOptions = settingsObj . tableRowsPerPageOptions ;
4545 const storedSortSidebar = settingsObj . sidebarSortAlphabetically ;
46+ const resourceMapAlwaysExpand = settingsObj . resourceMapAlwaysExpand ;
4647 const storedUseEvict = settingsObj . useEvict ;
4748 const [ selectedTimezone , setSelectedTimezone ] = useState < string > (
4849 storedTimezone || Intl . DateTimeFormat ( ) . resolvedOptions ( ) . timeZone
4950 ) ;
5051 const [ sortSidebar , setSortSidebar ] = useState < boolean > ( storedSortSidebar ) ;
52+ const [ alwaysExpand , setAlwaysExpand ] = useState < boolean > ( resourceMapAlwaysExpand ) ;
5153 const [ useEvict , setUseEvict ] = useState < boolean > ( storedUseEvict ) ;
5254 const dispatch = useDispatch ( ) ;
5355 const themeName = useTypedSelector ( state => state . theme . name ) ;
@@ -77,10 +79,19 @@ export default function Settings() {
7779 ) ;
7880 } , [ useEvict ] ) ;
7981
82+ useEffect ( ( ) => {
83+ dispatch (
84+ setAppSettings ( {
85+ resourceMapAlwaysExpand : alwaysExpand ,
86+ } )
87+ ) ;
88+ } , [ alwaysExpand ] ) ;
89+
8090 const sidebarLabelID = 'sort-sidebar-label' ;
8191 const evictLabelID = 'use-evict-label' ;
8292 const tableRowsLabelID = 'rows-per-page-label' ;
8393 const timezoneLabelID = 'timezone-label' ;
94+ const alwaysExpandID = 'always-expand-label' ;
8495
8596 return (
8697 < SectionBox
@@ -160,6 +171,20 @@ export default function Settings() {
160171 ) ,
161172 nameID : evictLabelID ,
162173 } ,
174+ {
175+ name : t ( 'translation|Always Expand Resource Map groups' ) ,
176+ value : (
177+ < Switch
178+ color = "primary"
179+ checked = { alwaysExpand }
180+ onChange = { e => setAlwaysExpand ( e . target . checked ) }
181+ inputProps = { {
182+ 'aria-labelledby' : alwaysExpandID ,
183+ } }
184+ />
185+ ) ,
186+ nameID : alwaysExpandID ,
187+ } ,
163188 ] }
164189 />
165190 < Box
0 commit comments