react-mention-input 1.0.19 → 1.1.1
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.
- package/dist/MentionInput.css +16 -1
- package/dist/MentionInput.js +2 -1
- package/package.json +1 -1
- package/src/MentionInput.css +16 -1
- package/src/MentionInput.tsx +2 -1
package/dist/MentionInput.css
CHANGED
|
@@ -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;
|
package/dist/MentionInput.js
CHANGED
|
@@ -135,7 +135,8 @@ var MentionInput = function (_a) {
|
|
|
135
135
|
default:
|
|
136
136
|
break;
|
|
137
137
|
}
|
|
138
|
-
|
|
138
|
+
console.log("document.body", document.body);
|
|
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)); })), window.document.body // Render in portal
|
|
139
140
|
);
|
|
140
141
|
};
|
|
141
142
|
return (React.createElement("div", { className: "mention-container ".concat(containerClassName || "") },
|
package/package.json
CHANGED
package/src/MentionInput.css
CHANGED
|
@@ -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;
|
package/src/MentionInput.tsx
CHANGED
|
@@ -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 || ''}`}
|
|
@@ -206,7 +207,7 @@ const MentionInput: React.FC<MentionInputProps> = ({
|
|
|
206
207
|
</li>
|
|
207
208
|
))}
|
|
208
209
|
</ul>,
|
|
209
|
-
document.body // Render in portal
|
|
210
|
+
window.document.body // Render in portal
|
|
210
211
|
);
|
|
211
212
|
};
|
|
212
213
|
|