ritesh83 / ember-cli-jstree

ember-cli addon for jstree
http://ritesh83.github.io/ember-cli-jstree/#/static
MIT License
41 stars 48 forks source link

Fix for Octane this.$() deprecation #109

Open edprats opened 4 years ago

edprats commented 4 years ago

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:

  1. Import Jquery
// old
import $ from "jquery";

// new
import jQuery from 'jquery';
  1. Change invocation
// old
  _setupJsTree() {
    return this.$().jstree(this._buildConfig());
  },

// new
  _setupJsTree() {
    return $(this.element).jstree(this._buildConfig());
  },

thanks!

tythewebguy commented 1 year ago

Looks like ember-cli-jstree is outdated and abandoned.