-
- setStudyActive(studyActive === '1' ? null : '1')}
- />
-
+function() {
+ const [studyActive, setStudyActive] = useState(null);
+ return (
+
+
+ setStudyActive(studyActive === '1' ? null : '1')}
+ />
- );
- };
+
+ );
}
```
diff --git a/platform/docs/docs/component-library/components/StudyListFilter.mdx b/platform/docs/docs/component-library/components/StudyListFilter.mdx
index 0561f7e47..f9d3d257e 100644
--- a/platform/docs/docs/component-library/components/StudyListFilter.mdx
+++ b/platform/docs/docs/component-library/components/StudyListFilter.mdx
@@ -20,101 +20,99 @@ import { StudyListFilter, ModalProvider, Modal } from '@ohif/ui';
## Basic usage
```jsx live
-{
- () => {
- const defaultFilterValues = {
- patientName: '',
- mrn: '',
- studyDate: {
- startDate: null,
- endDate: null,
- },
- description: '',
- modality: undefined,
- accession: '',
- sortBy: '',
- sortDirection: 'none',
- page: 0,
- resultsPerPage: 25,
- };
- const [filterValues, setFilterValues] = useState(defaultFilterValues);
- const filtersMeta = [
- {
- name: 'patientName',
- displayName: 'Patient Name',
- inputType: 'Text',
- isSortable: true,
- gridCol: 4,
- },
- {
- name: 'mrn',
- displayName: 'MRN',
- inputType: 'Text',
- isSortable: true,
- gridCol: 2,
- },
- {
- name: 'studyDate',
- displayName: 'Study date',
- inputType: 'DateRange',
- isSortable: true,
- gridCol: 5,
- },
- {
- name: 'description',
- displayName: 'Description',
- inputType: 'Text',
- isSortable: true,
- gridCol: 4,
- },
- {
- name: 'modality',
- displayName: 'Modality',
- inputType: 'MultiSelect',
- inputProps: {
- options: [
- { value: 'SEG', label: 'SEG' },
- { value: 'CT', label: 'CT' },
- { value: 'MR', label: 'MR' },
- { value: 'SR', label: 'SR' },
- ],
- },
- isSortable: true,
- gridCol: 3,
- },
- {
- name: 'accession',
- displayName: 'Accession',
- inputType: 'Text',
- isSortable: true,
- gridCol: 4,
- },
- {
- name: 'instances',
- displayName: 'Instances',
- inputType: 'None',
- isSortable: true,
- gridCol: 2,
- },
- ];
- const isFiltering = (filterValues, defaultFilterValues) => {
- return Object.keys(defaultFilterValues).some(name => {
- return filterValues[name] !== defaultFilterValues[name];
- });
- };
- return (
-
- setFilterValues(defaultFilterValues)}
- isFiltering={isFiltering(filterValues, defaultFilterValues)}
- />
-
- );
+function() {
+ const defaultFilterValues = {
+ patientName: '',
+ mrn: '',
+ studyDate: {
+ startDate: null,
+ endDate: null,
+ },
+ description: '',
+ modality: undefined,
+ accession: '',
+ sortBy: '',
+ sortDirection: 'none',
+ page: 0,
+ resultsPerPage: 25,
};
+ const [filterValues, setFilterValues] = useState(defaultFilterValues);
+ const filtersMeta = [
+ {
+ name: 'patientName',
+ displayName: 'Patient Name',
+ inputType: 'Text',
+ isSortable: true,
+ gridCol: 4,
+ },
+ {
+ name: 'mrn',
+ displayName: 'MRN',
+ inputType: 'Text',
+ isSortable: true,
+ gridCol: 2,
+ },
+ {
+ name: 'studyDate',
+ displayName: 'Study date',
+ inputType: 'DateRange',
+ isSortable: true,
+ gridCol: 5,
+ },
+ {
+ name: 'description',
+ displayName: 'Description',
+ inputType: 'Text',
+ isSortable: true,
+ gridCol: 4,
+ },
+ {
+ name: 'modality',
+ displayName: 'Modality',
+ inputType: 'MultiSelect',
+ inputProps: {
+ options: [
+ { value: 'SEG', label: 'SEG' },
+ { value: 'CT', label: 'CT' },
+ { value: 'MR', label: 'MR' },
+ { value: 'SR', label: 'SR' },
+ ],
+ },
+ isSortable: true,
+ gridCol: 3,
+ },
+ {
+ name: 'accession',
+ displayName: 'Accession',
+ inputType: 'Text',
+ isSortable: true,
+ gridCol: 4,
+ },
+ {
+ name: 'instances',
+ displayName: 'Instances',
+ inputType: 'None',
+ isSortable: true,
+ gridCol: 2,
+ },
+ ];
+ const isFiltering = (filterValues, defaultFilterValues) => {
+ return Object.keys(defaultFilterValues).some(name => {
+ return filterValues[name] !== defaultFilterValues[name];
+ });
+ };
+ return (
+
+ setFilterValues(defaultFilterValues)}
+ isFiltering={isFiltering(filterValues, defaultFilterValues)}
+ />
+
+ );
}
```
diff --git a/platform/docs/docs/component-library/components/StudyListPagination.mdx b/platform/docs/docs/component-library/components/StudyListPagination.mdx
index 6949abc2e..568065628 100644
--- a/platform/docs/docs/component-library/components/StudyListPagination.mdx
+++ b/platform/docs/docs/component-library/components/StudyListPagination.mdx
@@ -19,26 +19,24 @@ import { StudyListPagination } from '@ohif/ui';
## Basic usage
```jsx live
-{
- () => {
- const [currentPage, setCurrentPage] = useState(1);
- const [perPage, setPerPage] = useState(25);
- const onChangePage = page => {
- setCurrentPage(page);
- };
- const onChangePerPage = perPage => {
- setPerPage(perPage);
- setCurrentPage(1);
- };
- return (
-
- );
+function() {
+ const [currentPage, setCurrentPage] = useState(1);
+ const [perPage, setPerPage] = useState(25);
+ const onChangePage = page => {
+ setCurrentPage(page);
};
+ const onChangePerPage = perPage => {
+ setPerPage(perPage);
+ setCurrentPage(1);
+ };
+ return (
+
+ );
}
```
diff --git a/platform/docs/docs/component-library/components/StudyListTable.mdx b/platform/docs/docs/component-library/components/StudyListTable.mdx
index 53bbb49c1..d7777b73f 100644
--- a/platform/docs/docs/component-library/components/StudyListTable.mdx
+++ b/platform/docs/docs/component-library/components/StudyListTable.mdx
@@ -21,41 +21,39 @@ import { StudyListTable } from '@ohif/ui';
## Basic usage
```jsx live
-{
- () => {
- const studies = new Array(10).fill('');
- const [expandedRows, setExpandedRows] = useState([]);
- const tableDataSource = studies.map((study, key) => {
- const rowKey = key + 1;
- const isExpanded = expandedRows.some(k => k === rowKey);
- return {
- row: [
- { key: 'Cell 01', content: 'Cell 01', gridCol: 2 },
- { key: 'Cell 02', content: 'Cell 02', gridCol: 4 },
- { key: 'Cell 03', content: 'Cell 03', gridCol: 4 },
- { key: 'Cell 04', content: 'Cell 04', gridCol: 4 },
- ],
- expandedContent: (
-
- Custom expanded content for row {rowKey}
- |
+function() {
+ const studies = new Array(10).fill('');
+ const [expandedRows, setExpandedRows] = useState([]);
+ const tableDataSource = studies.map((study, key) => {
+ const rowKey = key + 1;
+ const isExpanded = expandedRows.some(k => k === rowKey);
+ return {
+ row: [
+ { key: 'Cell 01', content: 'Cell 01', gridCol: 2 },
+ { key: 'Cell 02', content: 'Cell 02', gridCol: 4 },
+ { key: 'Cell 03', content: 'Cell 03', gridCol: 4 },
+ { key: 'Cell 04', content: 'Cell 04', gridCol: 4 },
+ ],
+ expandedContent: (
+
+ Custom expanded content for row {rowKey}
+ |
+ ),
+ onClickRow: () =>
+ setExpandedRows(rows =>
+ isExpanded ? rows.filter(n => rowKey !== n) : [...rows, rowKey]
),
- onClickRow: () =>
- setExpandedRows(rows =>
- isExpanded ? rows.filter(n => rowKey !== n) : [...rows, rowKey]
- ),
- isExpanded,
- };
- });
- return (
-
-
-
- );
- };
+ isExpanded,
+ };
+ });
+ return (
+
+
+
+ );
}
```
diff --git a/platform/docs/docs/component-library/components/WindowLevelMenuItem.mdx b/platform/docs/docs/component-library/components/WindowLevelMenuItem.mdx
index 51c93c77c..d4c74e21c 100644
--- a/platform/docs/docs/component-library/components/WindowLevelMenuItem.mdx
+++ b/platform/docs/docs/component-library/components/WindowLevelMenuItem.mdx
@@ -19,14 +19,12 @@ import { WindowLevelMenuItem, ListMenu } from '@ohif/ui';
```
```jsx live
-{
- () => {
- return (
-
-
-
- );
- };
+function() {
+ return (
+
+
+
+ );
}
```
diff --git a/platform/docs/docs/component-library/context-providers/ViewportDialogProvider.mdx b/platform/docs/docs/component-library/context-providers/ViewportDialogProvider.mdx
index 828c33cc0..2ed44fbe6 100644
--- a/platform/docs/docs/component-library/context-providers/ViewportDialogProvider.mdx
+++ b/platform/docs/docs/component-library/context-providers/ViewportDialogProvider.mdx
@@ -55,13 +55,15 @@ component across all application.
);
};
const ViewportActionButtons = () => {
- const [dialogState, dialogApi] = useViewportDialog();
- return (
-
- );
- };
+ const [dialogState, dialogApi] = useViewportDialog();
+ return (
+
+ );
+ };
+ }
+
return (