Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there Realtime support in revo-grid? #676

Open
ekta-7span opened this issue Jan 21, 2025 · 2 comments
Open

Is there Realtime support in revo-grid? #676

ekta-7span opened this issue Jan 21, 2025 · 2 comments

Comments

@ekta-7span
Copy link

I am facing issue for realtime updatein revo-grid table. I am using supabase for fetching data in updating it in revo grid.

let me know if there's any solution for this.

This is my grid component. milestone.tasks has updated data but grid is not updated with latest data.

<VGrid ref="rGrid" :range="true" theme="compact" row-size="40" :columns="columns" :source="milestone.tasks" />

@m2a2x
Copy link
Collaborator

m2a2x commented Jan 21, 2025

Hi @ekta-7span
I need to see how are you updating milestones.tasks
To make grid update (it's reactive) you have to change a reference (pointer) for a source array.

let say

let source = [];
VGrid source = source

.... your update

VGrid source =[...source]

@ekta-7span
Copy link
Author

ekta-7span commented Jan 22, 2025

@m2a2x Here is my component, where revo grid table is used.

<UfTable ref="milestoneListRef" sort-by="date_created" sort-order="asc" :title="'Tasks'" endpoint="milestones" :filters="filters" :params="milestoneParams" :requestHandler="requestHandler" :show-title="false" :is-actionbar-fixed="true" fixed-actionbar-offset="sticky top-0 w-auto" > <template #default="{ items }"> <Accordion v-model:model-value="currentAccordian" type="multiple"> <AccordionItem v-for="(milestone, mIndex) in items" :key="mIndex" :value="milestone.id" @onload="setAccordionOpenIfTaskExist(milestone)" > <template #default="{ isOpen }"> <AccordionContent> <VGrid ref="rGrid" :range="true" theme="compact" row-size="40" :columns="columns" :source="milestone.tasks" /> </AccordionContent> </template> </AccordionItem> </Accordion> </template> </UfTable>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants