Page 1 of 1

[REACT] Hide Units Column on resourceassignments

Posted: Fri Apr 16, 2021 8:00 pm
by ggalipeau

Is there any configuration to hide the Units column on the resourceassignments picker? If not, is there any other way to remove that (i.e.: through listeners)?


Re: [REACT] Hide Units Column on resourceassignments

Posted: Sat Apr 17, 2021 9:27 am
by mats

Yes sure, please see docs for ResourceAssignmentColumn which has a AssignmentField as its editor: https://bryntum.com/docs/gantt/#Gantt/column/ResourceAssignmentColumn#config-editor

Using the editor config you can configure the https://bryntum.com/docs/gantt/#Gantt/widget/AssignmentField#config-picker (which is an AssignmentGrid)

And https://bryntum.com/docs/gantt/#Gantt/widget/AssignmentGrid has a https://bryntum.com/docs/gantt/#Gantt/widget/AssignmentGrid#config-unitsColumn config you can use to add:

{ hidden : true }

Re: [REACT] Hide Units Column on resourceassignments

Posted: Mon Apr 19, 2021 11:49 pm
by ggalipeau

Hi Mats,
I tried the following:

   columns={[
   	{ type : 'resourceassignment', text: 'Owner(s)', width : 120, 
		picker: {
			unitsColumn: {hidden: true }
		}
   	}
   ]}

But, the units column is still showing. Do you see any issues with the code above?


Re: [REACT] Hide Units Column on resourceassignments

Posted: Tue Apr 20, 2021 7:55 am
by mats

Yes, you forgot to define this in the 'editor' block:

   columns={[
   	{ type : 'resourceassignment', text: 'Owner(s)', width : 120, 
		editor : {
		    picker: {
		 	unitsColumn: {hidden: true }
		    }
		}
   	}
   ]}