const handleAdd2 = () => {
<-- 雙打的No會是一樣 -->
<-- aka 某一點由兩位選手出賽 -->
const newData1 = {
key: count,
no: count+1,
name: ``,
action: <a>Delete</a>,
};
const newData2 = {
key: count+1,
no: count+1,
name: ``,
action: <a>Delete</a>,
};
var copiedDataSource = dataSource.slice();
copiedDataSource.push(newData1, newData2);
setDataSource(copiedDataSource);
<-- From +2(people) to +1(point) -->
setCount(count+1);
ref: colspan-rowspan
[Optional] 合併兩列(rowSpan) For 雙打點
ref: Steps
Step1: install prettier
npm install --dev-dependency prettier
Step2: add script to package.json
"format": "prettier --write \"**/*.+(js|json)\""
Step3: run By
npm run format