Our state of the art Gantt chart


Post by Gowtham »

We need to default a particular tab on the Task Editor. Any idea on how to focus on the particular tab by default or it will also be dynamic.

On Right Click menu we have "Edit Resource" instead of just edit -> when click on it we have to open the Task editor popup with the "Resource tab" focused / Activetab Item.

Attachments
TabDefaulting.png
TabDefaulting.png (45.77 KiB) Viewed 475 times

Post by pmiklashevich »

See the config and the property:
https://www.bryntum.com/docs/gantt/#Core/widget/TabPanel#config-activeTab
https://www.bryntum.com/docs/gantt/#Core/widget/TabPanel#property-activeTab

You can preconfigure the default tab, or change the active tab from the code

Pavlo Miklashevych
Sr. Frontend Developer


Post by Gowtham »

pmiklashevich wrote: Mon Apr 12, 2021 4:50 pm

See the config and the property:
https://www.bryntum.com/docs/gantt/#Core/widget/TabPanel#config-activeTab
https://www.bryntum.com/docs/gantt/#Core/widget/TabPanel#property-activeTab

You can preconfigure the default tab, or change the active tab from the code

There is no such config or properties for TaskEdit

https://www.bryntum.com/docs/gantt/#Gantt/feature/TaskEdit#configs
https://www.bryntum.com/docs/gantt/#Gantt/feature/TaskEdit#properties

gantt.taskEdit.editorConfig.activeTab=2
gantt.taskEdit.activeTab=2

Also we have some hidden Bryntum tabs and added custom tabs like below

taskEdit: {
    cls: "taskeditstyle",
    activeTab: 2,
    editorConfig: {
        activeTab: 2
    },
    items: {
        deleteButton: false,
        generalTab: false,
        predecessorsTab: false,
        	TabOne:{
			type:"TabOne",
			title:"Tab One"
			weight:10
		}
		TabTwo:{
			type:"TabTwo",
			title:"My Tab"
			weight:10
		}
    }
}

If we want to select the TabTwo as selectedTab what needs to be handled?
As I mentioned there is no such config called activeTab (also index will be another problem when hiding the gantt tabs visually)


Post by alex.l »

Please check this thread viewtopic.php?f=52&t=16826&p=83684

this.gantt.instance.on('beforeTaskEditShow', ({ editor }) {
    const desiredTabIndex = 3;
    editor.widgetMap.tabs.activeTab = desiredTabIndex;
})

All the best,
Alex


Post Reply