Premium support for our pure JavaScript UI components


Post by fellipearb2 »

Hello guys,

I'm using scheduler pro with tree enabled and I have some resources with children items.
So, I assigned some events to the first resource level and I assigned to some childrens too.
Then when I click to edit an event, only the first resource level is displayed in "resources field", the children resources are not displayed.
When I click to see a list of resources I can see an arrow after the resource name, but when I click there, nothing happens.

Could anyone help me?


Post by ghulam.ghous »

Hey,

I have tried to reproduce this issue in our online example here https://bryntum.com/products/schedulerpro/examples-scheduler/tree/ but not able to do so. This example uses single-assignment mode. https://bryntum.com/products/schedulerpro/docs/api/Scheduler/data/mixin/EventStoreMixin#config-singleAssignment

How we can reproduce this issue?


Post by fellipearb2 »

Hi,

I am using multiple assignment mode and then I assign the same event to both the "parent" and the "child".
What I noticed was that if I leave the parameter "expanded: true" everything works fine, but if I start with "expanded: false" then it doesn't work correctly, because I can't see and select the "child" in the edit modal, I can only select the parent.

Gravação de Tela 2024-12-09 às 18.01.29.mov
(3.12 MiB) Downloaded 26 times

I'm sharing my code to reproduce the error:

import React from 'react';
import { BryntumSchedulerPro, BryntumSchedulerProProps } from '@bryntum/schedulerpro-react';
import '@bryntum/schedulerpro/schedulerpro.stockholm.css';

const startDate = '2024-10-01T00:00:00';
const endDate = '2024-10-02T23:59:59';

const SchedulerComponent = () => {
  const resources = [
    {
      id: 'parent1',
      name: 'Parent Resource 1',
      expanded: false,
      children: [
        { id: 'child1', name: 'Child Resource 1' },
        { id: 'child2', name: 'Child Resource 2' }
      ]
    },
    {
      id: 'parent2',
      name: 'Parent Resource 2',
      expanded: true,
      children: [
        { id: 'child3', name: 'Child Resource 3' },
        { id: 'child4', name: 'Child Resource 4' }
      ]
    }
  ];

  const events = [
    { id: 'event1', name: 'Task 1', startDate: '2024-10-01', endDate: '2024-10-02' },
    { id: 'event2', name: 'Task 2', startDate: '2024-10-01', endDate: '2024-10-02' }
  ];

  const assignments = [
    { id: 'a1', resourceId: 'parent1', eventId: 'event1' }, // Atribuição ao pai
    { id: 'a2', resourceId: 'child1', eventId: 'event1' },  // Atribuição ao filho
    { id: 'a3', resourceId: 'parent2', eventId: 'event2' },
    { id: 'a4', resourceId: 'child3', eventId: 'event2' }
  ];

  const schedulerConfig: BryntumSchedulerProProps = {
    startDate,
    endDate,
    viewPreset: 'dayAndWeek',

resources: resources,
events: events,
assignments: assignments,
treeFeature: true,
dependenciesFeature: true,
columns: [
  { type: 'tree', text: 'Resources', field: 'name', width: 200 }
]
  }

  return (
    <div className='h-screen'>
      <BryntumSchedulerPro
        {...schedulerConfig}
      />
    </div>
  );
};

export default SchedulerComponent;

Post by tasnim »

Hey,

Could you please share a runnable test case with us so we can download it on our local machine and reproduce/debug it?


Post by fellipearb2 »

Ok,

you can check it out here: https://codepen.io/fellipearb/pen/ZYzOMqv


Post by marcio »

Hey fellipearb2,

Thanks for sharing the demo, that looks like a bug.

I created a ticket to fix that - https://github.com/bryntum/support/issues/10469 - please watch it to receive live updates.

Best regards,
Márcio

How to ask for help? Please read our Support Policy


Post by fellipearb2 »

Thanks Márcio :D


Post Reply