-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/submitted bulk actions #3350
base: staging
Are you sure you want to change the base?
Feature/submitted bulk actions #3350
Conversation
… submissions in SubmissionList component
setSelectedRows(newSelection); | ||
}; | ||
|
||
// Function to check if all rows are selected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change this filter code for something like more clear like:
selectedRows.filter()
}, | ||
}); | ||
} | ||
columns = columns.concat([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Utilize columns.push
to maintain consistency.
|
||
const bulkActions = async () => { | ||
try { | ||
const selectedSubmissions = Object.keys(selectedRows).filter( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change to selectRows.filter
const addToast = useToastContext(); | ||
|
||
const [selectedRows, setSelectedRows] = useState({}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe selectedRows
should be an array of objects rather than a single object.
); | ||
|
||
if (selectedSubmissions.length > 0) { | ||
if (selectedAction === 'claim') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please refactor this code to extract three different functions for each action (claim, unclaim, and reject)?
Test URL: https://pr-3350--staging-aiid.netlify.app/