mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 13:26:44 +00:00
fix: after selecting all, bulk update prompts for unselected data (#4010)
This commit is contained in:
parent
82df150c30
commit
4c3dc89f66
@ -7,7 +7,6 @@ import {
|
|||||||
useCollection_deprecated,
|
useCollection_deprecated,
|
||||||
useCompile,
|
useCompile,
|
||||||
useLocalVariables,
|
useLocalVariables,
|
||||||
useRecord,
|
|
||||||
useTableBlockContext,
|
useTableBlockContext,
|
||||||
useVariables,
|
useVariables,
|
||||||
} from '@nocobase/client';
|
} from '@nocobase/client';
|
||||||
@ -23,18 +22,15 @@ export const useCustomizeBulkUpdateActionProps = () => {
|
|||||||
const actionSchema = useFieldSchema();
|
const actionSchema = useFieldSchema();
|
||||||
const tableBlockContext = useTableBlockContext();
|
const tableBlockContext = useTableBlockContext();
|
||||||
const { rowKey } = tableBlockContext;
|
const { rowKey } = tableBlockContext;
|
||||||
const selectedRecordKeys =
|
|
||||||
tableBlockContext.field?.data?.selectedRowKeys ?? expressionScope?.selectedRecordKeys ?? {};
|
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const compile = useCompile();
|
const compile = useCompile();
|
||||||
const { t } = useBulkUpdateTranslation();
|
const { t } = useBulkUpdateTranslation();
|
||||||
const actionField: any = useField();
|
const actionField: any = useField();
|
||||||
const { modal } = App.useApp();
|
const { modal } = App.useApp();
|
||||||
const variables = useVariables();
|
const variables = useVariables();
|
||||||
const record = useRecord();
|
|
||||||
const { name, getField } = useCollection_deprecated();
|
const { name, getField } = useCollection_deprecated();
|
||||||
const localVariables = useLocalVariables();
|
const localVariables = useLocalVariables();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
async onClick(e, callBack) {
|
async onClick(e, callBack) {
|
||||||
const {
|
const {
|
||||||
@ -44,6 +40,8 @@ export const useCustomizeBulkUpdateActionProps = () => {
|
|||||||
} = actionSchema?.['x-action-settings'] ?? {};
|
} = actionSchema?.['x-action-settings'] ?? {};
|
||||||
actionField.data = field.data || {};
|
actionField.data = field.data || {};
|
||||||
actionField.data.loading = true;
|
actionField.data.loading = true;
|
||||||
|
const selectedRecordKeys =
|
||||||
|
tableBlockContext.field?.data?.selectedRowKeys ?? expressionScope?.selectedRecordKeys ?? {};
|
||||||
|
|
||||||
const assignedValues = {};
|
const assignedValues = {};
|
||||||
const waitList = Object.keys(originalAssignedValues).map(async (key) => {
|
const waitList = Object.keys(originalAssignedValues).map(async (key) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user