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

fix: Goto Value Skips Rows on String Column, Displays Incorrect Filter, and shift+enter Doesn't go to Previous #1162

Merged
merged 6 commits into from
Mar 20, 2023

Conversation

Zhou-Ziheng
Copy link
Contributor

fixes #1156, #1157

@Zhou-Ziheng Zhou-Ziheng requested a review from mofojed March 20, 2023 14:18
@codecov
Copy link

codecov bot commented Mar 20, 2023

Codecov Report

Merging #1162 (8a693b0) into main (ac6a514) will increase coverage by 0.01%.
The diff coverage is 80.00%.

@@            Coverage Diff             @@
##             main    #1162      +/-   ##
==========================================
+ Coverage   44.13%   44.15%   +0.01%     
==========================================
  Files         447      447              
  Lines       33265    33266       +1     
  Branches     8356     8355       -1     
==========================================
+ Hits        14682    14687       +5     
+ Misses      18534    18530       -4     
  Partials       49       49              
Flag Coverage Δ
unit 44.15% <80.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/components/src/DateTimeInput.tsx 69.04% <ø> (ø)
packages/iris-grid/src/IrisGrid.tsx 27.00% <ø> (+0.03%) ⬆️
packages/iris-grid/src/GotoRow.tsx 31.25% <50.00%> (ø)
packages/components/src/MaskedInput.tsx 88.47% <100.00%> (+1.09%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@mofojed mofojed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add unit tests for checking onSubmit gets called when Enter is pushed on the input

@Zhou-Ziheng Zhou-Ziheng requested a review from mofojed March 20, 2023 14:50
packages/components/src/MaskedInput.test.tsx Outdated Show resolved Hide resolved
packages/components/src/MaskedInput.tsx Show resolved Hide resolved
@Zhou-Ziheng Zhou-Ziheng requested a review from mofojed March 20, 2023 16:00
Copy link
Member

@mofojed mofojed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason, it looks like submit is getting fired when I'm just clicking "Shift"
Enter should submit and go to next, Shift alone shouldn't do anything, and Shift+Enter should go to previous

@Zhou-Ziheng Zhou-Ziheng changed the title fix: Goto Value Skips rows on string column and displays incorrect filter fix: Goto Value Skips Rows on String Column, Displays Incorrect Filter, and shift+enter Doesn't go to Previous Mar 20, 2023
@Zhou-Ziheng Zhou-Ziheng requested a review from mofojed March 20, 2023 16:40
@Zhou-Ziheng
Copy link
Contributor Author

Looks like shift+Enter to go to previous was never implemented, so I added that as well in this PR.

@@ -100,11 +102,11 @@ function GotoRow({
}
};

const handleGotoValueKeyDown = (e: KeyboardEvent<HTMLInputElement>) => {
const handleGotoValueKeySubmit = (e: KeyboardEvent<HTMLInputElement>) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could use useCallback here

@Zhou-Ziheng Zhou-Ziheng merged commit e83d7c9 into deephaven:main Mar 20, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Mar 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DH-14483 Go to value skips valid rows
2 participants