mirror of
https://github.com/Choices-js/Choices.git
synced 2024-05-03 06:13:35 +02:00
e6882f3e4b
* Add wrapped element getters + fix some types * Remove comment * Add missing config options to types * Add types to constants * Rename sortFn to sorter * Update PR template * Add refactor to PR template * Add passed element types to constants * Add js doc comments to actions * Add "returns" to js doc comments * Add missing choice prop to type * Add types to store.js * Add jsdoc comments to components * Ignore strict null checks * Move loading action into misc.js * Further type def additions * Rename itemCompare to valueCompare * Update badges * Rename scrollToChoice to scrollToChildElement
18 lines
328 B
JavaScript
18 lines
328 B
JavaScript
import { ACTION_TYPES } from '../constants';
|
|
|
|
/**
|
|
* @typedef {import('../../../types/index').Choices.Group} Group
|
|
*/
|
|
|
|
/**
|
|
* @param {Group} group
|
|
* @returns {{ type: string } & Group}
|
|
*/
|
|
export const addGroup = ({ value, id, active, disabled }) => ({
|
|
type: ACTION_TYPES.ADD_GROUP,
|
|
value,
|
|
id,
|
|
active,
|
|
disabled,
|
|
});
|