Skip to content

Commit

Permalink
release(toolbar): v0.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
surunzi committed Oct 30, 2024
1 parent 0ab3bfa commit a09e3fe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.json
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@
},
"toolbar": {
"react": true,
"version": "0.6.0",
"version": "0.6.1",
"style": true,
"icon": false,
"test": true,
Expand Down
2 changes: 1 addition & 1 deletion src/toolbar/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "toolbar",
"version": "0.6.0",
"version": "0.6.1",
"description": "Application toolbar",
"luna": {
"react": true
Expand Down
3 changes: 2 additions & 1 deletion src/toolbar/react.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import Toolbar, {
IButtonState,
} from './index'
import $ from 'licia/$'
import isUndef from 'licia/isUndef'
import { useForceUpdate } from '../share/hooks'
import { IComponentOptions } from '../share/Component'
import { createPortal } from 'react-dom'
Expand Down Expand Up @@ -117,7 +118,7 @@ export const LunaToolbarButton: FC<PropsWithChildren<IToolbarButtonProps>> = (
}, [props.toolbar])

useEffect(() => {
if (toolbarButton.current && props.state) {
if (toolbarButton.current && !isUndef(props.state)) {
toolbarButton.current.setState(props.state)
}
}, [props.state])
Expand Down

0 comments on commit a09e3fe

Please sign in to comment.