@tony.kay I found an issue with the recent commits in fulcro
VM2810 com.fulcrologic.fulcro.dom.js:387 InvalidStateError: Failed to set the 'value' property on 'HTMLInputElement': This input element accepts a filename, which may only be programmatically set to the empty string.
at initInput (react-dom-client.development.js:1734:9)
at setInitialProperties (react-dom-client.development.js:17827:11)
at completeWork (react-dom-client.development.js:11393:18)
at runWithFiberInDEV (react-dom-client.development.js:1521:30)
at completeUnitOfWork (react-dom-client.development.js:15270:19)
at performUnitOfWork (react-dom-client.development.js:15151:11)
at renderRootSync (react-dom-client.development.js:14958:41)
at performWorkOnRoot (react-dom-client.development.js:14464:44)
at performSyncWorkOnRoot (react-dom-client.development.js:16233:7)
at flushSyncWorkAcrossRoots_impl (react-dom-client.development.js:16081:21)
The above error occurred in the <input> component.
React will try to recreate this component tree from scratch using the error boundary you provided, brian.ui/Root.
# good: [263443f627140b40c9c3d2de613397dbdae5e702] defsc factories default keyfn if there is an ident on the component. Uses the second element of the ident as the key (recommended practice). User-supplied react key takes precedence over user-supplied keyfn, which takes precedence over this default
# first bad commit: [cafa392229d784b5275883ae82bf428d45c5812d] Another attempt to make DOM inputs work correctly with React 19repro:
(defsc FileInput [_ {}]
{:use-hooks? true}
(dom/div (let [file-input-ref (hooks/use-ref)
accept "*/*"
multiple? true]
(dom/input
{:ref file-input-ref
:type "file"
:className "hidden"
:accept accept
:multiple true
:value ""
:onChange #()}))))
(def file-input-ui (comp/factory FileInput))
(defsc TopChrome [this _props]
{:ident (fn [] [:component/id :top-chrome])}
(file-input-ui {}))
(def top-chrome-ui (comp/factory TopChrome))
(defsc Root [this _]
{:initial-state (fn [_] {:root/top-chrome (comp/get-initial-state TopChrome {})})}
(top-chrome-ui {}))it may just be that value cannot be set to "" in react 19 but the previous fulcro input didn't really use that value anyway and now it surfaced this bug, so technically not a bug in fulcro?
I don't see it as a fulcro bug. Seems like a react enforcement that i exposed?