(Chips): Chip properties handleSelect/handleRemove/handleInteraction are never called when Chip is child of ChipSet #650
Description
<ChipSet>
calls renderChip which overwrites the handleSelect
, handleInteraction
, and handleRemove
properties of the <Chip/>
. As a result they are never called. ChipSet should either create a new function which calls both ChipSet's and Chip's handle[Select|Interaction|Remove]
function. Or have ChipSet accept its own handle[Select|Interaction|Remove]
function as a prop.
My inclination is to pursue option one. This may cause less breakage. The benefit of option two is that when writing <Chip/>
a user wouldn't need to pass a handler to each chip, but just once on a <ChipSet/>
. However, the ChipSet interface already has a handleSelect property with a different signature. A user would may need to refactor every usage of ChipSet. Whereas, having renderChip
create a new function which not require any changes from a users perspective.
...also I have a PR ready to go for option one ;)