From d1b81e04ac7a8d4e877471432c9bccbd7b369f81 Mon Sep 17 00:00:00 2001 From: Kim Truong <47833996+khtruong@users.noreply.github.com> Date: Wed, 19 Jun 2019 16:59:39 -0700 Subject: [PATCH] Autocomplete in the table browser in SQL lab is broken (#7736) * fix: explicitly provide value and label strings * fix: spacing --- superset/assets/src/components/TableSelector.jsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/superset/assets/src/components/TableSelector.jsx b/superset/assets/src/components/TableSelector.jsx index 6d232d49405db..4d5fbc9095bf9 100644 --- a/superset/assets/src/components/TableSelector.jsx +++ b/superset/assets/src/components/TableSelector.jsx @@ -130,7 +130,12 @@ export default class TableSelector extends React.PureComponent { `${encodeURIComponent(schema)}/${encodeURIComponent(substr)}/${forceRefresh}/`); return SupersetClient.get({ endpoint }) .then(({ json }) => { - const filterOptions = createFilterOptions({ options: json.options }); + const filterOptions = createFilterOptions({ + options: json.options.map(o => ({ + value: o.value.table, + label: o.label, + })), + }); this.setState(() => ({ filterOptions, tableLoading: false,