-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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(explore): timestamp format when copy datatable to clipboard #17166
Conversation
417cfe0
to
61b8e21
Compare
61b8e21
to
8311a51
Compare
superset-frontend/src/explore/components/DataTableControl/index.tsx
Outdated
Show resolved
Hide resolved
return data.filter((row: Record<string, any>) => | ||
Object.values(row).some(value => | ||
value?.toString().toLowerCase().includes(filterText.toLowerCase()), | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a bit performance optimization, could we process the row of data
before calling useFilteredTableData
? (in the other words, pre-process every cell into string)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Is that what you meant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no blocking performance optimization. LGTM.
dd9de2c
to
31b1234
Compare
31b1234
to
815b3fb
Compare
Codecov Report
@@ Coverage Diff @@
## master #17166 +/- ##
==========================================
+ Coverage 76.91% 76.94% +0.02%
==========================================
Files 1039 1039
Lines 55559 55576 +17
Branches 7567 7574 +7
==========================================
+ Hits 42733 42761 +28
+ Misses 12576 12565 -11
Partials 250 250
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
…he#17166) * fix(explore): timestamp format when copy datatable to clipboard * Fix test * Fix test * Use translation for aria label * Memoize stringified cells * Fix test
SUMMARY
When user copied a data with timestamp to clipboard from data table in Exlore view, the timestamp was copied without formatting. This PR fixes that issue.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before: see linked issue
After:
Screen.Recording.2021-10-20.at.11.54.16.mov
TESTING INSTRUCTIONS
__timestamp
column in it's dataADDITIONAL INFORMATION
CC @junlincc @jinghua-qa