diff --git a/src/app/App.tsx b/src/app/App.tsx index 2c48b3f0..d6c13bca 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -4296,7 +4296,7 @@ export function App({ store, initialStatusMessage }: AppProps) { onChange={(event) => { const nextColorHex = event.currentTarget.value; setPointLightColorDraft(nextColorHex); - applyPointLightChange({ colorHex: nextColorHex }); + scheduleDraftCommit(() => applyPointLightChange({ colorHex: nextColorHex })); }} /> @@ -4356,7 +4356,7 @@ export function App({ store, initialStatusMessage }: AppProps) { onChange={(event) => { const nextColorHex = event.currentTarget.value; setSpotLightColorDraft(nextColorHex); - applySpotLightChange({ colorHex: nextColorHex }); + scheduleDraftCommit(() => applySpotLightChange({ colorHex: nextColorHex })); }} /> @@ -4528,7 +4528,11 @@ export function App({ store, initialStatusMessage }: AppProps) { onChange={(event) => { const nextAudioAssetId = event.currentTarget.value.trim(); setSoundEmitterAudioAssetIdDraft(nextAudioAssetId); - applySoundEmitterChange({ audioAssetId: nextAudioAssetId.length === 0 ? null : nextAudioAssetId }); + scheduleDraftCommit(() => + applySoundEmitterChange({ + audioAssetId: nextAudioAssetId.length === 0 ? null : nextAudioAssetId + }) + ); }} > @@ -4611,7 +4615,7 @@ export function App({ store, initialStatusMessage }: AppProps) { onChange={(event) => { const nextAutoplay = event.currentTarget.checked; setSoundEmitterAutoplayDraft(nextAutoplay); - applySoundEmitterChange({ autoplay: nextAutoplay }); + scheduleDraftCommit(() => applySoundEmitterChange({ autoplay: nextAutoplay })); }} /> @@ -4624,7 +4628,7 @@ export function App({ store, initialStatusMessage }: AppProps) { onChange={(event) => { const nextLoop = event.currentTarget.checked; setSoundEmitterLoopDraft(nextLoop); - applySoundEmitterChange({ loop: nextLoop }); + scheduleDraftCommit(() => applySoundEmitterChange({ loop: nextLoop })); }} /> @@ -4760,7 +4764,7 @@ export function App({ store, initialStatusMessage }: AppProps) { onChange={(event) => { const nextEnabled = event.currentTarget.checked; setInteractableEnabledDraft(nextEnabled); - applyInteractableChange({ enabled: nextEnabled }); + scheduleDraftCommit(() => applyInteractableChange({ enabled: nextEnabled })); }} />