Skip to content

Commit

Permalink
Fix customEditable People Field saving
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffdaley committed Oct 4, 2023
1 parent dc1cf68 commit c4415c9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions web/app/components/document/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -624,15 +624,16 @@ export default class DocumentSidebarComponent extends Component<DocumentSidebarC
async (
fieldName: string,
field: CustomEditableField,
val: string | HermesUser[],
val: string | string[],
) => {
if (field && val !== undefined) {
debugger;
let serializedValue;

if (typeof val === "string") {
serializedValue = cleanString(val);
} else {
serializedValue = val.map((p: HermesUser) => p.email);
serializedValue = val;
}

field.name = fieldName;
Expand Down
6 changes: 4 additions & 2 deletions web/app/styles/components/editable-field.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
&.button-affordance {
.field-toggle:not([disabled], .disabled) {
&:hover,
&:focus-visible &:focus {
&:focus-visible,
&:focus {
@apply border-color-border-strong bg-color-page-primary;
}
}
Expand All @@ -52,7 +53,8 @@

&:not([disabled], .disabled) {
&:hover,
&:focus-visible &:focus {
&:focus-visible,
&:focus {
@apply bg-color-palette-neutral-175;

.edit-affordance {
Expand Down

0 comments on commit c4415c9

Please sign in to comment.