Improve input element selection logic#52
Improve input element selection logic#52fglueck wants to merge 3 commits intobrainfoolong:masterfrom
Conversation
allows something like this:
FormDataJson.toJson($(':input:not(.no_filter,button,[name="pool[]"])','#filter'),{includeDisabled: true, uncheckedValue: 0})
|
Hi. Thanks for your PR. Unfortunately, this is not something i can merge. First, it contains bugs Second, it is not supposed to work like that. Such a feature is already implemented with an option parameter. To filter out any inputs from the list, you can use |
|
Argh... sorry, thats true. But I don't want to filter Elements, I want to generate a json about different elements from different scopes. |
|
I understand. I will think about another solution that do not create a bit of an ambiguous state by this kind of type checking. Currently your change, even if the bug is fixed, does expect that when jQuery object is passed, it always think just one element is required to be a It will need some time for it, but there will be a solution, sooner or later. |
Refactor input handling to support jQuery objects and improve clarity.
Refactor input handling to support array of elements.
|
Now, it is possible that checkEl is a already a array (list of elements) or an jquery array or old behavior.... |
|
Now you actually introduced a new bug when just passing a normal string (selector). Don't bother fixing it, i'll implement another logic. |
|
I am ashamed, I tested only with array and jquery elements... |
allows something like this:
FormDataJson.toJson($(':input:not(.no_filter,button,[name="pool[]"])','#filter'),{includeDisabled: true, uncheckedValue: 0})