Commit 9c6dbcdcc4a169e1ebd36e651ce41717796159d5
1 parent
899ad697
Common event name constants, used by $emit and $on - DRY
This is not all of them, just those found during the select rework
Showing
1 changed file
with
27 additions
and
0 deletions
Show diff stats
1 | +import { | |
2 | + APPEND, | |
3 | + CHANGE, | |
4 | + CLOSE, | |
5 | + DESTROY, | |
6 | + FORM, | |
7 | + ON, | |
8 | + POPPER, | |
9 | + QUERY, | |
10 | + REMOVE, | |
11 | + SELECT, | |
12 | + SELECTED, | |
13 | + UPDATE, | |
14 | +} from './constants'; | |
15 | +import { | |
16 | + kebabJoin, | |
17 | +} from './assist'; | |
18 | + | |
19 | +export const EVENT_APPEND = kebabJoin(APPEND); | |
20 | +export const EVENT_ON_CHANGE = kebabJoin(ON, CHANGE); | |
21 | +export const EVENT_ON_DESTROY_POPPER = kebabJoin(ON, DESTROY, POPPER); | |
22 | +export const EVENT_ON_FORM_CHANGE = kebabJoin(ON, FORM, CHANGE); | |
23 | +export const EVENT_ON_QUERY_CHANGE = kebabJoin(ON, QUERY, CHANGE); | |
24 | +export const EVENT_ON_SELECT_CLOSE = kebabJoin(ON, SELECT, CLOSE); | |
25 | +export const EVENT_ON_SELECT_SELECTED = kebabJoin(ON, SELECT, SELECTED); | |
26 | +export const EVENT_ON_UPDATE_POPPER = kebabJoin(ON, UPDATE, POPPER); | |
27 | +export const EVENT_REMOVE = kebabJoin(REMOVE); | ... | ... |