discourse-data-explorer/assets/javascripts/discourse/components/explorer-schema-enuminfo.js...

18 lines
379 B
Plaintext
Raw Normal View History

import { default as computed } from "ember-addons/ember-computed-decorators";
2015-07-09 18:46:19 -04:00
export default Ember.Component.extend({
2018-10-10 07:56:23 -04:00
tagName: "ol",
2015-07-09 18:46:19 -04:00
@computed("col.enum")
enuminfo(hash) {
2015-07-09 18:46:19 -04:00
let result = [];
for (let key in hash) {
2018-10-10 07:56:23 -04:00
if (!hash.hasOwnProperty(key)) {
continue;
}
result.push({ value: key, name: hash[key] });
2015-07-09 18:46:19 -04:00
}
return result;
}
2015-07-09 18:46:19 -04:00
});