Skip to content

feat: Add row number #2737

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

Open
wants to merge 4 commits into
base: alpha
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/components/BrowserRow/BrowserRow.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export default class BrowserRow extends Component {
}
return (
<div className={styles.tableRow} style={{ minWidth: rowWidth }} onMouseOver={() => onMouseOverRow(obj.id)}>
<span className={styles.rowNumber}>{row + 1}</span>
<span
className={styles.checkCell}
onMouseUp={onMouseUpRowCheckBox}
Expand Down
5 changes: 3 additions & 2 deletions src/components/DataBrowserHeaderBar/DataBrowserHeaderBar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@
height: 30px;
vertical-align: top;
text-align: center;
width: 30px;
background: rgb(114, 111, 133)
width: 60px;
background: rgb(114, 111, 133);
padding-left: 30px;
}

.handle {
Expand Down
16 changes: 16 additions & 0 deletions src/dashboard/Data/Browser/Browser.scss
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,22 @@ body:global(.expanded) {
text-align: center;
}

.rowNumber {
display: inline-block;
width: 30px;
height: 30px;
line-height: 31px;
vertical-align: top;
border-right: 1px solid #e3e3ea;
text-align: center;
position: sticky;
left: 0;
z-index: 1;
border-bottom: 1px solid #e3e3ea;
background: white;
}


.addRow {
height: 30px;
padding: 8px;
Expand Down
4 changes: 2 additions & 2 deletions src/dashboard/Data/Browser/BrowserTable.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export default class BrowserTable extends React.Component {
const rowWidth = this.props.order.reduce(
(rowWidth, { visible, width }) => (visible ? rowWidth + width : rowWidth),
this.props.onAddRow ? 210 : 0
);
) + 30;
let editCloneRows;
if (this.props.editCloneRows) {
editCloneRows = (
Expand Down Expand Up @@ -540,7 +540,7 @@ export default class BrowserTable extends React.Component {
id="browser-table"
style={{
right: rightValue,
'overflow-x': this.props.isResizing ? 'hidden' : 'auto',
overflowX: this.props.isResizing ? 'hidden' : 'auto',
}}
>
<DataBrowserHeaderBar
Expand Down
1 change: 1 addition & 0 deletions src/dashboard/Data/Browser/BrowserToolbar.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ const BrowserToolbar = ({
}
onClick={() => onExecuteScriptRows(selection)}
/>
<div/>
</BrowserMenu>
<div className={styles.toolbarSeparator} />
{menu}
Expand Down
Loading