Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
bdf6d4d4
Unverified
Commit
bdf6d4d4
authored
Oct 27, 2022
by
boojack
Committed by
GitHub
Oct 27, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: case-insensitive search (#347)
parent
cb2e1ae3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
4 deletions
+3
-4
MemoEditor.tsx
web/src/components/MemoEditor.tsx
+1
-1
MemoList.tsx
web/src/components/MemoList.tsx
+1
-2
filter.ts
web/src/helpers/filter.ts
+1
-1
No files found.
web/src/components/MemoEditor.tsx
View file @
bdf6d4d4
...
@@ -396,7 +396,7 @@ const MemoEditor: React.FC = () => {
...
@@ -396,7 +396,7 @@ const MemoEditor: React.FC = () => {
/>
/>
</
div
>
</
div
>
<
div
className=
"btns-container"
>
<
div
className=
"btns-container"
>
<
button
className=
"action-btn confirm-btn"
disabled=
{
!
allowSave
}
onClick=
{
handleSaveBtnClick
}
>
<
button
className=
"action-btn confirm-btn"
disabled=
{
!
allowSave
||
state
.
isUploadingResource
}
onClick=
{
handleSaveBtnClick
}
>
{
t
(
"editor.save"
)
}
{
t
(
"editor.save"
)
}
<
img
className=
"icon-img"
src=
"/logo.webp"
/>
<
img
className=
"icon-img"
src=
"/logo.webp"
/>
</
button
>
</
button
>
...
...
web/src/components/MemoList.tsx
View file @
bdf6d4d4
...
@@ -32,7 +32,6 @@ const MemoList = () => {
...
@@ -32,7 +32,6 @@ const MemoList = () => {
shouldShow
=
checkShouldShowMemoWithFilters
(
memo
,
filters
);
shouldShow
=
checkShouldShowMemoWithFilters
(
memo
,
filters
);
}
}
}
}
if
(
tagQuery
)
{
if
(
tagQuery
)
{
const
tagsSet
=
new
Set
<
string
>
();
const
tagsSet
=
new
Set
<
string
>
();
for
(
const
t
of
Array
.
from
(
memo
.
content
.
match
(
new
RegExp
(
TAG_REG
,
"g"
))
??
[]))
{
for
(
const
t
of
Array
.
from
(
memo
.
content
.
match
(
new
RegExp
(
TAG_REG
,
"g"
))
??
[]))
{
...
@@ -63,7 +62,7 @@ const MemoList = () => {
...
@@ -63,7 +62,7 @@ const MemoList = () => {
shouldShow
=
false
;
shouldShow
=
false
;
}
}
}
}
if (textQuery
&&
!memo.content.
includes(textQuery
))
{
if (textQuery
&&
!memo.content.
toLowerCase().includes(textQuery.toLowerCase()
))
{
shouldShow
=
false
;
shouldShow
=
false
;
}
}
...
...
web/src/helpers/filter.ts
View file @
bdf6d4d4
...
@@ -142,7 +142,7 @@ export const checkShouldShowMemo = (memo: Memo, filter: Filter) => {
...
@@ -142,7 +142,7 @@ export const checkShouldShowMemo = (memo: Memo, filter: Filter) => {
}
}
shouldShow
=
matched
;
shouldShow
=
matched
;
}
else
if
(
type
===
"TEXT"
)
{
}
else
if
(
type
===
"TEXT"
)
{
let
contained
=
memo
.
content
.
includes
(
value
);
let
contained
=
memo
.
content
.
toLowerCase
().
includes
(
value
.
toLowerCase
()
);
if
(
operator
===
"NOT_CONTAIN"
)
{
if
(
operator
===
"NOT_CONTAIN"
)
{
contained
=
!
contained
;
contained
=
!
contained
;
}
}
...
...
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