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

18 lines
375 B
JavaScript
Raw Normal View History

2020-02-19 11:57:59 -05:00
import { default as computed } from "discourse-common/utils/decorators";
2015-07-09 15:46:19 -07:00
export default Ember.Component.extend({
2018-10-10 17:26:23 +05:30
tagName: "ol",
2015-07-09 15:46:19 -07:00
@computed("col.enum")
enuminfo(hash) {
2015-07-09 15:46:19 -07:00
let result = [];
for (let key in hash) {
2018-10-10 17:26:23 +05:30
if (!hash.hasOwnProperty(key)) {
continue;
}
result.push({ value: key, name: hash[key] });
2015-07-09 15:46:19 -07:00
}
return result;
2020-09-04 13:23:11 +02:00
},
2015-07-09 15:46:19 -07:00
});