Skip to content

Commit b202f59

Browse files
committed
Disable column in JS
1 parent 64b9df7 commit b202f59

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

assets/js/messages.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,13 @@
3636
this.setTitleContents();
3737
}
3838

39-
this.togglePruned = function(isHide) {
40-
this.pruneMessages = isHide;
39+
this.togglePruned = function(isPrune) {
40+
this.pruneMessages = isPrune;
4141
this.setTitleContents();
42+
43+
this.tableElement.table('setColumnConfiguration', 'to', {
44+
readOnly: isPrune
45+
});
4246
}
4347

4448
this.setToolbarContents = function(tableToolbar) {

controllers/Messages.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,6 @@ public function prepareTable()
143143
// Make table config, make default column read only
144144
$config = $this->makeConfig('config_table.yaml');
145145

146-
if ($this->pruneMessages) {
147-
$config->columns['to']['readOnly'] = true;
148-
}
149-
150146
// Make table widget
151147
$widget = $this->makeWidget(\Backend\Widgets\Table::class, $config);
152148
$widget->bindToController();

0 commit comments

Comments
 (0)