我有这样的状态
volumeInfo: {
authors: {
authors: {
allAuthorsFromDB: [
{
key: "5d553f721c9d440000c63433",
text: "author",
value: "author"
},
{
key: "5d56b1eb1c9d4400000e897c",
text: "author 2",
value: "author 2"
}
],
defaultValue: ["author"],
notFoundInDatabase: ["fghdfghgf"]
}
},
showMessage: true
}
还有一个下拉列表
<Form.Dropdown
label={`Автор${volumeInfo.authors.length > 1 ? "ы" : ""}`}
fluid
multiple
selection
options={volumeInfo.authors.authors.allAuthorsFromDB}
value={volumeInfo.authors.authors.defaultValue}
/>
<Message
warning
visible={volumeInfo.authors.showMessage}
header="Could you check something!"
list={[
"That e-mail has been subscribed, but you have not yet clicked the verification link in your e-mail."
]}
/>
当尝试在页面上显示此内容时,直到我单击dropdown
中的数据才会出现。
首次加载
在我单击它之后,他向我显示了数据。