ember-cli-jstree
ember-cli-jstree copied to clipboard
Fix for Octane this.$() deprecation
In Ember Octane, new deprecation warnings are shown because this add-on uses jQuery.
Using this.$() in a component has been deprecated, consider using this.element [deprecation id: ember-views.curly-components.jquery-element]
Solution:
- Import Jquery
// old
import $ from "jquery";
// new
import jQuery from 'jquery';
- Change invocation
// old
_setupJsTree() {
return this.$().jstree(this._buildConfig());
},
// new
_setupJsTree() {
return $(this.element).jstree(this._buildConfig());
},
thanks!
Looks like ember-cli-jstree is outdated and abandoned.