it's possible to click input values in react?
so i have a input whihc i set values to array with comma:
it's here showing how i do that: React / Redux how split input values with comma
i can render my input values in jsx like that:
const listItems = this.props.Data.codes.map((item) =>
<span key={index} onClick={onClick=event = () => this.somFunc(event, item)}>{item}</span>
);
and at onClick i can get the each item so each value which i put to array from input.
but possible to make this mapping in input ?
so in input will be displaying my values like:
value1 value2 value3
and i will be available to click them and call some function at onClick
somFunc(event, item), update the appropriate state value.