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

[@types/selectize]: Missing parameters $input and settings #69530

Open
AndreEckner opened this issue May 6, 2024 Discussed in #69529 · 0 comments
Open

[@types/selectize]: Missing parameters $input and settings #69530

AndreEckner opened this issue May 6, 2024 Discussed in #69529 · 0 comments

Comments

@AndreEckner
Copy link

Discussed in #69529

Originally posted by AndreEckner May 6, 2024
The main Object Selectize.IApi needs the following attributes:
$input - the original JQuery-Object, that was turned into a Selectize-Object
settings - the settings of the current IApi object

From the original JS-code (https://github.com/selectize/selectize.js/blob/master/dist/js/selectize.js):

var Selectize = function($input, settings) {
	var key, i, n, dir, input, self = this;
	input = $input[0];
	input.selectize = self;

	var computedStyle = window.getComputedStyle && window.getComputedStyle(input, null);
	dir = computedStyle ? computedStyle.getPropertyValue('direction') : input.currentStyle && input.currentStyle.direction;
  dir = dir || $input.parents('[dir]:first').attr('dir') || '';

  self.settings = {};

	$.extend(self, {
		order            : 0,
		settings         : settings,                                 // <--
		$input           : $input,                                    // <--
		tabIndex         : $input.attr('tabindex') || '',
		....

Without these two some essential handling of selectize isn't possible.

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

1 participant