Skip to content

fix(Database Browser): Cell edit not updating partial view #1255

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

Merged
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
6 changes: 6 additions & 0 deletions src/dashboard/Data/Browser/BrowserTable.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,14 @@ export default class BrowserTable extends React.Component {
let index = i - this.state.offset;
let obj = this.props.data[i];
const currentCol = this.props.current && this.props.current.row === i ? this.props.current.col : undefined;

// Needed in order to force BrowserRow to update and re-render (and possibly update columns values),
// since the "obj" instance will only be updated when the update request is done.
const isEditingRow = this.props.current && this.props.current.row === i && !!this.props.editing;

rows[index] = <BrowserRow
key={index}
isEditing={isEditingRow}
className={this.props.className}
columns={this.props.columns}
currentCol={currentCol}
Expand Down