Our state of the art Gantt chart


Post by ringsy »

Hi,
We have a tile section in our project, where we filter record based on a condition.
On click of the tile the parent record will be filtered out . We want the parent to open all the nodes. I have shared the code below.

  {
      id: 4,
      text: "FILTER",
      filterFn: (record) => {
        if (record.get("flag") !== parent) {
          return false;
        }
        let promisedDate = record.get("promiseddate"),
          endDate = record.get("endDate");
        if (promisedDate instanceof Date) {
          return promisedDate < endDate;
        } else {
          return new Date(promisedDate) < endDate;
        }
      },
      countFn: (record) => {
        if (record.get("flag") !== parent) {
          return false;
        }
        let promisedDate = record.get("promiseddate"),
          endDate = record.get("endDate");
        if (promisedDate instanceof Date) {
          return promisedDate < endDate;
        } else {
          return new Date(promisedDate) < endDate;
        }
      },
    },

How can I filter so that I can get along with the corresponding children nodes


Post by mats »

Please clarify: You want to filter out the parent but keep the children of the filtered out parent?


Post by ringsy »

yes mats , we want the children also to be shown


Post by mats »

Ok can you please share a mockup and describe the data you are filtering?


Post Reply