Merge pull request #4490 from justadityaraj/fix/page-selector-dev

Keep typed page paths selectable in reports
This commit is contained in:
Mike Cao authored and GitHub committed 2026-09-05 22:41:30 -07:00
commit 42c5a53650
2 files changed
+9 -6

No files matched your search

@@ -65,7 +65,7 @@ test('clears the selected website value when the input is cleared', () => {
expect(onChange).toHaveBeenCalledWith('');
});
test('combines values from both Journey step types', () => {
test('combines values from both Journey step types with the typed value', () => {
render(
<WebsiteValueComboBox
label="Start step"
@@ -74,11 +74,12 @@ test('combines values from both Journey step types', () => {
additionalType="event"
startDate={new Date('2026-08-01')}
endDate={new Date('2026-08-03')}
value=""
value="/"
onChange={() => {}}
/>,
);
expect(screen.getByText('/')).toBeInTheDocument();
expect(screen.getByText('/home')).toBeInTheDocument();
expect(screen.getByText('signup')).toBeInTheDocument();
});
@@ -56,12 +56,14 @@ export function WebsiteValueComboBox({
}, [type, additionalType]);
const items = useMemo(() => {
const values = [...(primaryQuery.data || []), ...(additionalQuery.data || [])]
.map(({ value }) => value)
.filter(Boolean);
const values = [
value,
...(primaryQuery.data || []).map(({ value }) => value),
...(additionalQuery.data || []).map(({ value }) => value),
].filter(Boolean);
return [...new Set<string>(values)];
}, [primaryQuery.data, additionalQuery.data]);
}, [value, primaryQuery.data, additionalQuery.data]);
return (
<div className={cn('flex flex-col gap-1', className)}>