mirror of
https://github.com/apache/superset.git
synced 2026-04-20 16:44:46 +00:00
* make react-virtualized table work use dynamic sizing for cell width enable filtering require height prop for result set component * fix tests and linting * move some state to props * move getTextWidth to visUtils * make striped rows optional * fix striped proptype * update name to FilterableTable * add basic test and fix linting * accept array of columns keys rather than an array of objects that needs to be mapped * move container div inside the component * rename styles * fit table component to width if it's smaller than parent container * move stylesheet to javascript folder otherwise it throws an error on npm run prod * move css to index.jsx * fix result set spec * fix linting and test * fix result set props * keep list immutable
35 lines
1.1 KiB
JavaScript
35 lines
1.1 KiB
JavaScript
import React from 'react';
|
|
import { render } from 'react-dom';
|
|
import { createStore, compose, applyMiddleware } from 'redux';
|
|
import { Provider } from 'react-redux';
|
|
import thunkMiddleware from 'redux-thunk';
|
|
|
|
import { getInitialState, sqlLabReducer } from './reducers';
|
|
import { initEnhancer } from '../reduxUtils';
|
|
import { initJQueryAjaxCSRF } from '../modules/utils';
|
|
import App from './components/App';
|
|
import { appSetup } from '../common';
|
|
|
|
require('./main.css');
|
|
require('../components/FilterableTable/FilterableTableStyles.css');
|
|
|
|
appSetup();
|
|
initJQueryAjaxCSRF();
|
|
|
|
const appContainer = document.getElementById('app');
|
|
const bootstrapData = JSON.parse(appContainer.getAttribute('data-bootstrap'));
|
|
const state = Object.assign({}, getInitialState(bootstrapData.defaultDbId), bootstrapData);
|
|
|
|
const store = createStore(
|
|
sqlLabReducer, state, compose(applyMiddleware(thunkMiddleware), initEnhancer()));
|
|
|
|
// jquery hack to highlight the navbar menu
|
|
$('a:contains("SQL Lab")').parent().addClass('active');
|
|
|
|
render(
|
|
<Provider store={store}>
|
|
<App />
|
|
</Provider>,
|
|
appContainer,
|
|
);
|