[buddypress-trac] [BuddyPress Trac] #8048: BuddyPress Blocks !
buddypress-trac
noreply at wordpress.org
Sun Mar 22 07:45:18 UTC 2020
#8048: BuddyPress Blocks !
-------------------------+---------------------
Reporter: imath | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 6.0.0
Component: REST API | Version:
Severity: normal | Resolution:
Keywords: has-patch |
-------------------------+---------------------
Comment (by imath):
.2.patch is improving the previous patch making available the BP
AutoCompleter component to BP Blocks developers. They just need to add a
dependency to `bp-block-components` when registering the JavaScript file
of their block to be able to use it like this:
{{{
const { AutoCompleter } = bp.blockComponents;
<AutoCompleter
component="members"
ariaLabel={ __( 'Member\'s username', 'buddypress' ) }
placeholder={ __( 'Enter Member\'s username hereā¦', 'buddypress' )
}
onSelectItem={ setAttributes }
useAvatar={ isAvatarEnabled }
/>
}}}
.2.patch is also moving Block Registration into `BP Component` classes.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8048#comment:12>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list