mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
pass ctx prop
This commit is contained in:
parent
847700bb9b
commit
d5ba75fee3
@ -5,11 +5,11 @@ import { createIconRender } from "components/Icons"
|
||||
import "./index.less"
|
||||
|
||||
export default (props) => {
|
||||
const { items = [], cords, clickedComponent } = props
|
||||
const { items = [], cords, clickedComponent, ctx } = props
|
||||
|
||||
const handleItemClick = async (item) => {
|
||||
if (typeof item.action === "function") {
|
||||
await item.action(clickedComponent)
|
||||
await item.action(clickedComponent, ctx)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user