diff --git a/.github/workflows/publish-lowcoder-cli.yml b/.github/workflows/publish-lowcoder-cli.yml index 17eafa909..2aadbe488 100644 --- a/.github/workflows/publish-lowcoder-cli.yml +++ b/.github/workflows/publish-lowcoder-cli.yml @@ -9,6 +9,7 @@ on: jobs: publish-package: + if: ${{ github.repositoryUrl == 'git://github.com/lowcoder/lowcoder.git'}} runs-on: ubuntu-latest steps: - name: Checkout repository @@ -19,7 +20,9 @@ jobs: id: check with: diff-search: true + static-checking: localIsNew file-name: client/packages/lowcoder-cli/package.json + file-url: https://unpkg.com/lowcoder-cli@latest/package.json - name: Version update detected if: steps.check.outputs.changed == 'true' diff --git a/.github/workflows/publish-lowcoder-comps.yml b/.github/workflows/publish-lowcoder-comps.yml index 40eb567e0..27ffb60f9 100644 --- a/.github/workflows/publish-lowcoder-comps.yml +++ b/.github/workflows/publish-lowcoder-comps.yml @@ -9,6 +9,7 @@ on: jobs: publish-package: + if: ${{ github.repositoryUrl == 'git://github.com/lowcoder/lowcoder.git'}} runs-on: ubuntu-latest steps: - name: Checkout repository @@ -19,7 +20,9 @@ jobs: id: check with: diff-search: true + static-checking: localIsNew file-name: client/packages/lowcoder-comps/package.json + file-url: https://unpkg.com/lowcoder-comps@latest/package.json - name: Version update detected if: steps.check.outputs.changed == 'true' diff --git a/.github/workflows/publish-lowcoder-core.yml b/.github/workflows/publish-lowcoder-core.yml index 5d36c46c7..34222ad56 100644 --- a/.github/workflows/publish-lowcoder-core.yml +++ b/.github/workflows/publish-lowcoder-core.yml @@ -9,6 +9,7 @@ on: jobs: publish-package: + if: ${{ github.repositoryUrl == 'git://github.com/lowcoder/lowcoder.git'}} runs-on: ubuntu-latest steps: - name: Checkout repository @@ -19,7 +20,9 @@ jobs: id: check with: diff-search: true + static-checking: localIsNew file-name: client/packages/lowcoder-core/package.json + file-url: https://unpkg.com/lowcoder-core@latest/package.json - name: Version update detected if: steps.check.outputs.changed == 'true' diff --git a/.github/workflows/publish-lowcoder-sdk.yml b/.github/workflows/publish-lowcoder-sdk.yml index 40d93e71a..d9385b7d9 100644 --- a/.github/workflows/publish-lowcoder-sdk.yml +++ b/.github/workflows/publish-lowcoder-sdk.yml @@ -9,6 +9,7 @@ on: jobs: publish-package: + if: ${{ github.repositoryUrl == 'git://github.com/lowcoder/lowcoder.git'}} runs-on: ubuntu-latest steps: - name: Checkout repository @@ -19,7 +20,9 @@ jobs: id: check with: diff-search: true + static-checking: localIsNew file-name: client/packages/lowcoder-sdk/package.json + file-url: https://unpkg.com/lowcoder-sdk@latest/package.json - name: Version update detected if: steps.check.outputs.changed == 'true' diff --git a/client/packages/lowcoder/src/comps/comps/tableComp/column/tableColumnComp.tsx b/client/packages/lowcoder/src/comps/comps/tableComp/column/tableColumnComp.tsx index 348ce73fa..8bf84e276 100644 --- a/client/packages/lowcoder/src/comps/comps/tableComp/column/tableColumnComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/tableComp/column/tableColumnComp.tsx @@ -27,7 +27,6 @@ import { ColorControl } from "comps/controls/colorControl"; import { JSONValue } from "util/jsonTypes"; import styled from "styled-components"; import { TextOverflowControl } from "comps/controls/textOverflowControl"; -import { TableColumnLinkStyle, styleControl } from "@lowcoder-ee/index.sdk"; import { default as Divider } from "antd/es/divider"; export type Render = ReturnType["getOriginalComp"]>; export const RenderComp = withSelectedMultiContext(ColumnTypeComp); @@ -86,6 +85,7 @@ export type CellColorViewType = (param: { export const columnChildrenMap = { // column title title: StringControl, + showTitle: withDefault(BoolControl, true), // a custom column or a data column isCustom: valueComp(false), // If it is a data column, it must be the name of the column and cannot be duplicated as a react key @@ -149,6 +149,13 @@ export class ColumnComp extends ColumnInitComp { ) ); } + if(action.type === CompActionTypes.CHANGE_VALUE) { + const title = comp.children.title.unevaledValue; + const dataIndex = comp.children.dataIndex.getView(); + if(!Boolean(title)) { + comp.children.title.dispatchChangeValueAction(dataIndex); + } + } return comp; } @@ -180,9 +187,14 @@ export class ColumnComp extends ColumnInitComp { <> {this.children.title.propertyView({ label: trans("table.columnTitle"), + placeholder: this.children.dataIndex.getView(), })} {/* FIXME: cast type currently, return type of withContext should be corrected later */} {this.children.render.getPropertyView()} + {this.children.showTitle.propertyView({ + label: trans("table.showTitle"), + tooltip: trans("table.showTitleTooltip"), + })} {ColumnTypeCompMap[columnType].canBeEditable() && this.children.editable.propertyView({ label: trans("table.editable") })} {this.children.sortable.propertyView({ @@ -311,6 +323,7 @@ export function newPrimaryColumn( title?: string, isTag?: boolean ): ConstructorToDataType { + console.log('newPrimaryColumn', title); return { title: title ?? key, dataIndex: key, diff --git a/client/packages/lowcoder/src/comps/comps/tableComp/column/tableColumnListComp.tsx b/client/packages/lowcoder/src/comps/comps/tableComp/column/tableColumnListComp.tsx index f5429ba5c..d186aad0a 100644 --- a/client/packages/lowcoder/src/comps/comps/tableComp/column/tableColumnListComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/tableComp/column/tableColumnListComp.tsx @@ -101,7 +101,6 @@ export class ColumnListComp extends ColumnListTmpComp { dynamicColumn: boolean; data: Array; }) { - console.log("dataChangedAction", param); return customAction( { type: "dataChanged", diff --git a/client/packages/lowcoder/src/comps/comps/tableComp/tableCompView.tsx b/client/packages/lowcoder/src/comps/comps/tableComp/tableCompView.tsx index a523e7c58..8ac23651d 100644 --- a/client/packages/lowcoder/src/comps/comps/tableComp/tableCompView.tsx +++ b/client/packages/lowcoder/src/comps/comps/tableComp/tableCompView.tsx @@ -553,11 +553,6 @@ function ResizeableTable(props: CustomTableProps(props: CustomTableProps { - // if (width) { - // setResizeData({ - // index: index, - // width: width, - // }); - // } - // }, onResize: (width: React.SyntheticEvent) => { if (width) { setResizeData({ diff --git a/client/packages/lowcoder/src/comps/comps/tableComp/tableToolbarComp.tsx b/client/packages/lowcoder/src/comps/comps/tableComp/tableToolbarComp.tsx index f7e8829e0..3509ce4af 100644 --- a/client/packages/lowcoder/src/comps/comps/tableComp/tableToolbarComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/tableComp/tableToolbarComp.tsx @@ -609,7 +609,7 @@ function ColumnSetting(props: { allChecked = false; } return ( - + { @@ -677,6 +677,7 @@ function ToolbarPopover(props: {