fix: make step 1 clicks show connector lines like other steps
Previously clicking a step 1 block would set it as an entry point filter instead of showing connection lines. Now all steps behave consistently — clicking any step toggles selection and draws connector lines to the next column. Entry point filtering remains available via the dropdown.
This commit is contained in:
@@ -190,7 +190,6 @@ export default function JourneysPage() {
|
|||||||
transitions={transitionsData?.transitions ?? []}
|
transitions={transitionsData?.transitions ?? []}
|
||||||
totalSessions={totalSessions}
|
totalSessions={totalSessions}
|
||||||
depth={committedDepth}
|
depth={committedDepth}
|
||||||
onNodeClick={(path) => setEntryPath(path)}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ interface ColumnJourneyProps {
|
|||||||
transitions: PathTransition[]
|
transitions: PathTransition[]
|
||||||
totalSessions: number
|
totalSessions: number
|
||||||
depth: number
|
depth: number
|
||||||
onNodeClick?: (path: string) => void
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ColumnPage {
|
interface ColumnPage {
|
||||||
@@ -431,7 +430,6 @@ export default function ColumnJourney({
|
|||||||
transitions,
|
transitions,
|
||||||
totalSessions,
|
totalSessions,
|
||||||
depth,
|
depth,
|
||||||
onNodeClick,
|
|
||||||
}: ColumnJourneyProps) {
|
}: ColumnJourneyProps) {
|
||||||
const [selections, setSelections] = useState<Map<number, string>>(new Map())
|
const [selections, setSelections] = useState<Map<number, string>>(new Map())
|
||||||
const containerRef = useRef<HTMLDivElement>(null)
|
const containerRef = useRef<HTMLDivElement>(null)
|
||||||
@@ -455,11 +453,6 @@ export default function ColumnJourney({
|
|||||||
|
|
||||||
const handleSelect = useCallback(
|
const handleSelect = useCallback(
|
||||||
(colIndex: number, path: string) => {
|
(colIndex: number, path: string) => {
|
||||||
if (colIndex === 0 && onNodeClick) {
|
|
||||||
onNodeClick(path)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
setSelections((prev) => {
|
setSelections((prev) => {
|
||||||
const next = new Map(prev)
|
const next = new Map(prev)
|
||||||
if (next.get(colIndex) === path) {
|
if (next.get(colIndex) === path) {
|
||||||
@@ -473,7 +466,7 @@ export default function ColumnJourney({
|
|||||||
return next
|
return next
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
[onNodeClick]
|
[]
|
||||||
)
|
)
|
||||||
|
|
||||||
// ─── Empty state ────────────────────────────────────────────────
|
// ─── Empty state ────────────────────────────────────────────────
|
||||||
|
|||||||
Reference in New Issue
Block a user