`defaultRenderItem`
, `defaultRenderToggle`
and `defaultRenderTitle`
functions:const renderBookmarkItem = (renderProps: RenderBookmarkItemProps) =>renderProps.defaultRenderItem(renderProps.onClickItem,<>{/* Render toggle icons ... */}{/* Render the bookmark title */}{renderProps.defaultRenderTitle(() => {renderProps.onClickTitle();// Invoke our function ...})}</>);
`defaultRenderTitle`
function is triggered when users click a bookmark title:defaultRenderTitle: (onClickBookmark: () => void) => React.ReactElement;
Property | Type | Description | From |
---|---|---|---|
`onClickBookmark` | `Function` | The function triggers when users click the title | 3.7.0 |
`toggleBookmarkTab`
function to toggle the Bookmark tab when users click a bookmark:const toggleBookmarkTab = () => {toggleTab(1);};const renderBookmarkItem = (renderProps: RenderBookmarkItemProps) =>renderProps.defaultRenderItem(renderProps.onClickItem,<>...{renderProps.defaultRenderTitle(() => {renderProps.onClickTitle();toggleBookmarkTab();})}</>);
const defaultLayoutPluginInstance = defaultLayoutPlugin(...);const { toggleTab } = defaultLayoutPluginInstance;