11import React , { useRef , useState } from 'react' ;
2- import { useSearchRealm } from '../common/Storage' ;
2+ import { useSearchZone } from '../common/Storage' ;
33import DropDownMenu from '../common/DropDownMenu' ;
44import { Tooltip , TooltipTrigger , TooltipContent } from '../common/Tooltip' ;
55import SearchIcon from '../icons/search.svg' ;
@@ -36,7 +36,7 @@ export default function SearchField(props) {
3636 const { columnRefs, setSearchResult, settings} = props ;
3737 const searchRef = useRef ( null ) ;
3838 const [ searchQuery , setSearchQuery ] = useSearchParam ( 'q' ) ;
39- const [ searchRealm , setSearchRealm ] = useSearchRealm ( 'current' ) ;
39+ const [ searchZone , setSearchZone ] = useSearchZone ( 'current' ) ;
4040
4141 function handleSearch ( event ) {
4242 const performSearch = ( ) => {
@@ -65,9 +65,9 @@ export default function SearchField(props) {
6565 }
6666 }
6767
68- function changeSearchRealm ( value ) {
69- if ( value !== searchRealm ) {
70- setSearchRealm ( value ) ;
68+ function changeSearchZone ( value ) {
69+ if ( value !== searchZone ) {
70+ setSearchZone ( value ) ;
7171 Object . entries ( columnRefs as React . MutableRefObject < any > ) . forEach ( ( [ folderId , columnRef ] ) => {
7272 columnRef . current ?. fetchInodes ( ) ;
7373 } ) ;
@@ -77,8 +77,8 @@ export default function SearchField(props) {
7777 function getItemProps ( value : string ) {
7878 return {
7979 role : 'option' ,
80- 'aria-selected' : searchRealm === value ,
81- onClick : ( ) => changeSearchRealm ( value ) ,
80+ 'aria-selected' : searchZone === value ,
81+ onClick : ( ) => changeSearchZone ( value ) ,
8282 } ;
8383 }
8484
@@ -101,7 +101,7 @@ export default function SearchField(props) {
101101 < DropDownMenu
102102 wrapperElement = "span"
103103 role = "menuitem"
104- className = "search-realm with-caret"
104+ className = "search-zone with-caret"
105105 >
106106 < li { ...getItemProps ( 'current' ) } > { gettext ( "From current folder" ) } </ li >
107107 < li { ...getItemProps ( 'everywhere' ) } > { gettext ( "In all folders" ) } </ li >
0 commit comments