const bands = this.props.ApplicationContainer.bands;
if(bands) {
var bandsHtml = '<Select defaultValue="Select"><Option value="Select">Select</Option>';
const listItems = bands.map(function(obj) {
const rObj = {};
rObj[obj.id] = obj.band;
bandsHtml += '<Option value="'+obj.band+'">'+obj.band+'</Option>';
return rObj;
});
bandsHtml += '</Select>';
} else {
var bandsHtml='';
}
console.log(bandsHtml);
return (
bandsHtml
);
该函数返回表中的内容,但请查看此图像: https ://ibb.co/jNBYnk
它在单元格中显示为 HTML。关于如何在 Antd 表中将其呈现为 Select 的任何想法?