Skip to content

Commit 43c5602

Browse files
authored
CSV viewer responsive (#1963)
* CSV viewer responsive * remove title and description
1 parent c2229f3 commit 43c5602

File tree

2 files changed

+6
-17
lines changed

2 files changed

+6
-17
lines changed

geonode_mapstore_client/client/js/components/MediaViewer/SpreadsheetViewer.jsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const VirtualizedGrid = ({data}) => {
3434
);
3535
};
3636

37-
export const SpreadsheetViewer = ({extension, title, description, src, url}) => {
37+
export const SpreadsheetViewer = ({extension, src, url}) => {
3838
const [data, setData] = useState([]);
3939
const [loading, setLoading] = useState(false);
4040
const [error, setError] = useState(null);
@@ -89,8 +89,6 @@ export const SpreadsheetViewer = ({extension, title, description, src, url}) =>
8989
return data?.length > 0 ? (
9090
<div className="gn-csv-viewer">
9191
<div className="csv-container">
92-
<span className="title">{title}</span>
93-
<span className="description">{description}</span>
9492
<VirtualizedGrid data={data}/>
9593
</div>
9694
</div>

geonode_mapstore_client/client/themes/geonode/less/_media-viewer.less

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -67,24 +67,22 @@
6767
width: 50vw;
6868
}
6969
.gn-csv-viewer {
70-
padding: 0 20em;
7170
height: 100%;
7271
.csv-container {
72+
width: 100%;
73+
max-width: 1024px;
74+
margin: auto;
75+
overflow-y: auto;
7376
padding: 1.5em;
7477
padding-bottom: 0;
7578
display: flex;
7679
flex-direction: column;
7780
gap: 12px;
7881
overflow-wrap: break-word;
7982
height: 100%;
80-
.title {
81-
margin: 0;
82-
font-weight: 500;
83-
font-size: 1.5em;
84-
}
8583
.grid-container {
8684
height: 100%;
87-
min-height: 350px;
85+
min-height: 320px;
8886
.empty-data {
8987
display: flex;
9088
justify-content: center;
@@ -99,13 +97,6 @@
9997
-ms-user-select: text;
10098
user-select: text;
10199
}
102-
@media screen and (max-width: 768px) {
103-
padding: 0;
104-
overflow-y: auto;
105-
.csv-container {
106-
height: auto;
107-
}
108-
}
109100
}
110101
}
111102

0 commit comments

Comments
 (0)