ember-cli-jstree icon indicating copy to clipboard operation
ember-cli-jstree copied to clipboard

Fix for Octane this.$() deprecation

Open edprats opened this issue 5 years ago • 1 comments

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!

edprats avatar Jun 10 '20 19:06 edprats

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

tythewebguy avatar Jul 13 '23 16:07 tythewebguy