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

Create iteration mapper collectionList for CollectionAccessible #403

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import React from 'react';
import { TableVm } from '@/core/providers';

export const CollectionAccessible: React.FC = () => {
interface Props {
table: TableVm;
}
export const CollectionAccessible: React.FC<Props> = props => {
//Todo: #388 Canvas Accessible-collection(https://github.com/Lemoncode/mongo-modeler/issues/388)
//Todo: #389 Canvas Accessible-iterate over fields(https://github.com/Lemoncode/mongo-modeler/issues/389)
console.log(props.table);

return (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@ import { TableVm } from '@/core/providers';
interface Props {
collectionList: TableVm[];
}

export const CollectionListAccessible: React.FC<Props> = props => {
const { collectionList } = props;
// Todo: #379Canvas Accessible-Iterate over collections (https://github.com/Lemoncode/mongo-modeler/issues/379)

return (
<>
<h2>Collections</h2>
{/* Delete the collectionList[0].id, this is just to avoid typescript errors */}
{collectionList[0].id}
<CollectionAccessible />

{collectionList.map(table => (
<CollectionAccessible table={table} />
))}

{/* Code bellow only is just an example. We need do it mapping the real data
and with TableAccessible component. IMPORTANT: we don't need divs!*/}
Expand Down
Loading