[Release] Fix add existing space not showing any spaces (#7756)
This commit is contained in:
parent
1f0781ca61
commit
b1968fab1d
1 changed files with 6 additions and 4 deletions
|
@ -266,9 +266,11 @@ export const AddExistingToSpace: React.FC<IAddExistingToSpaceProps> = ({
|
|||
|
||||
// only count spaces when alone as they're shown on a separate modal all on their own
|
||||
const numSpaces = (spacesRenderer && !dmsRenderer && !roomsRenderer) ? spaces.length : 0;
|
||||
const numRooms = roomsRenderer ? rooms.length : 0;
|
||||
const numDms = dmsRenderer ? dms.length : 0;
|
||||
|
||||
let noResults = true;
|
||||
if ((roomsRenderer && rooms.length > 0) || (dmsRenderer && dms.length > 0) || (numSpaces > 0)) {
|
||||
if (numSpaces > 0 || numRooms > 0 || numDms > 0) {
|
||||
noResults = false;
|
||||
}
|
||||
|
||||
|
@ -287,9 +289,9 @@ export const AddExistingToSpace: React.FC<IAddExistingToSpaceProps> = ({
|
|||
});
|
||||
};
|
||||
|
||||
const roomsScrollState = getScrollState(scrollState, rooms.length);
|
||||
const spacesScrollState = getScrollState(scrollState, numSpaces, rooms.length);
|
||||
const dmsScrollState = getScrollState(scrollState, dms.length, numSpaces, rooms.length);
|
||||
const roomsScrollState = getScrollState(scrollState, numRooms);
|
||||
const spacesScrollState = getScrollState(scrollState, numSpaces, numRooms);
|
||||
const dmsScrollState = getScrollState(scrollState, numDms, numSpaces, numRooms);
|
||||
|
||||
return <div className="mx_AddExistingToSpace">
|
||||
<SearchBox
|
||||
|
|
Loading…
Reference in a new issue