我有一个MUIDataTable
,当用户单击一行时,我需要转到一个新屏幕。我只想允许一个点击的行。这是我尝试过的:
const options = {
selectableRows: true,
selectableRowsOnClick: true,
onRowClick: useHistory('/app/proposals')
};
我也尝试过使用useHistory
,但看起来没有触发点击。
表定义很简单:
<MUIDataTable
data={data.hits}
columns={columns}
options={options}
/>
为了澄清,我不需要选择行。我想立即转到另一个页面。