Hi,
I would like to remove chips without enabling the enableDelete feature but instead by clicking on a chip.
With this code, everything is working except for the last item that remains visible. Is this a bug ?
import React, {useEffect, useState} from 'react'
import {ChipDirective, ChipListComponent, ChipsDirective} from "@syncfusion/ej2-react-buttons";
export default function Test() {
const list_data = [{name: 'toto'}, {name: 'titi'}]
const [list, setList] = useState([...list_data])
return (
<div>
{list.map(l => <div key={l.name}>{l.name}</div>)}
<div>
<ChipListComponent click={e => setList(list.filter(l => l.name !== e.data.item.name))}>
<ChipsDirective>
{list.map(a => <ChipDirective text={a.name}
item={a}
cssClass="e-warning"
key={a.name} />)
}
</ChipsDirective>
</ChipListComponent>
</div>
</div>
)
}