Skip to content

Commit 02ef267

Browse files
committed
Fixed the review comments
1 parent b345211 commit 02ef267

File tree

6 files changed

+7
-10
lines changed

6 files changed

+7
-10
lines changed
1.24 KB
Loading

docs/en_US/preferences.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ Use the fields on the *Display* panel to specify general display preferences:
6060
all the shared servers from the object explorer. **Note:** This option is visible only when
6161
pgAdmin is running in server mode.
6262

63-
* When the *Show column data type?* switch is turned on, then the data types of the columns will be displayed.
63+
* When the *Show column data type?* switch is turned on, then the data types
64+
of the columns will be displayed alongside their column names.
6465

6566
* When the *Show empty object collections?* switch is turned off, then all object
6667
collections which are empty will be hidden from browser tree.

web/pgadmin/browser/register_browser_preferences.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ def register_browser_preferences(self):
3838
gettext("Show column data type?"), 'boolean', False,
3939
category_label=PREF_LABEL_DISPLAY,
4040
help_str=gettext(
41-
'If turned on, then the data type of columns will be displayed.'
41+
'If turned on, then the data types of the columns '
42+
'will be displayed alongside their column names.'
4243
)
4344
)
4445

web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/static/js/column.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ define('pgadmin.node.column', [
4545
// Overriding getNodeLabel to add datatype besides column name
4646
getNodeLabel: function(data) {
4747
let show_column_datatype = usePreferences.getState().getPreferences('browser', 'show_column_datatype');
48-
let label = data._label;
48+
let label = data.label;
4949
if (show_column_datatype?.value && data.datatype && data.displaytypname) {
5050
label += ` ${data.displaytypname}`;
5151
}

web/pgadmin/browser/static/js/node.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ define('pgadmin.browser.node', [
100100
return d;
101101
},
102102
getNodeLabel: function(data) {
103-
return data._label;
103+
return data.label;
104104
},
105105
hasId: true,
106106
///////

web/pgadmin/static/js/tree/tree_nodes.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,8 @@ export class ManageTreeNodes {
5959

6060
public addNode = (_parent: string, _path: string, _data: []) => new Promise((res) => {
6161
_data.type = _data.inode ? FileType.Directory : FileType.File;
62-
_data._label = _data.label;
6362

64-
const nodeClass = pgAdmin.Browser.Nodes[_data._type];
65-
66-
if (nodeClass && typeof nodeClass.getNodeLabel === 'function') {
67-
_data._label = nodeClass.getNodeLabel(_data);
68-
}
63+
_data._label = pgAdmin.Browser.Nodes[_data._type]?.getNodeLabel(_data);
6964

7065
_data.label = _.escape(_data.label);
7166

0 commit comments

Comments
 (0)