Skip to content

Commit

Permalink
release(modal): v1.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
surunzi committed May 10, 2024
1 parent d2b4725 commit 2e5b713
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.json
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
"modal": {
"react": true,
"icon": true,
"version": "1.2.2",
"version": "1.2.3",
"style": true,
"test": true,
"install": false,
Expand Down
6 changes: 5 additions & 1 deletion src/modal/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
## 1.2.2 (22 Apr 2023)
## 1.2.3 (10 May 2024)

* fix: react onClose unable to update

## 1.2.2 (22 Apr 2024)

* fix: title shrinked

Expand Down
2 changes: 1 addition & 1 deletion src/modal/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "modal",
"version": "1.2.2",
"version": "1.2.3",
"description": "Create modal dialogs",
"luna": {
"react": true,
Expand Down
8 changes: 8 additions & 0 deletions src/modal/react.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ const LunaModal: FC<PropsWithChildren<IModalProps>> = (props) => {
}, [props[key]])
})

useEffect(() => {
if (modal.current) {
modal.current.hide = function () {
props.onClose && props.onClose()
}
}
}, [props.onClose])

useEffect(() => {
if (modal.current) {
if (props.visible) {
Expand Down

0 comments on commit 2e5b713

Please sign in to comment.