Closed pkmccaffrey closed 9 years ago
@svtguy88 - it is not possible currently, as the binding configures its own change
and select
handlers. It wouldn't be too much work to ensure that any passed in change
and select
handlers are also called within the bindings own versions of them. Do you have any interest in potentially creating a pull request with this functionality?
Wow - thanks for an unbelievably fast reply. Also, hello from a fellow Wisconsinite.
That being said, no problem. I'll make the changes, get everything working in my project and then submit a pull request. Are you thinking the code should use the passed in handlers to totally replace the binding's implementations, or be used in addition to them?
Realistically, I'll probably have it done shortly after the holidays. Maybe sooner if I find some free time in the coming days.
@svtguy88 - I had a moment to work on this, so I made these changes in the latest version. Let me know if you run into any issues. Thanks!
@rniemeyer - I'll try it out today, and let you know if I run into any issues. It looks like it should do exactly what I was looking for. Thanks again!
Is it possible to override some of the base configuration (
select
,change
, etc.)? I want to force the user to select a value from the list, and not allow free-form text entry.My basic idea is to pass in my
change
function to the globalko.bindingHandlers.jqAuto.options
object as follows:When the binding initializes, it extends my options over the
config
object (line 20):But it then redefines
config.change
before initializing the Autocomplete plugin, effectively throwing my change function away (line 53):Is there a way to achieve the functionality that I want without modifying the binding code? If not, it's not the end of the world, but I'd like to keep my binding up to date with what is in this repo.
Please let me know if anything is unclear.