fix(grid): remove WHERE and ORDER BY input placeholders
This commit is contained in:
parent
04e6e03d38
commit
12fec968fe
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in New Issue