Open danhnguyeen opened 1 week ago
Hi @danhnguyeen,
Do you want something like an editable table or just a component to display data in a table?
Hi @danhnguyeen,
Do you want something like an editable table or just a component to display data in a table?
Hi @optimajet,
Thanks for your reply. For now, I just need a simple table that allows users to define the number of columns and rows. Each table cell should be a node so users can drag and drop any existing components into it.
Is it possible?
Thank you
Basically, we have something similar to what you need to create such a component. If you look at the Wizard component, you will see that there is a labels property inside the Wizard component. When new items are added, new steps are added to the Wizard. Each step is a separate child component that has a node
inside it for adding components.
And you can dynamically change the number of rows and columns based on changing the component properties.
There are some important points:
If you want to try this approach - we can share the code of the Wizard component.
We also have plans to add a similar component based on the Repeater component. Only the number of rows in the table will be adjusted dynamically based on the Repeater component data.
@danhnguyeen Here is a part of the source code of @react-form-builder/components-rsuite package.
@optimajet Thank you. I will take a look at it
Hi there,
Do you have any plans for Table components? I tried implementing it with a custom component as bellow, but it still didn’t work as expected.
The issue in my code is that the number of
cell${rowIndex}${colIndex}
elements is fixed. I’m not sure how to dynamically render nodes based on flexible column/row inputs.I’m considering allowing users to input the number of columns and rows before rendering the table. However, I haven’t been able to make it work yet