Comments (9)
from react-family-tree.
Hi,
Not sure what the problem is. If you need add child for one spouse only, just do it.
from react-family-tree.
@SanichKotikov please check this https://codesandbox.io/s/weevusissue-uvuk0 . In child-issue option I have added one child to female node but it can not appearing.
from react-family-tree.
I see only 3 nodes in the json file, but u want to see 4. Nodes will not appear out of nothing.
from react-family-tree.
I was testing it. please check that now.There is added one children with only one parent in their parents list.
from react-family-tree.
@SanichKotikov here is JSON data that i am using for that
[ { "id": "aoF9dn5Ew", "gender": "male", "spouses": [ { "id": "tdRwdtR54", "type": "divorced" } ], "siblings": [], "parents": [], "children": [ { "id": "dyTpfj6st", "type": "blood" } ] }, { "id": "tdRwdtR54", "gender": "female", "parents": [], "siblings": [], "spouses": [ { "id": "aoF9dn5Ew", "type": "divorced" } ], "children": [ { "id": "dyTpfj6st", "type": "blood" }, { "id": "dyTpfj6st_single", "type": "blood" } ] }, { "id": "dyTpfj6st", "gender": "male", "spouses": [], "siblings": [], "parents": [ { "id": "aoF9dn5Ew", "type": "blood" } ], "children": [] }, { "id": "dyTpfj6st_single", "gender": "male", "spouses": [], "siblings": [], "parents": [ { "id": "tdRwdtR54", "type": "blood" } ], "children": [] } ]
https://codesandbox.io/s/weevusissue-uvuk0
from react-family-tree.
This is impossible in current version of the library. I'll add this case to my roadmap and will try to implement when I have some time. Right now, as a workaround, you have to define second parent (with another type of spouse relation) for this hidden node.
from react-family-tree.
Ok thanks
from react-family-tree.
Great library, thanks for making it open source.
... define second parent (with another type of spouse relation) for this hidden node.
@divbhalala were you able to get this to work?
I'm trying but not sure if it's actually possible. Is this what you had in mind?
Nodes:
[
{
id: 'father',
gender: 'male',
children: [
{ id: 'child-1', type: 'blood' },
{ id: 'child-2', type: 'blood' },
],
parents: [],
siblings: [],
spouses: [
{ id: 'spouse-1', type: 'married' },
{ id: 'spouse-2', type: 'divorced' },
],
},
{
id: 'spouse-1',
gender: 'female',
children: [{ id: 'child-1', type: 'blood' }],
parents: [],
siblings: [],
spouses: [{ id: 'father', type: 'married' }],
},
{
id: 'spouse-2',
gender: 'female',
children: [{ id: 'child-2', type: 'blood' }],
parents: [],
siblings: [],
spouses: [{ id: 'father', type: 'divorced' }],
},
{
id: 'child-1',
gender: 'male',
children: [],
parents: [
{ id: 'father', type: 'blood' },
{ id: 'spouse-1', type: 'blood' },
],
siblings: [{ id: 'child-2', type: 'half' }],
spouses: [],
},
{
id: 'child-2',
gender: 'male',
children: [],
parents: [
{ id: 'father', type: 'blood' },
{ id: 'spouse-2', type: 'blood' },
],
siblings: [{ id: 'child-1', type: 'half' }],
spouses: [],
},
]
from react-family-tree.
Related Issues (20)
- please I need your help for doing some integrations HOT 1
- Doc
- Family Tree Nodes are not being translated HOT 1
- Uncaught SyntaxError: Cannot use import statement outside a module HOT 2
- Nodes are overlapping
- Throws Error when used in nextjs HOT 2
- Subtitles and audio layers HOT 1
- Visualizing Divorce HOT 3
- Example data structure HOT 1
- Can't click detail on mobile HOT 3
- Spouse position is not suitable HOT 2
- is it possible to change the connector of the tree from left to right(Horizontal) HOT 4
- Tree view stretched too much HOT 2
- Question of building a tree
- Can you provide a working example with code? HOT 1
- How to increase connector thicknesss? HOT 3
- Weird behaviour with shared parents on changing the root HOT 9
- Displaying uncle during Child as root node HOT 4
- I want to display uncle node when child-node is at root HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-family-tree.