【发布时间】:2020-05-22 06:59:07
【问题描述】:
Options.js
return (
<div>
<Table bordered hover variant="light">
<caption>Data Inspector Results</caption>
<thead className="thead-dark">
<tr>
<th>Attribute</th>
<th>Datatype</th>
<th>Categorical/Numerical</th>
<th>Sample Data</th>
<th>Null Values</th>
<th>Numerical Range</th>
<th>Bin Size</th>
<th>Unique Key</th>
</tr>
</thead>
<tbody>
{result}
{result}
</tbody>
</Table>
</div>
)
结果.js
return (
<div>
<tr>
<td>{props.attribute}</td>
<td>{props.dataType}</td>
<td>
<Select options={categoryOptions} />
</td>
<td>To Be Done In The Future</td>
<td>
<Select
defaultValue={[]}
isMulti
name="colors"
options={nullBinOptions}
className="basic-multi-select"
classNamePrefix="select"
/>
</td>
<td>{props.numericalRange}</td>
<td>{props.binSize}</td>
<td>NA</td>
</tr>
</div>
)
我正在尝试在Options.js 中呈现我的多个结果组件。但是,我遇到了这个问题,我的结果在表格中没有正确显示。
这张图片显示了我的问题
props 不是问题,也不是我要输入的JSON。我似乎无法很好地渲染这张桌子。我究竟做错了什么?先感谢您!
【问题讨论】:
-
@Gawel1908 不起作用。它仍然反映了同样的问题!
标签: javascript html css node.js reactjs