Skip to content

Fix for Octane this.$() deprecation #109

@edprats

Description

@edprats

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions