user1417835
user1417835

Reputation: 1012

Rally App SDK 2.0: Create a searchable, but not editable rallytagpicker

I believe that the rallytagpicker is definitely a useful component. However, I do not see any config field that would allow me to prevent users from being able to create new tags, while still maintaining the search functionality. Is there such a config? Or is it a necessary trade-off between functionality?

Upvotes: 0

Views: 197

Answers (3)

ben.rally
ben.rally

Reputation: 497

Better solution than my previous hack:

Ext.create('Ext.Container', {
     items: [{
         xtype: 'rallymultiobjectpicker',
         modelType: 'tag'
     }],
     renderTo: Ext.getBody().dom
 });

or

Ext.create('Rally.ui.picker.MultiObjectPicker', {
    modelType: 'tag'
});

That will get you a searchable tag picker without the add capability.

Upvotes: 3

ben.rally
ben.rally

Reputation: 497

Here's a workaround that worked in the TagPicker's code editor in the API, by overriding the private method _showAddNew to be an empty function.

Ext.create('Ext.Container', {
     items: [{
         xtype: 'rallytagpicker',
         autoExpand: true,
         toolTipConfig: null,
         _showAddNew: Ext.emptyFn
     }],
     renderTo: Ext.getBody().dom
 });

It also removes the tool tip that displays when the user clicks into the search input.

Upvotes: 0

limscoder
limscoder

Reputation: 3167

I don't think the permission system differentiates between tag assignment and tag creation at this time.

Upvotes: 1

Related Questions