agentsmith
Reactivity with shadcn-solid textfield
I created my own
NumberInput
using https://shadcn-solid.com/docs/components/textfield. I see they have a number field, but I wanted the more typical html number input.
My implementation has 4 number inputs that are clamped based on min/max values. I'm testing by manually typing -1
in the field. Technically a 1
and then I'm adding a -
to it since it won't input otherwise.
The clamp works for 2 of the inputs, but fails for the other 2. It seems to be losing the reactivity somehow. I've tried adding createMemo
around the value to ensure the reactivity is present although I don't believe that shouldn't be necessary since I'm passing the accessor. I might see about creating a minimal example for this, but for now here's the code for the NumberInput and the implementation using is.
14 replies
Fundamental reactivity
I must be missing something fundamental about how to implement that reactivity in SolidJS. I have a Card component (multiple for testing). That component includes some inputs with data that will be passed to child component (chart) which should trigger an update for that child component.
Parent Card(s) Component
8 replies
solid-plotly.js a new wrapper for Plotly.js
I could use some more experienced eyes to check the SolidJS implementation details. Eventually I'd like to get this into the official plotly.js distributions.
https://github.com/ralphsmith80/solid-plotly.js/tree/main
I've posted on there support forum about that as well.
https://community.plotly.com/t/solidjs-version-of-plotly-could-use-some-eyeballs/87761
I want to use Plotly with SolidJS. The closest match would be React, but they’re fundamentally different. I used the React project to build a similar wrapper using SolidJS. ralphsmith80/solid-plotly.js: A plotly.js SolidJS component from Plotly (github.com) It’s a monorepo using pnpm. The solid-plotly.js packages is under packages and the demo app is under apps. I’d like to see about getting this included into the available plotly packages. I could use some eyes on the project and there’s still some work around testing and documentation that needs to be done. In particular I’m struggling to get the same tests working that are in the react repository. The differences revolve around the expectPlotlyAPICall test function and I’m sure it’s related to the fact that I wrote the solidjs version using TS which I’m not very good at yet. For docs the README pages need to be updated.
105 replies