Skip to content

Commit 6f3a4ce

Browse files
douglasmuraokadavimacedo
authored andcommitted
fix(Database Browser): Cell edit not updating partial view (#1255)
1 parent 5cfc2e7 commit 6f3a4ce

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/dashboard/Data/Browser/BrowserTable.react.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,14 @@ export default class BrowserTable extends React.Component {
145145
let index = i - this.state.offset;
146146
let obj = this.props.data[i];
147147
const currentCol = this.props.current && this.props.current.row === i ? this.props.current.col : undefined;
148+
149+
// Needed in order to force BrowserRow to update and re-render (and possibly update columns values),
150+
// since the "obj" instance will only be updated when the update request is done.
151+
const isEditingRow = this.props.current && this.props.current.row === i && !!this.props.editing;
152+
148153
rows[index] = <BrowserRow
149154
key={index}
155+
isEditing={isEditingRow}
150156
className={this.props.className}
151157
columns={this.props.columns}
152158
currentCol={currentCol}

0 commit comments

Comments
 (0)