Skip to content

[Bug]: discrepancy between doc and ts typings for the property controlInput #893

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

Open
R1Daneel opened this issue Feb 26, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@R1Daneel
Copy link

R1Daneel commented Feb 26, 2025

Bug description

The documentation states that null is a valid value for the controlInput setting:

description Type Default
Supply a custom element. Supplying a null value will disable the default functionality. NodeDefinition|null <input...>

However, the TypeScript typings specify that controlInput can only be of type string |HTMLInputElement, with no mention of null: https://github.com/orchidjs/tom-select/blob/master/src/types/settings.ts#L62

Expected behavior

Either:
1. The documentation should be corrected if null is not actually a valid value.
2. The TypeScript definition should be updated to include null if it is indeed a valid option.

Could you confirm the intended behavior so that we can align the documentation and typings accordingly?

@R1Daneel R1Daneel added the bug Something isn't working label Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant