Skip to content

Commit

Permalink
enable checkbox selection for active image only
Browse files Browse the repository at this point in the history
  • Loading branch information
sumn2u committed Jun 18, 2024
1 parent a13722f commit 97c8153
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/src/FilesListMenu/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,12 @@ export const FilesListMenu = ({
fontSize: 14, // Set size
color: image.processed ? 'green' : '', // Set color conditionally
},
cursor: selectedImage !== null && selectedImage !== index ? 'not-allowed' : 'pointer',
}}
checked={!!checkedImages[index]}
onClick={() => handleCheckBoxClick(index)}
data-testid="checkbox"
disabled={selectedImage !== null && selectedImage !== index}
/>
<span style={index === selectedImage? {backgroundColor: "rgba(255, 124, 120, 0.5)"} : {}}>
<Label className={classnames({ selected: image.name === selectedImage })} style={ { backgroundColor: "withe" }} onClick={() => {handleClickLabel(image.name)}}>
Expand Down

0 comments on commit 97c8153

Please sign in to comment.