mirror of
https://github.com/gosticks/react-table.git
synced 2026-08-11 12:30:17 +00:00
Update Changelog
This commit is contained in:
+3
-2
@@ -133,7 +133,7 @@ export function useMountedLayoutEffect(fn, deps) {
|
||||
}, deps)
|
||||
}
|
||||
|
||||
export default function useAsyncDebounce(defaultFn, defaultWait = 0) {
|
||||
export function useAsyncDebounce(defaultFn, defaultWait = 0) {
|
||||
const debounceRef = React.useRef({})
|
||||
debounceRef.current.defaultFn = defaultFn
|
||||
debounceRef.current.defaultWait = defaultWait
|
||||
@@ -144,8 +144,9 @@ export default function useAsyncDebounce(defaultFn, defaultWait = 0) {
|
||||
wait = debounceRef.current.defaultWait
|
||||
) => {
|
||||
if (!debounceRef.current.promise) {
|
||||
debounceRef.current.promise = new Promise(resolve => {
|
||||
debounceRef.current.promise = new Promise((resolve, reject) => {
|
||||
debounceRef.current.resolve = resolve
|
||||
debounceRef.current.reject = reject
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user