fix(bi): issue of dnd (#2315)

This commit is contained in:
YANG QIA 2023-07-25 20:45:01 +08:00 committed by GitHub
parent 986e2414d4
commit 78bfcba24f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 13 deletions

View File

@ -20,7 +20,6 @@ const useDragEnd = (props?: any) => {
const wrapSchema = over?.data?.current?.wrapSchema;
const onSuccess = over?.data?.current?.onSuccess;
const removeParentsIfNoChildren = over?.data?.current?.removeParentsIfNoChildren ?? true;
if (!activeSchema || !overSchema) {
props?.onDragEnd?.(event);
return;

View File

@ -199,9 +199,8 @@ export const ChartConfigure: React.FC<{
afterSave();
return;
}
insert(createRendererSchema(rendererProps), {
insert(gridRowColWrap(createRendererSchema(rendererProps)), {
onSuccess: afterSave,
wrap: gridRowColWrap,
});
}}
onCancel={() => {

View File

@ -96,11 +96,7 @@ ChartRenderer.Designer = function Designer() {
</SchemaSettings.Item>
<SchemaSettings.Item
key="duplicate"
onClick={() =>
insertAdjacent('afterEnd', createRendererSchema(schema?.['x-decorator-props']), {
wrap: gridRowColWrap,
})
}
onClick={() => insertAdjacent('afterEnd', gridRowColWrap(createRendererSchema(schema?.['x-decorator-props'])))}
>
{t('Duplicate')}
</SchemaSettings.Item>

View File

@ -161,11 +161,7 @@ export const parseBuilder = (ctx: Context, builder: QueryParams) => {
});
orders.forEach((item: OrderProps) => {
const dialect = sequelize.getDialect();
let alias = `"${item.alias}"`;
if (dialect === 'mysql') {
alias = `\`${item.alias}\``;
}
const alias = sequelize.getQueryInterface().quoteIdentifier(item.alias);
const name = hasAgg ? sequelize.literal(alias) : sequelize.col(item.field as string);
order.push([name, item.order || 'ASC']);
});