@conform-to/dom
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -93,6 +93,2 @@ import { getFormAction, getFormEncType, getFormMethod } from './dom'; | ||
}) => Submission<Schema, FormError, FormValue>; | ||
/** | ||
* To schedule when an intent should be dispatched. | ||
*/ | ||
onSchedule?: (callback: () => void) => void; | ||
}; | ||
@@ -99,0 +95,0 @@ export type SubscriptionSubject = { |
@@ -488,10 +488,8 @@ 'use strict'; | ||
function createFormControl(type) { | ||
var _latestOptions$onSche; | ||
var schedule = (_latestOptions$onSche = latestOptions.onSchedule) !== null && _latestOptions$onSche !== void 0 ? _latestOptions$onSche : callback => callback(); | ||
var control = function control() { | ||
var payload = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
return schedule(() => dispatch({ | ||
return dispatch({ | ||
type, | ||
payload | ||
})); | ||
}); | ||
}; | ||
@@ -498,0 +496,0 @@ return Object.assign(control, { |
@@ -6,3 +6,3 @@ { | ||
"license": "MIT", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"main": "index.js", | ||
@@ -9,0 +9,0 @@ "module": "index.mjs", |
Sorry, the diff of this file is not supported yet
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
103269
2720