From a1bdea6290e58d1b18f6d2337ccf141dd0ec4ca7 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Thu, 23 Jul 2020 11:26:23 +0300 Subject: [PATCH] Contact notes: display notes as multiline text. --- src/components/Contact.tsx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/components/Contact.tsx b/src/components/Contact.tsx index db08b27..657d748 100644 --- a/src/components/Contact.tsx +++ b/src/components/Contact.tsx @@ -127,7 +127,7 @@ class Contact extends React.PureComponent { )); const skips = ['tel', 'email', 'impp', 'adr', 'bday', 'anniversary', 'rev', - 'prodid', 'uid', 'fn', 'n', 'version', 'photo']; + 'prodid', 'uid', 'fn', 'n', 'version', 'photo', 'note']; const theRest = contact.comp.getAllProperties().filter((prop) => ( skips.indexOf(prop.name) === -1 )).map((prop, idx) => { @@ -145,6 +145,20 @@ class Contact extends React.PureComponent { return values; }); + { + const note = contact.comp.getFirstPropertyValue('note'); + const item = ( + +
{note}
+
+ ); + theRest.push([item]); + } + function listIfNotEmpty(items: JSX.Element[][]) { if (items.length > 0) { return (