зеркало из https://github.com/Azure/ipam.git
Removed print option and id field from CSV export
This commit is contained in:
Родитель
b620d9ac97
Коммит
828016c764
|
@ -123,7 +123,7 @@ async def get_users(
|
|||
)
|
||||
@cosmos_retry(
|
||||
max_retry = 5,
|
||||
error_msg = "Error creating user, please try again."
|
||||
error_msg = "Error fetching user, please try again."
|
||||
)
|
||||
async def get_user(
|
||||
authorization: str = Header(None),
|
||||
|
|
|
@ -9,8 +9,7 @@ import {
|
|||
GridToolbarContainer,
|
||||
GridToolbarColumnsButton,
|
||||
GridToolbarFilterButton,
|
||||
GridToolbarExport,
|
||||
GridCsvExportOptions
|
||||
GridToolbarExport
|
||||
} from "@mui/x-data-grid";
|
||||
|
||||
import {
|
||||
|
@ -72,12 +71,12 @@ export default function DiscoverTable(props) {
|
|||
|
||||
if (!columns.find( x => x['field'] === 'id' )) {
|
||||
columns.push(
|
||||
{ field: "id", headerName: "", headerAlign: "right", align: "right", width: 25, filterable: false, sortable: false, renderCell: renderExpand }
|
||||
{ field: "id", headerName: "", headerAlign: "right", align: "right", width: 25, filterable: false, sortable: false, disableExport: true, renderCell: renderExpand }
|
||||
);
|
||||
} else {
|
||||
columns.pop();
|
||||
columns.push(
|
||||
{ field: "id", headerName: "", headerAlign: "right", align: "right", width: 25, filterable: false, sortable: false, renderCell: renderExpand }
|
||||
{ field: "id", headerName: "", headerAlign: "right", align: "right", width: 25, filterable: false, sortable: false, disableExport: true, renderCell: renderExpand }
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -226,6 +225,9 @@ export default function DiscoverTable(props) {
|
|||
/>
|
||||
<GridToolbarExport
|
||||
sx={{ ml: 1 }}
|
||||
printOptions={{
|
||||
disableToolbarButton: true
|
||||
}}
|
||||
/>
|
||||
</Box>
|
||||
<Box sx={{ width: "100%", alignSelf: "center", textAlign: "center" }}>
|
||||
|
|
Загрузка…
Ссылка в новой задаче