ncovercash / ui-plugin-find-eresource

ERM-eresource-finder plugin for Stripes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ui-plugin-find-eresource

Copyright (C) 2020 The Open Library Foundation

This software is distributed under the terms of the Apache License, Version 2.0. See the file "LICENSE" for more information.

Introduction

This package furnishes a single Stripes plugin of type find-eresource, which can be included in Stripes modules by means of a <Pluggable type="find-eresource"> element. See the Plugins section of the Module Developer's Guide.

Props

Name Type Description Required default
onEresourceSelected func: (eresource) => {} Callback fired when a user clicks an eresource Yes
dataKey string Optional dataKey passed to stripes/connect when creating the connected Eresources component.
renderTrigger func: ({ triggerId, onClick, buttonRef }) => {} Optional render function for the button to open the Eresource search modal. The onClick prop should be called when the trigger is clicked (assuming it is a Button). The buttonRef ensures that the trigger button is brought back into focus once the lookup modal is closed.
showPackages boolean Optional prop to only display the packages eresources and its necessary filters true
showTitles boolean Optional prop to only display the title eresources and its necessary filters true
modalLabel string/object Optional label to use for the Modal's header. May be a string or a translation tag yielded by <FormattedMessage>
defaultOpen boolean A boolean prop to ensure the modal begins open on first render false
onClose func: () => {} A callback which, when provided, will fire on close of modal

Note: Both showPackages and showTitles props should not be passed as false. One of them needs to be true if at all both the props are being passed.

Additional information

Other modules.

See project ERM at the FOLIO issue tracker.

Other FOLIO Developer documentation is at dev.folio.org

About

ERM-eresource-finder plugin for Stripes

License:Apache License 2.0


Languages

Language:JavaScript 99.2%Language:CSS 0.8%