File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
client/packages/lowcoder/src/pages/common Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -259,11 +259,11 @@ export default function ProfileDropdown(props: DropDownProps) {
259259 } , [ dropdownVisible , workspaces . items . length , dispatch ] ) ;
260260
261261 const filteredOrgs = useMemo ( ( ) => {
262- if ( ! searchTerm . trim ( ) ) return orgs ;
263- return orgs . filter ( org =>
262+ if ( ! searchTerm . trim ( ) ) return workspaces . items ;
263+ return workspaces . items . filter ( org =>
264264 org . name . toLowerCase ( ) . includes ( searchTerm . toLowerCase ( ) )
265265 ) ;
266- } , [ orgs , searchTerm ] ) ;
266+ } , [ workspaces . items , searchTerm ] ) ;
267267
268268 const handleProfileClick = ( ) => {
269269 if ( checkIsMobile ( window . innerWidth ) ) {
@@ -320,11 +320,11 @@ export default function ProfileDropdown(props: DropDownProps) {
320320 </ ProfileSection >
321321
322322 { /* Workspaces Section */ }
323- { orgs && orgs . length > 0 && showSwitchOrg ( props . user , sysConfig ) && (
323+ { workspaces . items && workspaces . items . length > 0 && showSwitchOrg ( props . user , sysConfig ) && (
324324 < WorkspaceSection >
325325 < SectionHeader > { trans ( "profile.switchOrg" ) } </ SectionHeader >
326326
327- { orgs . length > 3 && (
327+ { workspaces . items . length > 3 && (
328328 < SearchContainer >
329329 < StyledSearchInput
330330 placeholder = "Search workspaces..."
You can’t perform that action at this time.
0 commit comments