Skip to content

Commit

Permalink
Ensure DataFrame with no index is editable (#1547)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Sep 17, 2020
1 parent c759b8f commit 9cf1883
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions panel/widgets/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 9cf1883

Please sign in to comment.