mirror of
https://github.com/strapi/strapi.git
synced 2025-12-01 09:35:26 +00:00
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:
parent
7b487059a0
commit
ae6aa271a2
@ -40,10 +40,11 @@ function List({
|
|||||||
isSub,
|
isSub,
|
||||||
dzName,
|
dzName,
|
||||||
}) {
|
}) {
|
||||||
const { formatMessage } = useGlobalContext();
|
const { formatMessage, emitEvent } = useGlobalContext();
|
||||||
const { isInDevelopmentMode, modifiedData } = useDataManager();
|
const { isInDevelopmentMode, modifiedData } = useDataManager();
|
||||||
const { openModalAddField } = useListView();
|
const { openModalAddField } = useListView();
|
||||||
const onClickAddField = () => {
|
const onClickAddField = () => {
|
||||||
|
emitEvent('hasClickedCTBAddFieldBanner');
|
||||||
const firstComponentIcon = get(
|
const firstComponentIcon = get(
|
||||||
modifiedData,
|
modifiedData,
|
||||||
['components', firstLoopComponentUid, 'schema', 'icon'],
|
['components', firstLoopComponentUid, 'schema', 'icon'],
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user