Picklist entries custom renderer not working

Does anyone see anything wrong with this?
Renderer isn't working. No console errors other than 'Refused to set unsafe header agent'
Seems like somehow the field metadata isn't getting overwritten? I'm just getting the standard values for the picklist. I've watched the rendering in the console, and the picklistEntries array is definitely getting populated with the right values.
Renderer isn't working. No console errors other than 'Refused to set unsafe header agent'
Seems like somehow the field metadata isn't getting overwritten? I'm just getting the standard values for the picklist. I've watched the rendering in the console, and the picklistEntries array is definitely getting populated with the right values.
'renderPRLLists': function(field,value){ value = skuid.utils.decodeHTML(value);
var listModel = skuid.$M('CreatePRL_Lists'),
picklistEntries = [];
$.each(listModel.getRows(),function(i,row) {
picklistEntries.push(
{ value: row.Name, label: row.Name, defaultValue: false, active: true }
);
});
field.metadata.picklistEntries = picklistEntries;
skuid.ui.fieldRenderers.MULTIPICKLIST.edit(field,value);
field.model.updateRow(field.row, field.id, value, {initiatorId: field._GUID});
}
2
Categories
- 7.9K Questions
- 926 Ideas
- 220 Discussion Categories
- 178 General
- 9 Community Feedback
- 3 Community Info
- 18 Knowledge Base
Comments
A few things:
1) I'm assuming you've done this, but have you debugged to make sure that the renderer is getting called and inspected the metadata.picklistEntries before/after establishing the new value?
2) Is there a reason you are calling updateRow in the last line? The value of the field should already be set by the time the renderer is called so I'm not seeing a reason that you need to update the field value?
3) What version of Skuid are you running?
4) Can you try changing the code to use a hardcoded list of values instead of from a model just to rule out a 'data' issue with the model data itself? For example:
1) Yes.
2) No idea what I was thinking there.
3). 8.10
4) I'll do some more digging.
1) 8.10 in both Dev & Prod?
2) Dev is Summer '16 or Spring '16? If Dev is Summer '16, do you you have a Spring '16 SBX that you can test against?
3) For some reason, I remember seeing a thread a while back where Zach mentioned something about overriding picklist values and it not respecting the change and there was a reason. Unfortunately, I can't remember the reason nor can I find the thread right now. I might be remembering incorrectly but for some reason, that memory is sticking out in my head right now.
Zach - Any thoughts? Maybe I'm not remembering correctly?