We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d2cce69 commit 3d2b401Copy full SHA for 3d2b401
src/uploader.js
@@ -19,7 +19,8 @@ const useWidget = (
19
{
20
id,
21
name,
22
- value,
+ value, //@deprecated
23
+ defaultValue,
24
onFileSelect,
25
onChange,
26
onDialogOpen,
@@ -167,11 +168,11 @@ const useWidget = (
167
168
}, [widgetOptions])
169
170
useEffect(() => {
- if (cachedValueRef.current !== value) {
171
- widget.current.value(value)
+ if (cachedValueRef.current !== defaultValue) {
172
+ widget.current.value(defaultValue)
173
}
- cachedValueRef.current = value
174
- }, [value])
+ cachedValueRef.current = defaultValue
175
+ }, [])
176
177
178
if (uploadcare && tabsCss && typeof tabsCss === 'string') {
0 commit comments