Files
discourse-data-explorer/assets/javascripts/discourse/components/explorer-schema-onetable.js.es6
T
2019-01-22 17:19:01 +05:30

23 lines
514 B
JavaScript

export default Ember.Component.extend({
classNameBindings: [":schema-table", "open"],
tagName: "li",
open: Ember.computed.alias("table.open"),
_bindClicks: function() {
const self = this;
this.$()
.find(".schema-table-name")
.click(function(e) {
self.set("open", !self.get("open"));
e.preventDefault();
});
}.on("didInsertElement"),
_cleanup: function() {
this.$()
.find(".schema-table-name")
.off("click");
}.on("willDestroyElement")
});