rc-mentions
Advanced tools
Comparing version 2.17.0 to 2.18.0
@@ -15,3 +15,4 @@ import Menu, { MenuItem } from 'rc-menu'; | ||
onFocus = _React$useContext.onFocus, | ||
onBlur = _React$useContext.onBlur; | ||
onBlur = _React$useContext.onBlur, | ||
onScroll = _React$useContext.onScroll; | ||
var prefixCls = props.prefixCls, | ||
@@ -32,3 +33,4 @@ options = props.options; | ||
onFocus: onFocus, | ||
onBlur: onBlur | ||
onBlur: onBlur, | ||
onScroll: onScroll | ||
}, options.map(function (option, index) { | ||
@@ -35,0 +37,0 @@ var key = option.key, |
@@ -43,2 +43,3 @@ import type { CommonInputProps } from 'rc-input/lib/interface'; | ||
}; | ||
onPopupScroll?: (event: React.UIEvent<HTMLDivElement>) => void; | ||
} | ||
@@ -45,0 +46,0 @@ export interface MentionsRef { |
@@ -5,3 +5,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; | ||
var _excluded = ["prefixCls", "className", "style", "prefix", "split", "notFoundContent", "value", "defaultValue", "children", "options", "open", "allowClear", "silent", "validateSearch", "filterOption", "onChange", "onKeyDown", "onKeyUp", "onPressEnter", "onSearch", "onSelect", "onFocus", "onBlur", "transitionName", "placement", "direction", "getPopupContainer", "dropdownClassName", "rows", "visible"], | ||
var _excluded = ["prefixCls", "className", "style", "prefix", "split", "notFoundContent", "value", "defaultValue", "children", "options", "open", "allowClear", "silent", "validateSearch", "filterOption", "onChange", "onKeyDown", "onKeyUp", "onPressEnter", "onSearch", "onSelect", "onFocus", "onBlur", "transitionName", "placement", "direction", "getPopupContainer", "dropdownClassName", "rows", "visible", "onPopupScroll"], | ||
_excluded2 = ["suffix", "prefixCls", "defaultValue", "value", "allowClear", "onChange", "classNames", "className", "disabled", "onClear"]; | ||
@@ -58,2 +58,3 @@ import classNames from 'classnames'; | ||
visible = props.visible, | ||
onPopupScroll = props.onPopupScroll, | ||
restProps = _objectWithoutProperties(props, _excluded); | ||
@@ -347,3 +348,9 @@ var mergedPrefix = useMemo(function () { | ||
// ============================== Scroll =============================== | ||
var onInternalPopupScroll = function onInternalPopupScroll(event) { | ||
onPopupScroll === null || onPopupScroll === void 0 || onPopupScroll(event); | ||
}; | ||
// ============================== Render ============================== | ||
return /*#__PURE__*/React.createElement("div", { | ||
@@ -374,3 +381,4 @@ className: classNames(prefixCls, className), | ||
onFocus: onDropdownFocus, | ||
onBlur: onDropdownBlur | ||
onBlur: onDropdownBlur, | ||
onScroll: onInternalPopupScroll | ||
} | ||
@@ -377,0 +385,0 @@ }, /*#__PURE__*/React.createElement(KeywordTrigger, { |
@@ -10,4 +10,5 @@ import * as React from 'react'; | ||
onBlur: React.FocusEventHandler<HTMLElement>; | ||
onScroll: React.UIEventHandler<HTMLElement>; | ||
} | ||
declare const MentionsContext: React.Context<MentionsContextProps>; | ||
export default MentionsContext; |
@@ -23,3 +23,4 @@ "use strict"; | ||
onFocus = _React$useContext.onFocus, | ||
onBlur = _React$useContext.onBlur; | ||
onBlur = _React$useContext.onBlur, | ||
onScroll = _React$useContext.onScroll; | ||
var prefixCls = props.prefixCls, | ||
@@ -40,3 +41,4 @@ options = props.options; | ||
onFocus: onFocus, | ||
onBlur: onBlur | ||
onBlur: onBlur, | ||
onScroll: onScroll | ||
}, options.map(function (option, index) { | ||
@@ -43,0 +45,0 @@ var key = option.key, |
@@ -43,2 +43,3 @@ import type { CommonInputProps } from 'rc-input/lib/interface'; | ||
}; | ||
onPopupScroll?: (event: React.UIEvent<HTMLDivElement>) => void; | ||
} | ||
@@ -45,0 +46,0 @@ export interface MentionsRef { |
@@ -26,3 +26,3 @@ "use strict"; | ||
var _util = require("./util"); | ||
var _excluded = ["prefixCls", "className", "style", "prefix", "split", "notFoundContent", "value", "defaultValue", "children", "options", "open", "allowClear", "silent", "validateSearch", "filterOption", "onChange", "onKeyDown", "onKeyUp", "onPressEnter", "onSearch", "onSelect", "onFocus", "onBlur", "transitionName", "placement", "direction", "getPopupContainer", "dropdownClassName", "rows", "visible"], | ||
var _excluded = ["prefixCls", "className", "style", "prefix", "split", "notFoundContent", "value", "defaultValue", "children", "options", "open", "allowClear", "silent", "validateSearch", "filterOption", "onChange", "onKeyDown", "onKeyUp", "onPressEnter", "onSearch", "onSelect", "onFocus", "onBlur", "transitionName", "placement", "direction", "getPopupContainer", "dropdownClassName", "rows", "visible", "onPopupScroll"], | ||
_excluded2 = ["suffix", "prefixCls", "defaultValue", "value", "allowClear", "onChange", "classNames", "className", "disabled", "onClear"]; | ||
@@ -66,2 +66,3 @@ var InternalMentions = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) { | ||
visible = props.visible, | ||
onPopupScroll = props.onPopupScroll, | ||
restProps = (0, _objectWithoutProperties2.default)(props, _excluded); | ||
@@ -355,3 +356,9 @@ var mergedPrefix = (0, _react.useMemo)(function () { | ||
// ============================== Scroll =============================== | ||
var onInternalPopupScroll = function onInternalPopupScroll(event) { | ||
onPopupScroll === null || onPopupScroll === void 0 || onPopupScroll(event); | ||
}; | ||
// ============================== Render ============================== | ||
return /*#__PURE__*/_react.default.createElement("div", { | ||
@@ -382,3 +389,4 @@ className: (0, _classnames.default)(prefixCls, className), | ||
onFocus: onDropdownFocus, | ||
onBlur: onDropdownBlur | ||
onBlur: onDropdownBlur, | ||
onScroll: onInternalPopupScroll | ||
} | ||
@@ -385,0 +393,0 @@ }, /*#__PURE__*/_react.default.createElement(_KeywordTrigger.default, { |
@@ -10,4 +10,5 @@ import * as React from 'react'; | ||
onBlur: React.FocusEventHandler<HTMLElement>; | ||
onScroll: React.UIEventHandler<HTMLElement>; | ||
} | ||
declare const MentionsContext: React.Context<MentionsContextProps>; | ||
export default MentionsContext; |
{ | ||
"name": "rc-mentions", | ||
"version": "2.17.0", | ||
"version": "2.18.0", | ||
"description": "React Mentions", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
78507
1734