fix(react/promoted_attributes): unable to read trim at server level

This commit is contained in:
Elian Doran 2025-11-23 13:55:25 +02:00
parent 081ac2d109
commit 08ade8371c
No known key found for this signature in database

View File

@ -436,14 +436,14 @@ function buildPromotedAttributeLabelChangedListener({ note, cell, componentId, .
return debounce(onChange, 250); return debounce(onChange, 250);
} }
function updateAttribute(note: FNote, cell: Cell, componentId: string, value: string) { function updateAttribute(note: FNote, cell: Cell, componentId: string, value: string | undefined) {
return server.put<UpdateAttributeResponse>( return server.put<UpdateAttributeResponse>(
`notes/${note.noteId}/attribute`, `notes/${note.noteId}/attribute`,
{ {
attributeId: cell.valueAttr.attributeId, attributeId: cell.valueAttr.attributeId,
type: cell.valueAttr.type, type: cell.valueAttr.type,
name: cell.valueName, name: cell.valueName,
value: value value: value || ""
}, },
componentId componentId
); );