fix(bi): issue of dnd (#2315)
This commit is contained in:
parent
986e2414d4
commit
78bfcba24f
@ -20,7 +20,6 @@ const useDragEnd = (props?: any) => {
|
|||||||
const wrapSchema = over?.data?.current?.wrapSchema;
|
const wrapSchema = over?.data?.current?.wrapSchema;
|
||||||
const onSuccess = over?.data?.current?.onSuccess;
|
const onSuccess = over?.data?.current?.onSuccess;
|
||||||
const removeParentsIfNoChildren = over?.data?.current?.removeParentsIfNoChildren ?? true;
|
const removeParentsIfNoChildren = over?.data?.current?.removeParentsIfNoChildren ?? true;
|
||||||
|
|
||||||
if (!activeSchema || !overSchema) {
|
if (!activeSchema || !overSchema) {
|
||||||
props?.onDragEnd?.(event);
|
props?.onDragEnd?.(event);
|
||||||
return;
|
return;
|
||||||
|
@ -199,9 +199,8 @@ export const ChartConfigure: React.FC<{
|
|||||||
afterSave();
|
afterSave();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
insert(createRendererSchema(rendererProps), {
|
insert(gridRowColWrap(createRendererSchema(rendererProps)), {
|
||||||
onSuccess: afterSave,
|
onSuccess: afterSave,
|
||||||
wrap: gridRowColWrap,
|
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
|
@ -96,11 +96,7 @@ ChartRenderer.Designer = function Designer() {
|
|||||||
</SchemaSettings.Item>
|
</SchemaSettings.Item>
|
||||||
<SchemaSettings.Item
|
<SchemaSettings.Item
|
||||||
key="duplicate"
|
key="duplicate"
|
||||||
onClick={() =>
|
onClick={() => insertAdjacent('afterEnd', gridRowColWrap(createRendererSchema(schema?.['x-decorator-props'])))}
|
||||||
insertAdjacent('afterEnd', createRendererSchema(schema?.['x-decorator-props']), {
|
|
||||||
wrap: gridRowColWrap,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
{t('Duplicate')}
|
{t('Duplicate')}
|
||||||
</SchemaSettings.Item>
|
</SchemaSettings.Item>
|
||||||
|
@ -161,11 +161,7 @@ export const parseBuilder = (ctx: Context, builder: QueryParams) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
orders.forEach((item: OrderProps) => {
|
orders.forEach((item: OrderProps) => {
|
||||||
const dialect = sequelize.getDialect();
|
const alias = sequelize.getQueryInterface().quoteIdentifier(item.alias);
|
||||||
let alias = `"${item.alias}"`;
|
|
||||||
if (dialect === 'mysql') {
|
|
||||||
alias = `\`${item.alias}\``;
|
|
||||||
}
|
|
||||||
const name = hasAgg ? sequelize.literal(alias) : sequelize.col(item.field as string);
|
const name = hasAgg ? sequelize.literal(alias) : sequelize.col(item.field as string);
|
||||||
order.push([name, item.order || 'ASC']);
|
order.push([name, item.order || 'ASC']);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user