fix(grid): remove WHERE and ORDER BY input placeholders

This commit is contained in:
t8y2 2026-05-14 14:05:22 +08:00
parent 04e6e03d38
commit 12fec968fe
2 changed files with 4 additions and 3 deletions

View File

@ -78,7 +78,8 @@ pub async fn update_document(
doc_json: &str,
) -> Result<u64, String> {
let oid = mongodb::bson::oid::ObjectId::parse_str(id).map_err(|e| format!("Invalid ObjectId: {e}"))?;
let new_doc: Document = serde_json::from_str(doc_json).map_err(|e| format!("Invalid JSON: {e}"))?;
let mut new_doc: Document = serde_json::from_str(doc_json).map_err(|e| format!("Invalid JSON: {e}"))?;
new_doc.remove("_id");
let col = client.database(database).collection::<Document>(collection);
let result = col.replace_one(doc! { "_id": oid }, new_doc).await.map_err(|e| e.to_string())?;
Ok(result.modified_count)

View File

@ -1984,7 +1984,7 @@ defineExpose({
autocorrect="off"
spellcheck="false"
class="flex-1 h-5 min-w-0 text-xs bg-transparent outline-none placeholder:text-muted-foreground/60"
placeholder="condition..."
placeholder=""
@keydown="onWhereFilterKeydown"
@click="updateWhereSuggestionPosition"
@blur="dismissWhereSuggestions"
@ -2037,7 +2037,7 @@ defineExpose({
autocorrect="off"
spellcheck="false"
class="flex-1 h-5 min-w-0 text-xs bg-transparent outline-none placeholder:text-muted-foreground/60"
placeholder="columns..."
placeholder=""
@keydown="onOrderByKeydown"
@click="updateOrderBySuggestionPosition"
@blur="dismissOrderBySuggestions"