Skip to content

Commit

Permalink
fix(subsetting-pane): check if subsetting adds a transport mode
Browse files Browse the repository at this point in the history
  • Loading branch information
josh-willis-arcadis committed Sep 10, 2024
1 parent b73aaba commit b800d70
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/trip-form/src/MetroModeSelector/SubSettingsPane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,10 @@ export default function SubSettingsPane({

const handleSettingChange = useCallback(
(setting: ModeSetting) => (evt: QueryParamChangeEvent) => {
if (setting.type === "SUBMODE") {
if (
(setting.type === "CHECKBOX" || setting.type === "SUBMODE") &&
setting.addTransportMode
) {
if (
settingsOnlySubmodes.every(
s => Object.keys(evt).includes(s.key) || s.value === false
Expand Down

0 comments on commit b800d70

Please sign in to comment.