thisbeyond
How to keep store in sync with supabase's multitab session?
Listening to storage seems sensible to me. Another option would be to explicitly communicate between your tabs using the broadcast api: https://developer.mozilla.org/en-US/docs/Web/API/Broadcast_Channel_API
3 replies
Good library for handling combobox-style search UI? (with Pagefind)
I created https://solid-select.com/ a while back. Might be of use here? Supports calling out to another resource to populate results. Likely not as good on accessibility as Kobalte though.
4 replies
Dragging rectangles impossible? (tried to build a timeline component)
This might be useful: https://solid-dnd.com/?example=Sortable%2520list%2520%28horizontal%29
7 replies
Scroll & Drag Solid DND
solid-dnd doesn't currently support this out of the box, though it is an issue I'll pickup again soon ( https://github.com/thisbeyond/solid-dnd/issues/57 )
In the meantime, have a play with custom transformers to see if that might be a viable approach.
2 replies
Solid Bootstrap Data Table
I've looked at a few myself, but tend to build my own as it's just easier to get what I want that way. My data table with dynamic columns, custom formatting (inc action buttons on columns), sorting, filtering, grouping, summary rows and row selection is ~300 lines of code, easy to maintain and performant. I say this just to call out it's pretty straightforward these days to roll your own with low cost.
If you're a larger team then maybe it makes sense to use tanstack or something.
5 replies
Strategies for not calling setters in effects
I'm not particularly fussed about setters in effects. I believe they require more care to avoid loops and unintended side effects, but can be useful.
For your specific example though I would choose to model state globally and derive from that. E.g the action that opens the model is setting some global state (
state.activeModal
), the modal then reacts to that to be shown and equally so can anything else (e.g. showHeader = () =>!state.activeModal
)22 replies
Solid JS force rerender on signal change
Typically you'd need to force the browser to re-evaluate styles (e.g. by requesting getComputedStyle or something), but note that could negatively affect performance. Raf can work too.
Alternatively, get a ref to the element and kick off an animation explicitly.
4 replies
Rerender child component with updated props
If an effect doesn't access a reactive signal on evaluation then it won't be tracking it for the next reaction. So in your case, if the
if
evaluates falsely then you won't track query, pageSize or totalPages for the next iteration.
If you want to, then access them outside the if
first (or use on
helper for explicit tracking).34 replies