Skip to content
Snippets Groups Projects
Unverified Commit 907a4160 authored by Kamil Mielnik's avatar Kamil Mielnik Committed by GitHub
Browse files

Fix some warnings in JS console (#40727)

* Fix warning about passing a ref to a function component
- this didn't work and fortunately was not used (anymore) at all

* Move comment where it belongs

* Fix warning that functions cannot be react children
parent 0b27a96f
No related branches found
No related tags found
No related merge requests found
......@@ -67,14 +67,12 @@ function _init(reducers, getRoutes, callback) {
const routes = getRoutes(store);
const history = syncHistoryWithStore(browserHistory, store);
let root;
createTracker(store);
initializeEmbedding(store);
ReactDOM.render(
<Provider store={store} ref={ref => (root = ref)}>
<Provider store={store}>
<EmotionCacheProvider>
<DragDropContextProvider backend={HTML5Backend} context={{ window }}>
<ThemeProvider>
......@@ -91,7 +89,7 @@ function _init(reducers, getRoutes, callback) {
store.dispatch(refreshSiteSettings());
PLUGIN_APP_INIT_FUCTIONS.forEach(init => init({ root }));
PLUGIN_APP_INIT_FUCTIONS.forEach(init => init());
window.Metabase = window.Metabase || {};
window.Metabase.store = store;
......
......@@ -710,9 +710,9 @@ class TableInteractive extends Component {
return (
<TableDraggable
/* needs to be index+name+counter so Draggable resets after each drag */
enableUserSelectHack={false}
enableCustomUserSelectHack={!isVirtual}
/* needs to be index+name+counter so Draggable resets after each drag */
key={columnIndex + column.name + DRAG_COUNTER}
axis="x"
disabled={!isDraggable}
......@@ -1060,7 +1060,7 @@ class TableInteractive extends Component {
columnWidth={this.getDisplayColumnWidth}
cellRenderer={props =>
gutterColumn && props.columnIndex === 0
? () => null // we need a phantom cell to properly offset columns
? null // we need a phantom cell to properly offset columns
: this.tableHeaderRenderer({
...props,
columnIndex: props.columnIndex - gutterColumn,
......@@ -1089,7 +1089,7 @@ class TableInteractive extends Component {
rowHeight={ROW_HEIGHT}
cellRenderer={props =>
gutterColumn && props.columnIndex === 0
? () => null // we need a phantom cell to properly offset columns
? null // we need a phantom cell to properly offset columns
: this.cellRenderer({
...props,
columnIndex: props.columnIndex - gutterColumn,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment