+ {selectedItems.length > 0 &&
+ selectedItems.map((item, index) => {
+ const label = String(item);
+ return (
+
= firstHiddenIndex}
+ highlighted={
+ index === highlightedIndex ||
+ activeIndices.indexOf(index) !== -1
+ }
+ id={`${id}-pill-${index}`}
+ index={index}
+ key={`${index}-${label}`}
+ label={label}
+ onClose={
+ expanded && !readOnly
+ ? (event) => onRemoveItem?.(event, index)
+ : undefined
+ }
+ pillsRef={pillsRef}
+ />
+ );
+ })}
+