Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
zhangzhonghua
/
BoneHouse_Business_APP
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
7be4f296
authored
Jun 01, 2021
by
wong.peiyi
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修复过滤时正则表达试lastIndex没复位所造成的过滤不全的bug
parent
64be6ad5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
app/containers/selfOrder/module/ChooseProductPage.js
app/containers/selfOrder/module/ChooseProductPage.js
View file @
7be4f296
...
...
@@ -659,7 +659,7 @@ class ChooseProductPage extends Component {
if
(
isNotBlank
(
value
))
{
const
reg
=
new
RegExp
(
value
,
'g'
)
list
=
R
.
filter
(
item
=>
{
return
reg
.
test
(
item
[
filter
.
field
])
return
R
.
test
(
reg
,
item
[
filter
.
field
])
},
list
)
}
}))(
filterData
)
...
...
@@ -675,7 +675,7 @@ class ChooseProductPage extends Component {
const
{
searchValue
}
=
this
.
state
const
includes
=
item
=>
{
const
reg
=
new
RegExp
(
searchValue
,
'g'
)
return
reg
.
test
(
item
.
general_name
)
||
reg
.
test
(
item
.
item_name
)
return
R
.
test
(
reg
,
item
.
general_name
)
||
R
.
test
(
reg
,
item
.
item_name
)
}
return
R
.
filter
(
includes
,
list
)
}
...
...
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