Closed (fixed)
Project:
Multiselect
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
30 Jun 2009 at 13:06 UTC
Updated:
27 Jul 2009 at 06:30 UTC
It would be quite useful to have option-remove/-added events when user remove item from multiselect. I've added the patch for this.
| Comment | File | Size | Author |
|---|---|---|---|
| multiselect.js_.patch | 960 bytes | desunit |
Comments
Comment #1
attheshow commentedCan you give an example of how this might be beneficial to users?
Comment #2
desunit commentedSure. I have 2 multiselect controls one is depend on another. Once I've added item I need to refresh another multiselect control. Without add/remove event I just can't do this.
I think everybody could benefit from it since notification about events is a crucial part in a widget.
Comment #3
desunit commentedComment #4
attheshow commentedLooking at the jQuery docs (http://docs.jquery.com/Events/triggerHandler), I don't think you need to have brackets around the variable names "option" and "anOption" right? Have you tested this to make sure it functions correctly?
Comment #5
desunit commentedOf course, I tested it. If you take a look closer on triggerHandler you will notice that the second argument actually is an Array and array could be represented in JS with brackets:
Comment #6
desunit commentedComment #7
attheshow commentedGenerally, brackets are used to indicate that certain parameters in function calls are optional. The brackets aren't meant to actually be present when the parameter is used in a function call. See another example of this at http://docs.jquery.com/Effects/show#speedcallback where "callback" is actually the name of a function and not an array.
Comment #8
attheshow commentedCommitted to dev version.
Comment #9
desunit commentedWell, it's absolutely different example with a callback function. There is great benefit in passing array - you could easily add new passing without consumer application changes. Anyway, I'm glad that you committed it (even partly). Thanks!