Skip to content

Commit

Permalink
[mod] removes deselect on click away functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea-Papaleo committed Jun 25, 2024
1 parent a396cf7 commit 85d67ba
Showing 1 changed file with 20 additions and 28 deletions.
48 changes: 20 additions & 28 deletions src/components/image-grids/ImageGrid/ImageGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,36 +67,28 @@ export const ImageGrid = ({ kind }: { kind: string }) => {
})}
maxWidth={false}
>
<div
onClick={() => {
dispatch(
projectSlice.actions.deselectThings({ ids: selectedThingIds })
);
<Grid
container
gap={2}
sx={{
transform: "translateZ(0)",
height: "100%",
overflowY: "scroll",
}}
>
<Grid
container
gap={2}
sx={{
transform: "translateZ(0)",
height: "100%",
overflowY: "scroll",
}}
>
{things
.slice(0, max_images)
.sort(sortFunction)
.map((thing: ImageObject | AnnotationObject) => (
<ProjectGridItem
key={thing.id}
thing={thing}
handleClick={handleSelectThing}
selected={selectedThingIds.includes(thing.id)}
filtered={isFiltered(thing, thingFilters ?? {})}
/>
))}
</Grid>
</div>
{things
.slice(0, max_images)
.sort(sortFunction)
.map((thing: ImageObject | AnnotationObject) => (
<ProjectGridItem
key={thing.id}
thing={thing}
handleClick={handleSelectThing}
selected={selectedThingIds.includes(thing.id)}
filtered={isFiltered(thing, thingFilters ?? {})}
/>
))}
</Grid>
</Container>
</>
</DropBox>
Expand Down

0 comments on commit 85d67ba

Please sign in to comment.