-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
feat: Add row number column to data browser #2878
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
Changes from 1 commit
9d6d7af
e41a30d
9b3a7b6
7bc0052
1ede83e
d23c8d4
7b27cd3
82d123e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -33,6 +33,9 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| row, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rowValue, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rowWidth, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| showRowNumber, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rowNumberWidth, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| skip, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| selection, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| selectRow, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| setCopyableValue, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -82,12 +85,12 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| style={ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| freezeIndex >= 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ? { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| position: 'sticky', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| left: 0, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| zIndex: 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| background: rowBackground, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| borderBottom: '1px solid #e3e3ea', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| position: 'sticky', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| left: 0, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| zIndex: 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| background: rowBackground, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| borderBottom: '1px solid #e3e3ea', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| : {} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -98,6 +101,25 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| onMouseDown={e => onMouseDownRowCheckBox(e.target.checked)} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </span> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {showRowNumber && ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <span | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| className={styles.rowNumberCell} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| style={ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| freezeIndex >= 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ? { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| position: 'sticky', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| left: 30, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| zIndex: 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| background: rowBackground, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| borderBottom: '1px solid #e3e3ea', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| width: rowNumberWidth, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| : { width: rowNumberWidth } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {row >= 0 ? (skip + row + 1).toLocaleString() : ''} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </span> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| )} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Row number cell implementation looks good, but fix indentation issues. The row number cell logic is correctly implemented:
However, there are indentation issues that need to be addressed. Apply this diff to fix the indentation: {showRowNumber && (
<span
className={styles.rowNumberCell}
style={
freezeIndex >= 0
? {
- position: 'sticky',
- left: 30,
- zIndex: 1,
- background: rowBackground,
- borderBottom: '1px solid #e3e3ea',
- width: rowNumberWidth,
- }
+ position: 'sticky',
+ left: 30,
+ zIndex: 1,
+ background: rowBackground,
+ borderBottom: '1px solid #e3e3ea',
+ width: rowNumberWidth,
+ }
: { width: rowNumberWidth }
}
>
{row >= 0 ? (skip + row + 1).toLocaleString() : ''}
</span>
)}📝 Committable suggestion
Suggested change
🧰 Tools🪛 GitHub Check: Lint[failure] 113-113: [failure] 112-112: [failure] 111-111: [failure] 110-110: 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {order.map(({ name, width, visible }, j) => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (!visible) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return null; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.