SIGN IN SIGN UP
drawdb-io / drawdb UNCLAIMED

Free, simple, and intuitive online database diagram editor and SQL generator.

0 0 86 JavaScript

Apply table width only on confirm (#943)

Fixes #858

Previously, changing the table width input in the Settings modal would
immediately update the global settings state on every keystroke, bypassing
the Confirm button entirely. Closing the modal without confirming still
applied the change.

This follows the same uncontrolled/controlled pattern already used for
MODAL.RENAME and MODAL.LANGUAGE:
- Add a local tempTableWidth state in Modal, initialized from current settings
- Pass it to SetTableWidth as props (tempWidth / setTempWidth)
- Apply to global settings only when the user clicks Confirm (onOk)
- Reset to the original value when the user clicks Cancel or closes the modal
V
Veer Shah committed
00f5173a45764a512d21259deafaa110ff49321b
Parent: 6f80712
Committed by GitHub <noreply@github.com> on 3/6/2026, 8:09:28 PM