mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 15:26:02 +00:00
fix: useVariablesCtx (#2390)
This commit is contained in:
parent
c7a30c314c
commit
e3b0f13923
@ -28,8 +28,8 @@ export const useVariablesCtx = (): VariablesCtx => {
|
|||||||
const currentUser = useCurrentUserContext();
|
const currentUser = useCurrentUserContext();
|
||||||
const { field, service, rowKey } = useTableBlockContext();
|
const { field, service, rowKey } = useTableBlockContext();
|
||||||
const tableData = flattenDeep(service?.data?.data);
|
const tableData = flattenDeep(service?.data?.data);
|
||||||
return useMemo(() => {
|
|
||||||
const contextData = tableData?.filter((v) => (field?.data?.selectedRowKeys || [])?.includes(v[rowKey]));
|
const contextData = tableData?.filter((v) => (field?.data?.selectedRowKeys || [])?.includes(v[rowKey]));
|
||||||
|
return useMemo(() => {
|
||||||
return {
|
return {
|
||||||
$user: currentUser?.data?.data || {},
|
$user: currentUser?.data?.data || {},
|
||||||
$date: {
|
$date: {
|
||||||
|
Loading…
Reference in New Issue
Block a user