BALKANGraph / FamilyTreeJS

Build family tree app with BALKAN FamilyTreeJS library. Family Tree also called a genealogy or a pedigree chart, is a chart representing family relationships in a conventional tree structure.
50 stars 16 forks source link

Editable and non-editable items in editUI #52

Closed aespogom closed 1 year ago

aespogom commented 1 year ago

Hi everyone! I am building a tree in Angular 13. I would like to know if it is possible to disable some inputs from editUI but not all of them. My configuration now is: `

  chart = new FamilyTree(tree, {
            template: 'john',
            orderBy: "birthday" ,
            lazyLoading: true,
            enableSearch: false,
            mouseScrool: FamilyTree.action.ctrlZoom,
            orientation: FamilyTree.orientation.top,
            editForm: {
              generateElementsFromFields: false,
              addMore: null,
              addMoreBtn: null,
              addMoreFieldName: null,
              elements: [
                { type: 'textbox', label: 'HDL', binding: 'hdl'},
                { type: 'textbox', label: 'LDL', binding: 'ldl'},
                { type: 'textbox', label: 'Custom', binding: 'custom', vlidators: { required: 'Is required'}}
              ],
             ...

`

What I want to do is to be able to edit "custom" but disable "HDL" and "LDL" fields.

image

I did not find anything in the documentation. Thank you for your help!!

ZornitsaPesheva commented 1 year ago

Here is an example: https://code.balkan.app/family-tree-js/read-only-element#JS

aespogom commented 1 year ago

Works smoothly! Thank you so much for your help! Have a great week