| 241 | |
| 242 | export class FolderTableBehavior extends TableBehavior { |
| 243 | expand(column, expandIt) { |
| 244 | var data = this.data; |
| 245 | var header = column.first; |
| 246 | data.expanded = expandIt; |
| 247 | if (expandIt) { |
| 248 | header.behavior.expand(header, true); |
| 249 | this.notifier = new system.DirectoryNotifier(data.path, path => { |
| 250 | this.onDirectoryChanged(column, path); |
| 251 | }); |
| 252 | this.onDirectoryChanged(column); |
| 253 | } |
| 254 | else { |
| 255 | header.behavior.expand(header, false); |
| 256 | this.notifier.close(); |
| 257 | this.notifier = null; |
| 258 | column.empty(this.emptyIndex); |
| 259 | } |
| 260 | } |
| 261 | onCreate(column, data) { |
| 262 | this.data = data; |
| 263 | this.emptyIndex = 1; |