mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Ensure newly added rows cannot be editted until we have key values. Fixes #RM2886
This commit is contained in:
parent
f0db93cefd
commit
1bc318f091
@ -668,12 +668,14 @@ define('tools.querytool', [
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Disable rows having default values
|
||||
if (!_.isUndefined(self.handler.rows_to_disable) &&
|
||||
_.indexOf(self.handler.rows_to_disable, i) !== -1
|
||||
) {
|
||||
self.handler.rows_to_disable.length > 0 &&
|
||||
_.indexOf(self.handler.rows_to_disable, i) !== -1) {
|
||||
cssClass += ' disabled_row';
|
||||
}
|
||||
|
||||
return {'cssClasses': cssClass};
|
||||
};
|
||||
|
||||
@ -825,7 +827,8 @@ define('tools.querytool', [
|
||||
// so that cell edit is enabled for that row.
|
||||
var grid = args.grid,
|
||||
row_data = grid.getDataItem(args.row),
|
||||
is_primary_key = _.all(
|
||||
is_primary_key = self.primary_keys &&
|
||||
_.all(
|
||||
_.values(
|
||||
_.pick(
|
||||
row_data, self.primary_keys
|
||||
|
Loading…
Reference in New Issue
Block a user