3
我有以下代碼:靜態元素的交互
Enabled = (id) => {
let removal = null;
if (!this.props.disabled) {
removal = (
<span
className="chipRemove"
onClick={() => this.onDelete(id)}
>
x
</span>)
;
}
return removal;
}
它工作得很好,但棉短絨是給我:
jsx-a11y/no-static-element-interactions
我怎樣才能解決這個錯誤(根據jsx-a11y
)?