我正在尝试关闭 ant design Select 上的自动完成功能,但我尝试的任何方法都不起作用。这显然是有问题的,因为 chromes(此时仅测试了一个)自动完成完全覆盖了选择选项(下图)。
我在 React 中使用 antd 并在 Select 标签和 Form 标签上尝试了以下内容:
autoComplete="off"
autoComplete="nope"
autoComplete="business-state"
他们似乎都没有关闭它。
这是一个指向几乎相同代码的代码沙箱的链接,但问题是它不会重现相同的问题。出于某种原因,沙箱上完全相同的代码不显示自动完成。我添加了一个电子邮件输入来显示以测试自动完成是否适用于它,并且确实可以。我不知道为什么这在沙箱中的工作方式与我的服务器不同。
https://codesandbox.io/s/wovnzpl9xw
这是当用户键入以搜索选项时的样子
这是它应该是什么样子(它只是在焦点上看起来像这样,但是一旦用户键入 chrome 就会显示自动完成)
我先运行聚合管道,然后填充,然后尝试获取特定的数据模型,但现在还不够。
最后所需的结果如下:
[
{
_accountId: "5beee0966d17bc42501f1234",
name: "Company Name 1",
contactEmail: "email1@email.com",
contactName: "contact Name 1"
reason: "Warranties",
total: 1152,
lineItems: [
{
_id: "5beee0966d17bc42501f5086",
jobsiteAddress: "1234 Street Southwest Sunnyville, Wyoming 12345",
warrantyFee: 384
},
{
_id: "5bf43929e7179a56e21382bc",
jobsiteAddress: "1234 Street Southwest Sunnyville, Wyoming 12345",
warrantyFee: 384
},
{
_id: "5bf4392fe7179a56e21382bd",
jobsiteAddress: "1234 Street Southwest Sunnyville, Wyoming 12345",
warrantyFee: 384
}
]
},
{
_accountId: "5beee0966d17bc42501f1235",
name: "Company Name 2",
contactEmail: "email2@email.com",
contactName: "contact Name 2"
reason: "Warranties",
total: 1152, …Run Code Online (Sandbox Code Playgroud) mongoose mongodb mongodb-query aggregation-framework mongoose-populate
我正在尝试将这五个更新语句组合在一起.我确信这很简单,但我是SQL的新手,无法理解逻辑.
$usqlM1 = "UPDATE tblmaincircles SET mcName= '".$_POST['mcNameM1']."' WHERE mcID='M1';"
$usqlM2 = "UPDATE tblmaincircles SET mcName= '".$_POST['mcNameM2']."' WHERE mcID='M2';";
$usqlM3 = "UPDATE tblmaincircles SET mcName= '".$_POST['mcNameM3']."' WHERE mcID='M3';";
$usqlM4 = "UPDATE tblmaincircles SET mcName= '".$_POST['mcNameM4']."' WHERE mcID='M4';";
$usqlM5 = "UPDATE tblmaincircles SET mcName= '".$_POST['mcNameM5']."' WHERE mcID='M5';";
Run Code Online (Sandbox Code Playgroud)
任何帮助都会很棒.提前致谢!
我有一个看起来像这样的文件:
{
"_id": {
"$oid": "5b1586ccf0c56353e89d330b"
},
"address": {
"street": "123 Street",
"address2": "Address 2",
"city": "Some City",
"state": "MI",
"zip": "12345"
},
"subs": [
{
"invoices": [
{
"address": {
"street": "3061 Pine Ave SW",
"city": "Grandville",
"state": "AK",
"zip": "49418"
},
"lineItem": [
{
"images": [
{
"_id": {
"$oid": "5b1fca54e6ee1d80c463612d"
},
"name": "1528810066348_RSA Logo.jpeg",
"url": "https....",
"uploadDate": {
"$date": "2018-06-12T13:27:46.931Z"
},
"size": 91819
}
],
"_id": {
"$oid": "5b1fca54e6ee1d80c463612c"
},
"desc": "2",
"amt": 2
}
],
"_id": …Run Code Online (Sandbox Code Playgroud) 我正在尝试获取动态添加到地图的标记的边界。我的目标是动态地将标记添加到地图中,并使视图自动缩放以适合地图上所有标记的边界。以下是我当前的代码以及迄今为止我所尝试过的:
起点是经纬度数组:
该网页提供了用户可以选择和取消选择的地址和复选框的列表。选择所需的地址后,用户可以单击地图上的视图,标记将出现在地图上(这工作正常,我只是无法将视图缩放到这些标记的边界)
我有一个循环,为每个检查的地址提取纬度和经度并将其推入数组中,如下所示:
latLng.push(42.9570316,-86.04564429999999);
latLng.push(43.009381,-85.890041);
Run Code Online (Sandbox Code Playgroud)
...这是一个循环,因此它始终包含所需数量的值并输出:
latLng = [42.9570316,-86.04564429999999,43.009381,-85.890041,43.11996200000001,-85.42854699999998,43.153376,-85.4730639,42.8976947,-85.88893200000001];
var thisLatLng = L.latLng(latLng);
console.log(thisLatLng); // this returns Null
mymap.fitBounds(group); // returns Error: Bounds are not Valid
mymap.fitBounds(group.getBounds()); // returns group.getBounds() is not a function
Run Code Online (Sandbox Code Playgroud)
我也尝试过以此作为起点:
latlng.push(L.marker([42.9570316,-86.04564429999999]));
latlng.push(L.marker([43.009381,-85.890041]));
Run Code Online (Sandbox Code Playgroud)
...这包含在一个循环中,该循环会产生以下输出
latLng = [L.marker([42.9570316,-86.04564429999999]),L.marker([43.009381,-85.890041]),L.marker([43.11996200000001,-85.42854699999998]),L.marker([43.153376,-85.4730639]),L.marker([42.8976947,-85.88893200000001])];
console.log(latLng); // this returns makrers with the correct lat & lng above
var group = new L.featureGroup(latLng);
console.log(group); //this returns a Null featureGroup
mymap.fitBounds(group); // returns Error: Bounds are not valid
mymap.fitBounds(group.getBounds()); // returns Error: Bounds are not …Run Code Online (Sandbox Code Playgroud) mongodb ×2
mongoose ×2
antd ×1
autocomplete ×1
javascript ×1
leaflet ×1
mysql ×1
reactjs ×1
sql ×1
sql-update ×1