`<span>
<span contentEditable="false">
<select
selected=${currentPlaceholder.selected.value}
onchange ={this.handleDropDown(${index})}
class="custom-dropdown"
>
${optionsList}
</select>
</span>
</span>`
我想将类函数传递给onchange属性,但此模板字符串将返回dangerouslySetInnerHTML
。因此它说this.handleDropDown is not a function
。
我不确定如何正确传递