mirror of
https://github.com/nowcommunity/nowdatabase.git
synced 2026-10-12 19:13:52 +03:00
Fix selectedValues type error in MembersMultiSelect.tsx
Remove explicit ProjectMemberRow type annotation and use more explicit type guard to ensure selectedValues is string[]. Fixes TypeScript error TS2345 where the map callback type was incompatible with Editable<...> array items. Refs #1007 Co-authored-by: karilint <19990676+karilint@users.noreply.github.com>
This commit is contained in:
co-authored by
karilint
parent
58a1c2a556
commit
e25e8feac6
@@ -185,8 +185,8 @@ const MembersMultiSelectDetail = () => {
|
||||
fieldName="now_proj_people"
|
||||
idFieldName="initials"
|
||||
selectedValues={editData.now_proj_people
|
||||
.map((member: ProjectMemberRow) => member.initials)
|
||||
.filter((initial): initial is string => !!initial)}
|
||||
.map(member => member.initials)
|
||||
.filter((initial): initial is string => typeof initial === 'string' && initial.length > 0)}
|
||||
editingAction={person =>
|
||||
setEditData({
|
||||
...editData,
|
||||
|
||||
Reference in New Issue
Block a user