gantt-task-react-powern 0.4.42 → 0.4.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -354,6 +354,7 @@ var TaskListTableDefault = function TaskListTableDefault(_ref) {
354
354
  var rowHeight = _ref.rowHeight,
355
355
  rowWidth = _ref.rowWidth,
356
356
  tasks = _ref.tasks,
357
+ leafTasks = _ref.leafTasks,
357
358
  fontFamily = _ref.fontFamily,
358
359
  fontSize = _ref.fontSize,
359
360
  locale = _ref.locale,
@@ -365,6 +366,11 @@ var TaskListTableDefault = function TaskListTableDefault(_ref) {
365
366
  var toLocaleDateString = useMemo(function () {
366
367
  return toLocaleDateStringFactory(locale);
367
368
  }, [locale]);
369
+ var leafTaskIds = useMemo(function () {
370
+ return new Set(leafTasks.map(function (t) {
371
+ return t.id;
372
+ }));
373
+ }, [leafTasks]);
368
374
  return React.createElement("div", {
369
375
  className: styles$1.taskListWrapper,
370
376
  style: {
@@ -374,7 +380,7 @@ var TaskListTableDefault = function TaskListTableDefault(_ref) {
374
380
  }, tasks.map(function (t) {
375
381
  var expanderSymbol = "";
376
382
 
377
- if (t.childrenCount && t.childrenCount > 0) {
383
+ if (!leafTaskIds.has(t.id)) {
378
384
  if (t.hideChildren === false) {
379
385
  expanderSymbol = "▼";
380
386
  } else if (t.hideChildren === true) {
@@ -601,6 +607,7 @@ var TaskList = function TaskList(_ref) {
601
607
  rowHeight = _ref.rowHeight,
602
608
  scrollY = _ref.scrollY,
603
609
  tasks = _ref.tasks,
610
+ leafTasks = _ref.leafTasks,
604
611
  selectedTask = _ref.selectedTask,
605
612
  setSelectedTask = _ref.setSelectedTask,
606
613
  onExpanderClick = _ref.onExpanderClick,
@@ -630,6 +637,7 @@ var TaskList = function TaskList(_ref) {
630
637
  fontFamily: fontFamily,
631
638
  fontSize: fontSize,
632
639
  tasks: tasks,
640
+ leafTasks: leafTasks,
633
641
  locale: locale,
634
642
  selectedTaskId: selectedTaskId,
635
643
  setSelectedTask: setSelectedTask,
@@ -2804,6 +2812,7 @@ var Gantt = function Gantt(_ref) {
2804
2812
  fontFamily: fontFamily,
2805
2813
  fontSize: fontSize,
2806
2814
  tasks: barTasks,
2815
+ leafTasks: leafTasks,
2807
2816
  locale: locale,
2808
2817
  headerHeight: headerHeight,
2809
2818
  scrollY: scrollY,