useEditableTable short glitch
I'm looking at
useEditableTable
from antd and the thing is there is a short glitch when pressing edit on a row after another for a second the form is populated with previous rows data. this can be seen even in the example https://refine.dev/docs/api-reference/antd/hooks/table/useEditableTable/#basic-usage. just pres on edit on first row then on the second row.useEditableTable | refine
useEditeableTable allows you to implement the edit feature on the
with ease and returns properties that can be used on Ant Desing's and
components.10 Replies
Hi @generatedcode. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Hmm, I don't know enough to give you a confident answer yet. However, I can tell you that the
useEditableTable
hook from refine is designed to make it easy to implement the edit feature on the Ant Design's Table
and Form
components. It returns properties that can be used on these components, including formProps
and tableProps
objects.
When a user clicks on the edit button, isEditing(lineId)
will turn true
for the relevant line. This will also cause TextInput
to show up on the line that's being edited. When the editing is finished, a new value can be saved by clicking SaveButton
.
If you're experiencing a glitch, it might be worth checking your implementation against the documentation for useEditableTable()
(https://refine.dev/docs/api-reference/antd/hooks/table/useEditableTable/). If the issue persists, it could be a bug and you might want to consider reporting it to the refine team.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@942815784479113277> kapa.ai is still learning and improving, please let us know how it did by reacting below
Hey @generatedcode ,
We are glad to see you! You're right. Would you like to create a GitHub issue for this?
genetic-orangeOP•17mo ago
@Omer Sure I can do that tomorrow. I was not sure if its andt or refine issue. (Thanks for the all the good work with refine btw)
just a bit more context adding
shouldUpdate
on the <Form.Item shouldUpdate ...rest of the props>
helps a bit: the glitch is only very first time per row. But I will document it all in a GH issueThank you so much for the context, it will definitely help while dealing with this issue 🍻
Excuse my curiosity, what kind of projects do you develop with refine?
If it's private, you can send a DM 🙂
genetic-orangeOP•17mo ago
It's not private. Internal tooling and admin. (anything that used to be with react-admin😂 ) . whenever the database is quite a bit 50 + models it;s worth automating. in terms of type of project custom ERP like
I'm also testing refine for small showcases for my backend builder useGenerated.com (NestJS + Prisma Orm + GraphQL ) - building a CRUD GraphQL instant
Oops, that sounds cool. We're working on a new backend feature set for enterprises. I'd love to get your thoughts. Would that be something you or your company would be into?
genetic-orangeOP•17mo ago
I would surely like to se it. Now as of the company i work for they are a startup not that much of an enterprise. Also worth noting is that useGenerated is just my own project and it doesn't belong to the company I work for
Yep, I know. Can you add me on LinkedIn? https://www.linkedin.com/in/%C3%B6mer-aplak-14b87099/
genetic-orangeOP•17mo ago
just wrote. we were already connected