+
{prefix}
bias
)
}
- return <>{params.colDef.headerName}>
+ return
{params.colDef.headerName}
}
public renderCellWith = (params: Pick
) => (
diff --git a/web/src/features/moreCast2/components/GroupHeader.tsx b/web/src/features/moreCast2/components/GroupHeader.tsx
new file mode 100644
index 000000000..028d9ea7e
--- /dev/null
+++ b/web/src/features/moreCast2/components/GroupHeader.tsx
@@ -0,0 +1,90 @@
+import { Checkbox, FormControlLabel, FormGroup, IconButton, Popover, Stack, Typography, styled } from '@mui/material'
+import { ExpandMore } from '@mui/icons-material'
+import React, { ChangeEvent, MouseEvent, useState } from 'react'
+import { LIGHT_GREY, MEDIUM_GREY, DARK_GREY } from 'app/theme'
+import { ColumnVis } from 'features/moreCast2/components/DataGridColumns'
+
+interface GroupHeaderProps {
+ id: string
+ columns: ColumnVis[]
+ weatherParam: string
+ handleShowHideChange: (weatherParam: string, columnName: string, value: boolean) => void
+}
+
+const PopoverHeader = styled(Typography)(({ theme }) => ({
+ backgroundColor: DARK_GREY,
+ fontSize: '14px',
+ fontWeight: 'bold',
+ padding: theme.spacing(1)
+}))
+
+const PopoverFormControlLabel = styled(FormControlLabel)(({ theme }) => ({
+ height: theme.spacing(4),
+ marginRight: 0,
+ paddingLeft: theme.spacing(1),
+ [':hover']: {
+ backgroundColor: LIGHT_GREY
+ }
+}))
+
+const ShowHideCheckbox = styled(Checkbox)({
+ ['&.Mui-checked']: {
+ color: MEDIUM_GREY
+ }
+})
+
+const GroupHeader = ({ id, columns, weatherParam, handleShowHideChange }: GroupHeaderProps) => {
+ const [anchorEl, setAnchorEl] = useState(null)
+ const open = Boolean(anchorEl)
+ const handleClick = (event: MouseEvent) => {
+ setAnchorEl(event.currentTarget)
+ }
+
+ const handleClose = () => {
+ setAnchorEl(null)
+ }
+
+ const handleOnChange = (event: ChangeEvent) => {
+ handleShowHideChange(weatherParam, event.target.name, event.target.checked)
+ }
+
+ return (
+ <>
+ {id}
+
+
+
+
+
+ Choose Models to Display
+
+ {columns.map(column => {
+ return (
+
+ }
+ key={column.columnName}
+ label={{column.displayName}}
+ />
+ )
+ })}
+
+
+
+ >
+ )
+}
+
+export default React.memo(GroupHeader)
diff --git a/web/src/features/moreCast2/components/SelectableButton.tsx b/web/src/features/moreCast2/components/SelectableButton.tsx
index 85dc95a66..74ea6fda9 100644
--- a/web/src/features/moreCast2/components/SelectableButton.tsx
+++ b/web/src/features/moreCast2/components/SelectableButton.tsx
@@ -5,13 +5,19 @@ import { theme } from 'app/theme'
interface SelectableButtonProps {
children?: React.ReactNode
+ dataTestId?: string
onClick: () => void
selected: boolean
}
-const SelectableButton = ({ children, onClick, selected }: SelectableButtonProps) => {
+const SelectableButton = ({ children, dataTestId, onClick, selected }: SelectableButtonProps) => {
return (
-