mirror of
https://github.com/gosticks/react-table.git
synced 2026-03-30 01:14:34 +00:00
16 lines
464 B
JavaScript
Executable File
16 lines
464 B
JavaScript
Executable File
const actions = {}
|
|
const types = {}
|
|
|
|
export { actions, types }
|
|
|
|
export const addActions = (...acts) => {
|
|
acts.forEach(action => {
|
|
// Action values are formatted this way to discourage
|
|
// you (the dev) from interacting with them in any way
|
|
// other than importing `{ actions } from 'react-table'`
|
|
// and referencing an action via `actions[actionName]`
|
|
actions[action] = `React Table Action: ${action}`
|
|
types[actions[action]] = true
|
|
})
|
|
}
|