Closed
Description
I'm working with remote query dropdown lists and I've noticed that the custom field key setting for values is not working... It gets completely ignored in fact. I don't know the Semantic UI codebase well enough to issue a pull request and I might break other things but perhaps someone else can fix it?
Example... Setting the field keys.
$('.ui.dropdown').dropdown('setting', {
apiSettings: {
url: '<api_url>',
},
fields: {
values: 'results', // Custom set result key
name: 'name',
value: 'id'
}
});
In the combined semantic-ui.js file on line 4778. The code currently looks like this.
onSuccess : function(response) {
module.remove.message();
module.setup.menu({
values: response.results // This is HARD CODED to results. Should take value from custom defined key
});
callback();
}
Let me know if this needs explaining further or if I'm wrong... I've hacked the code to work for me now.