Show / Hide Table of Contents

Search

Localization

We have localization for the Family Tree JS Serach option. You just have to set the SEARCH_PLACEHOLDER constant with the required value:

 
FamilyTree.SEARCH_PLACEHOLDER = "Chercher"; // the default value is "Search"
    var family = new FamilyTree(document.getElementById("tree"), {
        ...
    });

Enable or Disable Search

You can disable the Family Tree JS Serach option, setting the enableSearch option to false. It is enabled(true) by default.

 
    var family = new FamilyTree(document.getElementById("tree"), {
        enableSearch: false,
        ...
    });

Search in particular fields

You can Search in the fields defined in searchFields. By default the fuction search in all the fields.

 
    var family = new FamilyTree(document.getElementById("tree"), {
        searchFields: ["name", "birthDate", etc...],
        ...
    });

Search using a function

You can use the search function to search in the tree.

family.search(value, searchInFileds, retrieveFields);

 
    family.search("c", ["Name"], ["Name"]);