margox / braft-extensions

Braft Editor扩展模块包
211 stars 54 forks source link

Table 的下拉菜单按钮会将 Form 表单提交 #150

Open xushre opened 1 year ago

xushre commented 1 year ago

<button disabled={!this.state.rows || !this.state.columns} className="button primary" onClick={this.confirmInsert}>{this.props.language.insertTable}</button>

建议在 button 上设置 type 属性

ZhouYing-JOEY commented 1 year ago

可以在BraftEditor组件的onChange事件首行加入document.querySelector('.bf-table-dropdown-control button')?.setAttribute?.('type', 'button');来解决此问题。