diff --git a/client/src/pages/openalex-ror/openalexView.jsx b/client/src/pages/openalex-ror/openalexView.jsx index d59321e..33afe99 100644 --- a/client/src/pages/openalex-ror/openalexView.jsx +++ b/client/src/pages/openalex-ror/openalexView.jsx @@ -1,4 +1,4 @@ -import { Col, Row, Toggle } from '@dataesr/dsfr-plus'; +import { Button, Col, Row, Toggle } from '@dataesr/dsfr-plus'; import { Column } from 'primereact/column'; import { DataTable } from 'primereact/datatable'; import { InputTextarea } from 'primereact/inputtextarea'; @@ -26,6 +26,8 @@ export default function OpenalexView({ undo, }) { const [selectionPageOnly, setSelectionPageOnly] = useState(true); + const urlParams = new URLSearchParams(window.location.search); + const view = urlParams.get('view') || 'table'; const cellEditor = (options) => ( { + const url = new URL(window.location); + url.searchParams.set('view', _view); + window.history.pushState({}, '', url); + }; + const onRowEditComplete = async (edit) => { const { data, newData } = edit; let isValid = true; @@ -96,7 +104,9 @@ export default function OpenalexView({ return ( <>
- actions relatives au tableau du dessous +