useBookmark

Usage

Use the hook with no input parameters (returns a list of bookmarks and functions)
1
const {
2
bookmarks,
3
bookmarkList,
4
appliedBookmark,
5
bookmarkInfo
6
applyBookmark,
7
createBookmark,
8
destroyBookmark,
9
getBookmark,
10
getBookmarkLayout,
11
updateBookmark,
12
error,
13
} = useBookmark();
14
Copied!

Bookmark Options

No options can be passed into the hook

Bookmark Properties

The following properties are returned from the hook
  • bookmarks: <object>
    • Function to return all avaible bookmarks. Returns all available bookmark information as returned by the Qlik function getBookmarks. Includes metaData of all bookmarks
  • bookmarkList: <array>
    • An array of all bookmarks in a more readable form. Returns id, titke, description, and modifiedDate
  • appliedBookmark: Function(id<string>)
    • Returns detaisl of the bookmark once it has been applied. Equivalent to getBookmark
  • bookmarkInfo: <object>
    • Returns the information for the applied bookmark. Equivalnet to running getLayout once the getBookmark has bene applied.
  • applyBookmark: Function(id<string>)
    • Apply the bookmark based on its id.
    createBookmark: Function(Title<string>, Description?<string>, id?<string>)
    • Creates a bookmark based on the title and description supplied
    • Description and id are optional.
  • destroyBookmark: Function(id<string>)
    • Removes a bookmark bsaed on its id.
    getBookmark: Function(id<string>)
    • Gets the bookmark based on its id.
    getBookmarkLayout: Function(id<string>)
    • Gets the bookmark layout based on its id.
    updateBookmark: Function(id<string>, Title<string>, Title<string>)
    • Updates the bookmarks title and description based on id supplied.
    error: <object>
    • Error code returned if there is a bokmark related error.
Last modified 1yr ago