MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / prev

Method prev

web/pgadmin/static/js/tree/tree.js:143–154  ·  view source on GitHub ↗
(item)

Source from the content-addressed store, hash-verified

141 }
142
143 prev(item) {
144 if (item) {
145 let parent = this.parent(item);
146 if (parent && parent.children.length > 0) {
147 let idx = parent.children.indexOf(item);
148 if (idx !== -1 && idx !== 0) {
149 return parent.children[idx - 1];
150 }
151 }
152 }
153 return null;
154 }
155
156 async open(item) {
157 if (this.isOpen(item)) { return true; }

Callers 2

partition.jsFile · 0.80
browser.jsFile · 0.80

Calls 1

parentMethod · 0.95

Tested by

no test coverage detected