@@ -179,50 +179,6 @@ export const LocationSelectionDialog = ({
179179
180180 const hasInitialized = useRef ( false )
181181
182- const getAllDescendantIds = useMemo ( ( ) => {
183- if ( ! data ?. locationNodes ) return ( ) => new Set < string > ( )
184- const nodes = data . locationNodes as LocationNodeType [ ]
185-
186- return ( nodeId : string ) : Set < string > => {
187- const descendants = new Set < string > ( )
188- const queue = [ nodeId ]
189-
190- while ( queue . length > 0 ) {
191- const currentId = queue . shift ( ) !
192- const children = nodes . filter ( n => n . parentId === currentId )
193- children . forEach ( child => {
194- descendants . add ( child . id )
195- queue . push ( child . id )
196- } )
197- }
198-
199- return descendants
200- }
201- } , [ data ?. locationNodes ] )
202-
203- const _unused_getAllAncestorIds = useMemo ( ( ) => {
204- if ( ! data ?. locationNodes ) return ( ) => new Set < string > ( )
205- const nodes = data . locationNodes as LocationNodeType [ ]
206-
207- return ( nodeId : string ) : Set < string > => {
208- const ancestors = new Set < string > ( )
209- let current : LocationNodeType | undefined = nodes . find ( n => n . id === nodeId )
210-
211- while ( current ?. parentId ) {
212- ancestors . add ( current . parentId )
213- const parentId = current . parentId
214- const parent = nodes . find ( n => n . id === parentId )
215- if ( ! parent ) break
216- current = parent
217- }
218-
219- return ancestors
220- }
221- } , [ data ?. locationNodes ] )
222-
223- const _unused_simplifySelection = useMemo ( ( ) => {
224- return ( ids : string [ ] ) : string [ ] => ids
225- } , [ ] )
226182
227183 useEffect ( ( ) => {
228184 if ( isOpen ) {
0 commit comments