mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 12:26:22 +00:00
fix(client): TypeError: Cannot read properties of null (reading 'setSelectedRows')
This commit is contained in:
parent
7a35638eda
commit
749ea00058
@ -243,7 +243,7 @@ Select.Object = connect(
|
||||
|
||||
const OptionTagContext = createContext(null);
|
||||
|
||||
const SelectedRowsContext = createContext<any>(null);
|
||||
const SelectedRowsContext = createContext<any>({});
|
||||
|
||||
Select.useOkAction = () => {
|
||||
const { props } = useContext(SelectContext);
|
||||
@ -266,7 +266,7 @@ Select.useRowSelection = () => {
|
||||
Select.useSelect = () => {
|
||||
const { setSelectedRows } = useContext(SelectedRowsContext);
|
||||
return (keys, rows) => {
|
||||
setSelectedRows(rows);
|
||||
setSelectedRows && setSelectedRows(rows);
|
||||
console.log('Select.onSelect', keys, rows);
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user