MCPcopy Index your code
hub / github.com/dataease/SQLBot / DebounceInput

Function DebounceInput

frontend/public/swagger-ui-bundle.js:27279–27367  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

27277 })(DebounceInput, s)
27278 var o = _createSuper(DebounceInput)
27279 function DebounceInput(s) {
27280 var i
27281 ;(!(function _classCallCheck(s, o) {
27282 if (!(s instanceof o)) throw new TypeError('Cannot call a class as a function')
27283 })(this, DebounceInput),
27284 _defineProperty(
27285 _assertThisInitialized((i = o.call(this, s))),
27286 'onChange',
27287 function (s) {
27288 s.persist()
27289 var o = i.state.value,
27290 a = i.props.minLength
27291 i.setState({ value: s.target.value }, function () {
27292 var u = i.state.value
27293 u.length >= a
27294 ? i.notify(s)
27295 : o.length > u.length &&
27296 i.notify(
27297 _objectSpread(
27298 _objectSpread({}, s),
27299 {},
27300 {
27301 target: _objectSpread(
27302 _objectSpread({}, s.target),
27303 {},
27304 { value: '' }
27305 ),
27306 }
27307 )
27308 )
27309 })
27310 }
27311 ),
27312 _defineProperty(_assertThisInitialized(i), 'onKeyDown', function (s) {
27313 'Enter' === s.key && i.forceNotify(s)
27314 var o = i.props.onKeyDown
27315 o && (s.persist(), o(s))
27316 }),
27317 _defineProperty(_assertThisInitialized(i), 'onBlur', function (s) {
27318 i.forceNotify(s)
27319 var o = i.props.onBlur
27320 o && (s.persist(), o(s))
27321 }),
27322 _defineProperty(_assertThisInitialized(i), 'createNotifier', function (s) {
27323 if (s < 0)
27324 i.notify = function () {
27325 return null
27326 }
27327 else if (0 === s) i.notify = i.doNotify
27328 else {
27329 var o = (0, u.default)(function (s) {
27330 ;((i.isDebouncing = !1), i.doNotify(s))
27331 }, s)
27332 ;((i.notify = function (s) {
27333 ;((i.isDebouncing = !0), o(s))
27334 }),
27335 (i.flush = function () {
27336 return o.flush()

Callers

nothing calls this directly

Calls 5

_definePropertyFunction · 0.85
_assertThisInitializedFunction · 0.85
_objectSpreadFunction · 0.85
cancelMethod · 0.80
oFunction · 0.70

Tested by

no test coverage detected