Skip to content

Commit 0f42704

Browse files
committed
Implement exportAllData
1 parent fcbfa02 commit 0f42704

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

client/src/components/user-admin/UserPermissionSearch.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,9 @@ const UserPermissionSearch = ({ admins, projectLeads, setUserToEdit }) => {
203203
filteredData = getFilteredData(resultData, searchText, isProjectLead);
204204
}
205205

206+
// No need to limit export to the search results
207+
const exportAllData = getFilteredData(resultData, '', isProjectLead);
208+
206209
// Export CSV file
207210
const exportCSV = (data, fileName) => {
208211
// Header row
@@ -292,7 +295,7 @@ const UserPermissionSearch = ({ admins, projectLeads, setUserToEdit }) => {
292295
<Button
293296
sx={Buttonsx}
294297
variant="secondary"
295-
onClick={() => exportCSV(filteredData, 'project_members.csv')}
298+
onClick={() => exportCSV(exportAllData, 'project_members.csv')}
296299
>
297300
Export CSV
298301
</Button>

0 commit comments

Comments
 (0)