react-mention-input 1.0.19 → 1.1.0

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.
@@ -42,7 +42,22 @@
42
42
  justify-content: center;
43
43
  }
44
44
 
45
-
45
+ /* .suggestion-list {
46
+ position: absolute;
47
+ top: 100%;
48
+ left: 0;
49
+ right: 0;
50
+ background-color: #fff;
51
+ border: 1px solid #ddd;
52
+ border-radius: 4px;
53
+ list-style: none;
54
+ margin: 4px 0;
55
+ padding: 0;
56
+ max-height: 150px;
57
+ overflow-y: auto;
58
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
59
+ z-index: 1;
60
+ } */
46
61
 
47
62
  .suggestion-list {
48
63
  max-height: 150px;
@@ -135,6 +135,7 @@ var MentionInput = function (_a) {
135
135
  default:
136
136
  break;
137
137
  }
138
+ console.log("document.body", document.body);
138
139
  return ReactDOM.createPortal(React.createElement("ul", { className: "suggestion-list ".concat(suggestionListClassName || ''), ref: suggestionListRef, style: styles }, suggestions.map(function (user) { return (React.createElement("li", { key: user.id, onClick: function () { return handleSuggestionClick(user); }, className: "suggestion-item ".concat(suggestionItemClassName || ''), role: "option", tabIndex: 0, "aria-selected": "false" }, user.name)); })), document.body // Render in portal
139
140
  );
140
141
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-mention-input",
3
- "version": "1.0.19",
3
+ "version": "1.1.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -42,7 +42,22 @@
42
42
  justify-content: center;
43
43
  }
44
44
 
45
-
45
+ /* .suggestion-list {
46
+ position: absolute;
47
+ top: 100%;
48
+ left: 0;
49
+ right: 0;
50
+ background-color: #fff;
51
+ border: 1px solid #ddd;
52
+ border-radius: 4px;
53
+ list-style: none;
54
+ margin: 4px 0;
55
+ padding: 0;
56
+ max-height: 150px;
57
+ overflow-y: auto;
58
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
59
+ z-index: 1;
60
+ } */
46
61
 
47
62
  .suggestion-list {
48
63
  max-height: 150px;
@@ -187,6 +187,7 @@ const MentionInput: React.FC<MentionInputProps> = ({
187
187
  break;
188
188
  }
189
189
 
190
+ console.log("document.body",document.body);
190
191
  return ReactDOM.createPortal(
191
192
  <ul
192
193
  className={`suggestion-list ${suggestionListClassName || ''}`}