Right now, the redraw() command is used in the global dispatch to tell components which items are selected (and they are selected by index). This can cause problems, especially if items are reordered within each component, leading to inconsistencies.
The components of this issue should be to:
Rename redraw() to a more descriptive highlight(), which takes a function as an argument to select the relevant data. This allows for arbitrary selection programmatically.
Update each component to implement a highlight() function.
Update each component to use the highlight() function to update other components.
Add a factory method to trigger a highlight() event on all connected components to allow for external programmatic access.
Update the example to show an example of the new interface programmatically.
Right now, the
redraw()
command is used in the global dispatch to tell components which items are selected (and they are selected by index). This can cause problems, especially if items are reordered within each component, leading to inconsistencies.The components of this issue should be to:
redraw()
to a more descriptivehighlight()
, which takes a function as an argument to select the relevant data. This allows for arbitrary selection programmatically.highlight()
function.highlight()
function to update other components.highlight()
event on all connected components to allow for external programmatic access.