File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9595 "test:cov" : " vitest run --coverage" ,
9696 "typecheck" : " tsc --noEmit"
9797 },
98- "dependencies" : {
99- "@solid-primitives/refs" : " ^1.1.2"
100- },
10198 "peerDependencies" : {
10299 "solid-js" : " >=1.6.0" ,
103100 "uplot" : " >=1.6.32"
Original file line number Diff line number Diff line change 11import "uplot/dist/uPlot.min.css" ;
22
3- import { mergeRefs , Ref } from "@solid-primitives/refs" ;
43import {
54 createEffect ,
65 createMemo ,
98 mergeProps ,
109 onCleanup ,
1110 type ParentProps ,
11+ type Ref ,
1212 splitProps ,
1313 untrack ,
1414} from "solid-js" ;
@@ -281,8 +281,8 @@ export const SolidUplot = <T extends VoidStruct = VoidStruct>(
281281 hasWarnedZeroHeight = true ;
282282 console . warn (
283283 "[SolidUplot] autoResize observed 0px height. " +
284- "Ensure the parent container has an explicit height " +
285- "or is within a flex/grid layout that provides height." ,
284+ "Ensure the parent container has an explicit height " +
285+ "or is within a flex/grid layout that provides height." ,
286286 ) ;
287287 }
288288
@@ -311,6 +311,7 @@ export const SolidUplot = <T extends VoidStruct = VoidStruct>(
311311 return (
312312 < div
313313 id = "solid-uplot-root"
314+ ref = { local . ref }
314315 class = { classes ( ) }
315316 style = { {
316317 display : "flex" ,
@@ -326,7 +327,7 @@ export const SolidUplot = <T extends VoidStruct = VoidStruct>(
326327 >
327328 { local . children }
328329 < div
329- ref = { mergeRefs ( local . ref , ( el ) => ( container = el ) ) }
330+ ref = { container }
330331 class = "solid-uplot-chart"
331332 style = { {
332333 position : "relative" ,
You can’t perform that action at this time.
0 commit comments