Add an event to CTB banner button (#10687)

* Add event to CTB banner button

Signed-off-by: HichamELBSI <elabbassih@gmail.com>

* Change event name

Signed-off-by: HichamELBSI <elabbassih@gmail.com>
This commit is contained in:
ELABBASSI Hicham 2021-08-04 16:38:13 +02:00 committed by GitHub
parent 7b487059a0
commit ae6aa271a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,10 +40,11 @@ function List({
isSub,
dzName,
}) {
const { formatMessage } = useGlobalContext();
const { formatMessage, emitEvent } = useGlobalContext();
const { isInDevelopmentMode, modifiedData } = useDataManager();
const { openModalAddField } = useListView();
const onClickAddField = () => {
emitEvent('hasClickedCTBAddFieldBanner');
const firstComponentIcon = get(
modifiedData,
['components', firstLoopComponentUid, 'schema', 'icon'],