agroptima-design-system 1.2.37 → 1.2.38-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -29,6 +29,8 @@ export function ModalDialog({
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
useEffect(() => {
|
|
32
|
+
if (!isOpen) return
|
|
33
|
+
|
|
32
34
|
keepScrollbarSpace()
|
|
33
35
|
window.addEventListener('resize', keepScrollbarSpace)
|
|
34
36
|
|
|
@@ -36,7 +38,7 @@ export function ModalDialog({
|
|
|
36
38
|
removeScrollbarSpace()
|
|
37
39
|
window.removeEventListener('resize', keepScrollbarSpace)
|
|
38
40
|
}
|
|
39
|
-
}, [])
|
|
41
|
+
}, [isOpen])
|
|
40
42
|
|
|
41
43
|
useEffect(() => {
|
|
42
44
|
const dialog = dialogRef.current
|
|
@@ -37,7 +37,7 @@ const meta = {
|
|
|
37
37
|
' <li>Require a response from the user</li>' +
|
|
38
38
|
' <li>Notify the user of any related information</li>' +
|
|
39
39
|
' <li>Confirm a user decision</li>' +
|
|
40
|
-
" <li>It's opened/closed through `isOpen` prop. If we don't want it to be part of the DOM, we can also add a conditional render on the frontend project.</li>" +
|
|
40
|
+
" <li>It's opened/closed through `isOpen` prop — the component can be left mounted and toggled. If we don't want it to be part of the DOM at all (e.g. to avoid rendering its contents until needed), we can also add a conditional render on the frontend project.</li>" +
|
|
41
41
|
' <li>Natively, focus is set on the first nested focusable element and explicitly indicated by default by the browser</li>' +
|
|
42
42
|
" <li>When nesting a Form inside Modal component, remember to add `type='button'` to all Cancel buttons to not to be considered as submitable</li>" +
|
|
43
43
|
'</ul>',
|