Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] 表格2组件 查询表单设置了默认值, 打开页面第一次自动请求没有带上表单的默认值 #11360

Open
yuhonyon opened this issue Dec 12, 2024 · 1 comment
Labels
bug Something isn't working feat need confirm style Bug or PR related to component's style

Comments

@yuhonyon
Copy link

官方demo上即可复现

image

amis版本 : 6.10.0

{
"type": "page",
"title": "Hello world",
"body": [
{
"type": "tpl",
"tpl": "初始页面",
"wrapperComponent": "",
"inline": false,
"id": "u:78c4b20881ac"
},
{
"id": "u:a952755a39e4",
"type": "crud2",
"mode": "table2",
"dsType": "api",
"syncLocation": true,
"primaryField": "id",
"loadType": "pagination",
"api": {
"url": "aaaa",
"method": "get"
},
"filter": {
"type": "form",
"title": "条件查询",
"mode": "inline",
"columnCount": 3,
"clearValueOnHidden": true,
"behavior": [
"SimpleQuery"
],
"body": [
{
"name": "aaa",
"label": "aaa",
"type": "input-text",
"size": "full",
"required": false,
"behavior": "SimpleQuery",
"id": "u:9a13c9034d5a",
"value": "12"
}
],
"actions": [
{
"type": "reset",
"label": "重置",
"id": "u:48dd6626b17c"
},
{
"type": "submit",
"label": "查询",
"level": "primary",
"id": "u:08080984bd3f"
}
],
"id": "u:22e7600d6e9d",
"feat": "Insert"
},
"headerToolbar": [
{
"type": "flex",
"direction": "row",
"justify": "flex-start",
"alignItems": "stretch",
"style": {
"position": "static"
},
"items": [
{
"type": "container",
"align": "left",
"behavior": [
"Insert",
"BulkEdit",
"BulkDelete"
],
"body": [],
"wrapperBody": false,
"style": {
"flexGrow": 1,
"flex": "1 1 auto",
"position": "static",
"display": "flex",
"flexBasis": "auto",
"flexDirection": "row",
"flexWrap": "nowrap",
"alignItems": "stretch",
"justifyContent": "flex-start"
},
"id": "u:3dd254c5566b"
},
{
"type": "container",
"align": "right",
"behavior": [
"FuzzyQuery"
],
"body": [],
"wrapperBody": false,
"style": {
"flexGrow": 1,
"flex": "1 1 auto",
"position": "static",
"display": "flex",
"flexBasis": "auto",
"flexDirection": "row",
"flexWrap": "nowrap",
"alignItems": "stretch",
"justifyContent": "flex-end"
},
"id": "u:511cf3ba095f"
}
],
"id": "u:652c857754b2"
}
],
"footerToolbar": [
{
"type": "flex",
"direction": "row",
"justify": "flex-start",
"alignItems": "stretch",
"style": {
"position": "static"
},
"items": [
{
"type": "container",
"align": "left",
"body": [],
"wrapperBody": false,
"style": {
"flexGrow": 1,
"flex": "1 1 auto",
"position": "static",
"display": "flex",
"flexBasis": "auto",
"flexDirection": "row",
"flexWrap": "nowrap",
"alignItems": "stretch",
"justifyContent": "flex-start"
},
"id": "u:aeb609654851"
},
{
"type": "container",
"align": "right",
"body": [
{
"type": "pagination",
"behavior": "Pagination",
"layout": [
"total",
"perPage",
"pager"
],
"perPage": 10,
"perPageAvailable": [
10,
20,
50,
100
],
"align": "right",
"id": "u:82b385a0869a"
}
],
"wrapperBody": false,
"style": {
"flexGrow": 1,
"flex": "1 1 auto",
"position": "static",
"display": "flex",
"flexBasis": "auto",
"flexDirection": "row",
"flexWrap": "nowrap",
"alignItems": "stretch",
"justifyContent": "flex-end"
},
"id": "u:78cb40918fbb"
}
],
"id": "u:c21a81f2da25"
}
],
"columns": [
{
"type": "tpl",
"title": "aaa",
"name": "aaa",
"id": "u:dad8d8dc6d8c"
}
],
"editorSetting": {
"mock": {
"enable": true,
"maxDisplayRows": 5
}
}
}
],
"id": "u:2bd49a0bb8b9",
"asideResizor": false,
"pullRefresh": {
"disabled": true
}
}

@github-actions github-actions bot added bug Something isn't working feat style Bug or PR related to component's style labels Dec 12, 2024
Copy link

👍 Thanks for this!
🏷 I have applied any labels matching special text in your issue.

Please review the labels and make any necessary changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feat need confirm style Bug or PR related to component's style
Projects
None yet
Development

No branches or pull requests

1 participant