From 9cf1883eecfc380635c7e336551c30c91498d3e4 Mon Sep 17 00:00:00 2001 From: Philipp Rudiger Date: Tue, 25 Aug 2020 00:34:16 +0200 Subject: [PATCH] Ensure DataFrame with no index is editable (#1547) --- panel/widgets/tables.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/panel/widgets/tables.py b/panel/widgets/tables.py index 1ec18d692e..596c6d582c 100644 --- a/panel/widgets/tables.py +++ b/panel/widgets/tables.py @@ -249,14 +249,14 @@ def _get_properties(self): props['autosize_mode'] = self.autosize_mode props['auto_edit'] = self.auto_edit props['row_height'] = self.row_height - props['editable'] = not self.disabled and len(self.indexes) == 1 + props['editable'] = not self.disabled and len(self.indexes) <= 1 props['sortable'] = self.sortable props['reorderable'] = self.reorderable return props def _process_param_change(self, msg): if 'disabled' in msg: - msg['editable'] = not msg.pop('disabled') and len(self.indexes) == 1 + msg['editable'] = not msg.pop('disabled') and len(self.indexes) <= 1 return super(DataFrame, self)._process_param_change(msg) def _get_model(self, doc, root=None, parent=None, comm=None):