diff --git a/.github/workflows/playwright-test-workflow.yml b/.github/workflows/playwright-test-workflow.yml index c9e8244c8f..eb2ec03eca 100644 --- a/.github/workflows/playwright-test-workflow.yml +++ b/.github/workflows/playwright-test-workflow.yml @@ -69,10 +69,23 @@ jobs: working-directory: ./packages/nc-gui run: npm run ci:run - name: Run backend + if: ${{ inputs.db == 'sqlite' }} working-directory: ./packages/nocodb run: | npm install npm run watch:run:playwright > ${{ inputs.db }}_${{ inputs.shard }}_test_backend.log & + - name: Run backend:mysql + if: ${{ inputs.db == 'mysql' }} + working-directory: ./packages/nocodb + run: | + npm install + npm run watch:run:playwright:mysql > ${{ inputs.db }}_${{ inputs.shard }}_test_backend.log & + - name: Run backend:pg + if: ${{ inputs.db == 'pg' }} + working-directory: ./packages/nocodb + run: | + npm install + npm run watch:run:playwright:pg > ${{ inputs.db }}_${{ inputs.shard }}_test_backend.log & - name: Cache playwright npm modules uses: actions/cache@v3 id: playwright-cache diff --git a/packages/nc-gui/components/cell/DatePicker.vue b/packages/nc-gui/components/cell/DatePicker.vue index 8c470da152..019eb1e586 100644 --- a/packages/nc-gui/components/cell/DatePicker.vue +++ b/packages/nc-gui/components/cell/DatePicker.vue @@ -2,6 +2,7 @@ import dayjs from 'dayjs' import { ActiveCellInj, + CellClickHookInj, ColumnInj, EditModeInj, ReadonlyInj, @@ -165,6 +166,31 @@ useSelectedCellKeyupListener(active, (e: KeyboardEvent) => { break } }) + +// use the default date picker open sync only to close the picker +const updateOpen = (next: boolean) => { + if (open.value && !next) { + open.value = false + } +} + +const cellClickHook = inject(CellClickHookInj, null) +const cellClickHandler = () => { + open.value = (active.value || editable.value) && !open.value +} +onMounted(() => { + cellClickHook?.on(cellClickHandler) +}) +onUnmounted(() => { + cellClickHook?.on(cellClickHandler) +}) + +const clickHandler = () => { + if (cellClickHook) { + return + } + cellClickHandler() +}