Repository navigation
Bump dependencies to latest stable versions and fix breaking changes - #6
withden-dev wants to merge 1 commit into
Conversation
| import { ScrollArea } from "@/components/ui/scroll-area"; | ||
|
|
||
| type ResponseWriterProps = { | ||
| export type ResponseWriterProps = React.ComponentProps<typeof ScrollArea> & { |
There was a problem hiding this comment.
Warning · Passing a ref disables response auto-scrolling
The expanded ResponseWriterProps accepts ref, but spreading props after ref={scrollAreaRef} replaces the internal ref. The scrolling effect then always skips its work.
Callers supplying a ref lose automatic scrolling as response text updates.
Merge the caller ref with scrollAreaRef instead of overwriting it.
Details
The existing demo supplies only text and className, not a ref. Previously the declared props did not permit a ref; the change makes this failing usage part of the public typed API. Both object and callback refs supplied through props replace the internal ref, leaving its current value null.
| return ( | ||
| <div | ||
| key={item.dataKey} | ||
| key={item.dataKey ? String(item.dataKey) : (item.name ?? index)} |
There was a problem hiding this comment.
Warning · Falsy series keys can collide with other tooltip rows
The truthiness check replaces valid dataKey values 0 and "" with fallback names, introducing duplicate sibling keys when a fallback matches another series key.
Payload updates can reconcile the wrong tooltip rows or preserve the wrong formatter component state.
Use a nullish check for dataKey before converting it to a string.
Details
For example, visible entries with dataKey 0/name "total" and dataKey "total"/name "total" previously had distinct React keys "0" and "total"; both now receive "total". The payload filter does not exclude either entry, and formatter output is rendered beneath the keyed element. No caller reaching this payload combination was found.
No description provided.