Closed edwinhageman closed 9 years ago
Looks good. However I think you can already achieve your example with the code below. Check Send additional values in docs for better explanation.
$("#select2").remoteChained({
parents : "#select1",
url : "/api/endpoint",
depends : "#otherInput"
});
That said, I can see there might be other uses cases for url
as a function. Let's keep this open while I do some thinkingl
You're right, I was under the impression I could only use depends on other jquery_chained elements.
I needed a way to add custom parameters to the url based on the value of other input fields. This little change makes it possible to pass a callback function to the url option which should return the url without breaking backwards compatibility.
example:
If you like this functionality but its missing something or you would like to see it implemented in some other way let me know and I will make some time to look into it.