Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Octane this.$() deprecation #109

Open
edprats opened this issue Jun 10, 2020 · 1 comment
Open

Fix for Octane this.$() deprecation #109

edprats opened this issue Jun 10, 2020 · 1 comment

Comments

@edprats
Copy link

edprats commented Jun 10, 2020

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants