react-mention-input 1.0.17 → 1.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,14 +12,10 @@ export var ShowMessageCard = function (_a) {
12
12
  return initials;
13
13
  };
14
14
  return (React.createElement("div", { className: "message-card-container ".concat(containerClassName || ''), style: containerStyle }, data.map(function (item, index) {
15
- // if (renderItem) {
16
- // // Use custom render function if provided
17
- // return (
18
- // <React.Fragment key={item.id || index}>
19
- // {renderItem(item)}
20
- // </React.Fragment>
21
- // );
22
- // }
15
+ if (renderItem !== undefined) {
16
+ // Use custom render function if provided
17
+ return (React.createElement(React.Fragment, { key: item.id || index }, renderItem(item)));
18
+ }
23
19
  var _a = useState(false), showInitials = _a[0], setShowInitials = _a[1];
24
20
  var handleImageError = function () {
25
21
  setShowInitials(true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-mention-input",
3
- "version": "1.0.17",
3
+ "version": "1.0.18",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -70,14 +70,14 @@ export const ShowMessageCard: React.FC<ShowMessageCardProps> = ({
70
70
  return (
71
71
  <div className={`message-card-container ${containerClassName || ''}`} style={containerStyle}>
72
72
  {data.map((item, index) => {
73
- // if (renderItem) {
74
- // // Use custom render function if provided
75
- // return (
76
- // <React.Fragment key={item.id || index}>
77
- // {renderItem(item)}
78
- // </React.Fragment>
79
- // );
80
- // }
73
+ if (renderItem !== undefined) {
74
+ // Use custom render function if provided
75
+ return (
76
+ <React.Fragment key={item.id || index}>
77
+ {renderItem(item)}
78
+ </React.Fragment>
79
+ );
80
+ }
81
81
 
82
82
  const [showInitials, setShowInitials] = useState(false);
83
83