Skip to content

Commit

Permalink
Fix type error in Login component for setData function (#454)
Browse files Browse the repository at this point in the history
- Resolved TS2345 error by ensuring `setData` accepts a boolean type.
- Updated the `onChange` handler in the `Checkbox` component to handle `e.target.checked` correctly.
- Improved type safety and compatibility for the `remember` field.
  • Loading branch information
florikodra authored Jan 24, 2025
1 parent 8fd5fef commit a9a2488
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stubs/inertia-react-ts/resources/js/Pages/Auth/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export default function Login({
name="remember"
checked={data.remember}
onChange={(e) =>
setData('remember', e.target.checked)
setData('remember', (e.target.checked || false) as false)
}
/>
<span className="ms-2 text-sm text-gray-600 dark:text-gray-400">
Expand Down

0 comments on commit a9a2488

Please sign in to comment.