Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ant-design-pro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
ant-design-pro
Commits
bdc92d5c
Commit
bdc92d5c
authored
Jan 17, 2019
by
δ½δΉ
Committed by
ιεΈ
Jan 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enhance TableList: auto search after editing (#3380)
parent
acd67d21
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
14 deletions
+11
-14
mock/rule.js
mock/rule.js
+1
-8
src/pages/List/TableList.js
src/pages/List/TableList.js
+7
-3
src/services/api.js
src/services/api.js
+3
-3
No files found.
mock/rule.js
View file @
bdc92d5c
...
...
@@ -122,14 +122,7 @@ function postRule(req, res, u, b) {
break
;
}
const
result
=
{
list
:
tableListDataSource
,
pagination
:
{
total
:
tableListDataSource
.
length
,
},
};
return
res
.
json
(
result
);
return
getRule
(
req
,
res
,
u
);
}
export
default
{
...
...
src/pages/List/TableList.js
View file @
bdc92d5c
...
...
@@ -483,12 +483,16 @@ class TableList extends PureComponent {
handleUpdate
=
fields
=>
{
const
{
dispatch
}
=
this
.
props
;
const
{
formValues
}
=
this
.
state
;
dispatch
({
type
:
'
rule/update
'
,
payload
:
{
name
:
fields
.
name
,
desc
:
fields
.
desc
,
key
:
fields
.
key
,
query
:
formValues
,
body
:
{
name
:
fields
.
name
,
desc
:
fields
.
desc
,
key
:
fields
.
key
,
},
},
});
...
...
src/services/api.js
View file @
bdc92d5c
...
...
@@ -33,11 +33,11 @@ export async function addRule(params) {
});
}
export
async
function
updateRule
(
params
)
{
return
request
(
'
/api/rule
'
,
{
export
async
function
updateRule
(
params
=
{}
)
{
return
request
(
`/api/rule?
${
stringify
(
params
.
query
)}
`
,
{
method
:
'
POST
'
,
body
:
{
...
params
,
...
params
.
body
,
method
:
'
update
'
,
},
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment