ui-state
Updaters for
uiState
reducer. Can be used in your root reducer to directly modify kepler.gl's state. Read more about Using updatersExamples
import keplerGlReducer, {uiStateUpdaters} from 'kepler.gl/reducers';
// Root Reducer
const reducers = combineReducers({
keplerGl: keplerGlReducer,
app: appReducer
});
const composedReducer = (state, action) => {
switch (action.type) {
// click button to close side panel
case 'CLICK_BUTTON':
return {
...state,
keplerGl: {
...state.keplerGl,
foo: {
...state.keplerGl.foo,
uiState: uiStateUpdaters.toggleSidePanelUpdater(
uiState, {payload: null}
)
}
}
};
}
return reducers(state, action);
};
export default composedReducer;
Add a notification to be displayed. Existing notification is going to be updated in case of matching ids.
Parameters
Delete cached export image
Parameters
Default initial
exportData
settingsDefault image export config
A list of map control visibility and whether is it active.
Hide side panel header dropdown, activated by clicking the share link on top of the side panel
Parameters
Default initial
uiState
Handles load file error and set fileLoading property to false
Parameters
state
error.error
Fired when file loading begin
Parameters
Toggle active map control panel
Parameters
Remove a notification
Parameters
Set data format for exporting data
Parameters
Whether to including data in map config, toggle between
true
or false
Parameters
Whether to export filtered data,
true
or false
Parameters
Set
exportImage.setExportImageDataUri
to a image dataUriParameters
Set
exportImage.legend
to true
or false
Parameters
Set selected dataset for export
Parameters
Hide and show side panel header dropdown, activated by clicking the share link on top of the side panel
Parameters
Set
exportImage.exporting
to true
Parameters
Toggle active map control panel
Parameters
action.payload.panelId
action.payload.index
(optional, default0
)
Show and hide modal dialog
Parameters
action.payload
(string | null) id of modal to be shown, null to hide modals. One of:-DATA_TABLE_ID
Toggle active side panel
Parameters
Handles toggle map split and reset all map control index to 0
Parameters
state
whether to export a mapbox access to HTML single page
Parameters
Last modified 2yr ago