mirror of
https://gitee.com/nocobase/nocobase.git
synced 2024-11-30 11:18:36 +08:00
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 onSuccess = over?.data?.current?.onSuccess;
|
||||
const removeParentsIfNoChildren = over?.data?.current?.removeParentsIfNoChildren ?? true;
|
||||
|
||||
if (!activeSchema || !overSchema) {
|
||||
props?.onDragEnd?.(event);
|
||||
return;
|
||||
|
@ -199,9 +199,8 @@ export const ChartConfigure: React.FC<{
|
||||
afterSave();
|
||||
return;
|
||||
}
|
||||
insert(createRendererSchema(rendererProps), {
|
||||
insert(gridRowColWrap(createRendererSchema(rendererProps)), {
|
||||
onSuccess: afterSave,
|
||||
wrap: gridRowColWrap,
|
||||
});
|
||||
}}
|
||||
onCancel={() => {
|
||||
|
@ -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>
|
||||
|
@ -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']);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user