简体   繁体   English

如何将材料表与 Material-UI 对话框相结合? (反应JS)

[英]How to combine Material-table with Material-UI Dialog? (ReactJS)

I am using action( https://material-table.com/#/docs/features/actions ) in my rows, but I want the action to be clicked and open a dialog( https://material-ui.com/components/dialogs/ ).我正在我的行中使用操作( https://material-table.com/#/docs/features/actions ),但我希望单击该操作并打开一个对话框( https://material-ui.com/组件/对话框/ )。

How to write this in actions?如何在动作中写这个? It seems that Material-UI just append the next to the click.好像Material-UI 就在append 旁边点一下。 Is it possible to do that in Material-Table?是否可以在 Material-Table 中做到这一点?

Thanks a lot!非常感谢!

Why you are using Material-Table package?为什么要使用材料表 package? you can use the Material-UI Table component.您可以使用 Material-UI 表组件。 You can see here: enter link description here你可以在这里看到:在此处输入链接描述

and you can see an example that i did here: enter link description here你可以看到我在这里做的一个例子:在此处输入链接描述

when you click on the pencil it will open the dialog当您单击铅笔时,它将打开对话框

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM