fix: only render modal when explicitly opened to prevent auto-show
Change modal rendering strategy from controlled via 'open' prop to
conditional rendering. Now the Modal component is only added to DOM
when isAddModalOpen is true, preventing it from being present on page load.
Before: {actions.addNew && <Modal open={isAddModalOpen} ...>}
After: {actions.addNew && isAddModalOpen && <Modal ...>}
This ensures the modal cannot accidentally show on page load and cannot be
interfered with when it shouldn't exist.
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
BIN
node_modules/.cache/babel-loader/8cc6fe2d32e01bdb05f4edf32353fc7bcd4f833ddbb91198129c7c6962ce6dd8.json.gz
generated
vendored
Normal file
BIN
node_modules/.cache/babel-loader/8cc6fe2d32e01bdb05f4edf32353fc7bcd4f833ddbb91198129c7c6962ce6dd8.json.gz
generated
vendored
Normal file
Binary file not shown.
BIN
node_modules/.cache/babel-loader/acb512dd62b4aba9580d7caf58090f6363675a38a97ed270c522e81684d3a00c.json.gz
generated
vendored
Normal file
BIN
node_modules/.cache/babel-loader/acb512dd62b4aba9580d7caf58090f6363675a38a97ed270c522e81684d3a00c.json.gz
generated
vendored
Normal file
Binary file not shown.
Reference in New Issue
Block a user