mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 13:37:37 +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);
|
||||||
|
const contextData = tableData?.filter((v) => (field?.data?.selectedRowKeys || [])?.includes(v[rowKey]));
|
||||||
return useMemo(() => {
|
return useMemo(() => {
|
||||||
const contextData = tableData?.filter((v) => (field?.data?.selectedRowKeys || [])?.includes(v[rowKey]));
|
|
||||||
return {
|
return {
|
||||||
$user: currentUser?.data?.data || {},
|
$user: currentUser?.data?.data || {},
|
||||||
$date: {
|
$date: {
|
||||||
|
Loading…
Reference in New Issue
Block a user