I have been trying to use the NEW DASH TABLE . It’s been great but I am facing some issues. The table is not editable even though I have specified editable=True and the checkboxes aren’t selectable. Am I doing something wrong? I went through the documentation for the table but couldn’t have it figured.
. Please see the attached gif.CALLBACK::
@app.callback(Output('fileListTable2', 'data'),
[Input('fileInput', 'value')])
def fileListUpdate(fileInput):
newlist = []
datec = []
datem = []
if os.path.isdir(fileInput):
fileList = os.listdir(fileInput)
for names in fileList:
if names.endswith(".txt") or names.endswith(".csv") or names.endswith(".xls") or names.endswith(".xlsx"):
newlist.append(names)
datec = os.path.getctime(os.path.join(fileInput, names))
datem = os.path.getmtime(os.path.join(fileInput, names))
tess = pd.DataFrame({'File Name': newlist,
'File Created': datetime.fromtimestamp(datec).strftime('%Y-%m-%d %H:%M:%S'),
'File Modified': datetime.fromtimestamp(datem).strftime('%Y-%m-%d %H:%M:%S')},
columns=['File Name', 'File Created', 'File Modified'])
return tess.to_dict('records')
LAYOUT ::
html.Div(
dt.DataTable(
columns=([{'name': 'File Name', 'id': 'File Name'}, {'name': 'File Created', 'id': 'File Created'},
{'name': 'File Modified', 'id': 'File Modified'}]),
data=[{}],
editable=True,
id='fileListTable2')),
I’ll create an issue if anyone can confirm that its a bug.