mirror of
https://github.com/t8y2/dbx.git
synced 2026-11-02 08:30:35 +00:00
fix(grid): remove unused keyless edit warning logic
This commit is contained in:
@@ -85,7 +85,6 @@ import {
|
||||
hiveTablePropertiesIndicateTransactional,
|
||||
isHiddenGridColumn,
|
||||
isTdengineExistingRowReadonlyColumn,
|
||||
usesKeylessRowPredicate,
|
||||
usesSyntheticRowIdKey,
|
||||
} from "@/lib/tableEditing";
|
||||
import { formatGridSqlLiteral } from "@/lib/dataGridSql";
|
||||
@@ -1260,14 +1259,6 @@ const canEditExistingRows = computed(
|
||||
!!props.customSave ||
|
||||
canEditExistingTableRows(props.databaseType, hiveTableTransactional.value, props.tableMeta?.primaryKeys ?? []),
|
||||
);
|
||||
const showKeylessEditWarning = computed(
|
||||
() =>
|
||||
props.context === "table-data" &&
|
||||
!!props.editable &&
|
||||
!!props.tableMeta &&
|
||||
props.tableMeta.primaryKeys.length === 0 &&
|
||||
usesKeylessRowPredicate(props.databaseType),
|
||||
);
|
||||
watch(
|
||||
() => [props.databaseType, props.connectionId, props.database, props.tableMeta?.schema, props.tableMeta?.tableName],
|
||||
async () => {
|
||||
@@ -3210,19 +3201,6 @@ defineExpose({
|
||||
{{ queryEditabilityHint }}
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
<Tooltip v-if="showKeylessEditWarning">
|
||||
<TooltipTrigger as-child>
|
||||
<div
|
||||
class="flex h-5 items-center gap-1 rounded border border-amber-500/30 bg-amber-500/10 px-1.5 text-xs font-medium text-amber-700 dark:text-amber-300"
|
||||
>
|
||||
<TriangleAlert class="h-3 w-3" />
|
||||
{{ t("grid.keylessEditWarning") }}
|
||||
</div>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="bottom" class="max-w-sm">
|
||||
{{ t("grid.keylessEditWarningHint") }}
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
|
||||
Reference in New Issue
Block a user