Discussion
Missing documentation: What does the custom unit parameter "segments" do?
almost 7 years ago by Christian Peters
Hi!
I want to add a custom variant of the name field to my cards.
I figured out I had to add segments: 1 to the config so that it behaves like the other name fields.
Can you explain the concept of segments?
Also I had to hack the class ' tau-board-unit_format_max' into the classId field so I can add my variant to a M sized card. This is my config:
id: 'name_unobtrusive',
classId: 'tau-board-unit_type_name-unobtrusive tau-board-unit_format_max',
name: 'Name (unobtrusive)',
types: [ types.STORY, types.TASK, types.BUG, types.REQUEST ],
sizes: [ sizes.XS, sizes.S, sizes.M, sizes.L, sizes.XL, sizes.List ],
template: {
markup:[
'<% if(this.data.name) { %>',
'<div class="tau-board-unit__value">',
'<%= this.data.name %>',
'</div>',
'<% } %>'
]},
model: 'name:Name',
sampleData: { name: 'Kunden, Callcenter-Agenten und Admins drucken Rechnungen' },
segments: 1
Thanks!
Christian