-
Notifications
You must be signed in to change notification settings - Fork 542
feat: add array column type #1045
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
Conversation
|
@jyash97 is attempting to deploy a commit to the Rowy Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
| icon: <DataArrayIcon />, | ||
| settings: Settings, | ||
| description: | ||
| "Connects to a sub-table in the current row. Also displays number of rows inside the sub-table. Max sub-table depth: 100.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need description
| description: | ||
| "Connects to a sub-table in the current row. Also displays number of rows inside the sub-table. Max sub-table depth: 100.", | ||
| TableCell: withRenderTableCell(DisplayCell, SideDrawerField, "popover", { | ||
| popoverProps: { PaperProps: { sx: { p: 1, minWidth: "200px" } } }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went with the popover approach because the sub-table approach opens a Modal from the bottom, and thus the user loses the context of the row since he has to close the modal to see the row and the Modal breaks the flow, IMO Popover approach seems to be simple steps to go with. Let me know I can use modal in case this isn't what we want
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can try embedding the table component inside the popover, however providing a way to configure the column schema might be more challenging
| <CodeEditor | ||
| defaultLanguage="json" | ||
| value={JSON.stringify(value) || "{\n \n}"} | ||
| onChange={(v) => { | ||
| try { | ||
| if (v) onChange(JSON.parse(v)); | ||
| } catch (e) { | ||
| console.log(`Failed to parse JSON: ${e}`); | ||
| } | ||
| }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be used to add array of objects
|
Need to add delete field option |
|
Hi @ jyash97, this column type is an interesting idea. It could be helpful in some cases, especially if we add support for Rowy column types, not just the base types. |
|
Thanks for the review. I think the issue needs to be more informative since it doesn't focus on the structured JSON data and just mentions array fields. Now I have a better understanding of what the issue is about, tho I have a few questions:
|
|
Closing this because of inactivity and the PR does not solve the issue of adding schema and adding/editing an array of object. |
Potential fix for #959