From 7fa7500d69bdb201a0066c031d1da9bb3f036343 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期二, 15 十月 2024 14:33:40 +0800 Subject: [PATCH] # --- zy-acs-flow/src/map/header/MapSearch.jsx | 27 +++++++++++++++------------ 1 files changed, 15 insertions(+), 12 deletions(-) diff --git a/zy-acs-flow/src/map/header/MapSearch.jsx b/zy-acs-flow/src/map/header/MapSearch.jsx index a4fd56f..3a866e5 100644 --- a/zy-acs-flow/src/map/header/MapSearch.jsx +++ b/zy-acs-flow/src/map/header/MapSearch.jsx @@ -139,18 +139,21 @@ size="small" options={filterDeviceList} getOptionLabel={(option) => option.value} - renderOption={(props, option) => ( - <li {...props}> - <Stack direction="row" justifyContent="space-between" width="100%"> - <Typography variant="body1" fontWeight="bold"> - {option.label} - </Typography> - <Typography variant="body2" color="text.secondary"> - {option.uuid} - </Typography> - </Stack> - </li> - )} + renderOption={(props, option) => { + const { key, ...otherProps } = props; + return ( + <li key={Number(key)} {...otherProps}> + <Stack direction="row" justifyContent="space-between" width="100%"> + <Typography variant="body1" fontWeight="bold"> + {option.label} + </Typography> + <Typography variant="body2" color="text.secondary"> + {option.uuid} + </Typography> + </Stack> + </li> + ) + }} renderInput={(params) => ( <TextField {...params} -- Gitblit v1.9.1