thisbeyond
thisbeyond
SSolidJS
Created by Mr Void on 1/6/2024 in #support
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
SSolidJS
Created by Basil on 1/4/2024 in #support
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
SSolidJS
Created by nerotide on 12/26/2023 in #support
Dragging rectangles impossible? (tried to build a timeline component)
7 replies
SSolidJS
Created by Mant on 7/26/2023 in #support
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
SSolidJS
Created by GraysonT on 6/30/2023 in #support
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
SSolidJS
Created by Robin Lindner on 3/4/2023 in #support
Modal Implementation
Yeah, this is rough and ready approach if you don't want lots of functionality / animation.
11 replies
SSolidJS
Created by Robin Lindner on 3/4/2023 in #support
Modal Implementation
I then set modal in a shared context from anywhere in the app.
11 replies
SSolidJS
Created by Robin Lindner on 3/4/2023 in #support
Modal Implementation
I roughly do this in a modals component:
  const isOpen = () => api.getActiveModal() !== null;

  return (
    <Show when={isOpen()}>
<ModalOverlay ref={element} onClick={onClick}>
         <Dynamic {...(api.getActiveModal())} />
      </ModalOverlay>
    </Show>
)
  const isOpen = () => api.getActiveModal() !== null;

  return (
    <Show when={isOpen()}>
<ModalOverlay ref={element} onClick={onClick}>
         <Dynamic {...(api.getActiveModal())} />
      </ModalOverlay>
    </Show>
)
11 replies
SSolidJS
Created by davedbase on 2/15/2023 in #support
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
SSolidJS
Created by FutureLights on 1/15/2023 in #support
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
SSolidJS
Created by Nin on 12/4/2022 in #support
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