我有一个function ([boolValue, stringValue]: [boolean, string]) {
// make use of boolValue and stringValue
}
,有三列。每行,第一列和第三列都是table
字段,每行中的第二列是input
div。
当用户在content editable
div上并且按content editable
时,它应该在其下方添加Enter Key
,new row
应该从当前{{1}转移转到focus
的{{1}}。
问题出在content editable div
按键上,在content editable div
内添加了new row
,Enter
中的new row
也加起来了。
这是plunkr:http://plnkr.co/edit/QxZC4bVgWOHJ65pM9F38?p=preview
答案 0 :(得分:0)
app.js文件中的onKeyDown函数应为
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
print("You selected cell #\(indexPath.row)!")
}
注意$ event.preventDefault();线。