themesberg / flowbite-svelte

Official Svelte components built for Flowbite and Tailwind CSS
https://flowbite-svelte.com
MIT License
2.13k stars 262 forks source link

Tabs component prevents api fetches inside the components #1281

Open brobee opened 6 months ago

brobee commented 6 months ago

Describe the bug

Hello,

I have 4 tabs, each tabs shows a component with a Table. Data for tables are stored in a writable store and I use that data.

However I noticed on my network tab in my browser, fetch are working for only the activate tab, not all of them.

It's flowbite related thing because with bootstrap tab components, exactly the same implementation (store, fetch etc.) are works well and no matter which tab is selected, all api calls are done at the same time and appears in the DOM.

Is it a bug, or just miss something with the usage of Tabs/TabItems?

<Tabs style="underline">
    <TabItem open title="list1">
        <List1 />
    </TabItem>
    <TabItem title="list2">
        <List2 />
    </TabItem>
    <TabItem title="list3>
        <List3 />
    </TabItem>
</Tabs>

Flowbite version and System Info

"flowbite": "^1.6.3",
"flowbite-svelte": "^0.29.13",
"flowbite-svelte-blocks": "^0.1.6",
shinokada commented 6 months ago

Can you try it with the latest version?

brobee commented 6 months ago

Same thing, nothing changed only active tabs are refreshed.