Skip to content

Commit

Permalink
fixed naming of selectbox in device list (#1623)
Browse files Browse the repository at this point in the history
  • Loading branch information
plehocky authored Sep 13, 2024
1 parent ec3df2f commit d8227e1
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,12 @@ const DeviceList: VoidFunctionComponent = () => {

const kafkaHealthCheckToolbar = useDisclosure({ defaultIsOpen: true });

const deviceColumnOptions = ['model/version', 'discoveredAt', 'deviceStatus', 'isInstalled'];
const deviceColumnOptions = [
{ name: 'model/version', value: 'model/version' },
{ name: 'discovered', value: 'discoveredAt' },
{ name: 'device status', value: 'deviceStatus' },
{ name: 'installation', value: 'isInstalled' },
];

const handleCheckboxChange = (value: string) => {
if (columnsDisplayed.includes(value)) {
Expand Down Expand Up @@ -888,9 +893,12 @@ const DeviceList: VoidFunctionComponent = () => {
</MenuButton>
<MenuList>
{deviceColumnOptions.map((option) => (
<MenuItem key={option}>
<Checkbox isChecked={columnsDisplayed.includes(option)} onChange={() => handleCheckboxChange(option)}>
{option}
<MenuItem key={option.value}>
<Checkbox
isChecked={columnsDisplayed.includes(option.value)}
onChange={() => handleCheckboxChange(option.value)}
>
{option.name}
</Checkbox>
</MenuItem>
))}
Expand Down

0 comments on commit d8227e1

Please sign in to comment.