New features
- The
Button
component has newtestId
property that is identical with thedata-testid
attribute - The Scroll Mode plugin provides new function to switch mode programmatically:
const scrollModePluginInstance = scrollModePlugin();
const { switchScrollMode } = scrollModePluginInstance;
// Switch to Wrapped mode
switchScrollMode(ScrollMode.Wrapped);
You might find it useful when using with the full screen plugin. The following sample code switches the scroll mode after entering the full screen mode:
const defaultLayoutPluginInstance = defaultLayoutPlugin({
toolbarPlugin: {
fullScreenPlugin: {
onEnterFullScreen: (zoom) => {
zoom(SpecialZoomLevel.PageFit);
defaultLayoutPluginInstance.toolbarPluginInstance.scrollModePluginInstance.switchScrollMode(
ScrollMode.Wrapped
);
},
onExitFullScreen: (zoom) => {
zoom(SpecialZoomLevel.PageWidth);
defaultLayoutPluginInstance.toolbarPluginInstance.scrollModePluginInstance.switchScrollMode(
ScrollMode.Horizontal
);
},
},
},
});
Improvements
- Cache pages' labels. So we won't see blink in the current page label when navigating between pages
- Keep the file name when downloading a file opened from local
- It's possible to remove the sidebar created by the default layout plugin:
const defaultLayoutPluginInstance = defaultLayoutPlugin({
sidebarTabs: () => [],
});
Bug fixes
- Can't use special characters such as
(
,)
,[
,]
,*
in the keyword - Downloading document doesn't work on iOS Safari and iOS Chrome
- The Get File plugin doesn't work with a file which is opened with credentials
- The highlight area aren't displayed
- The
selectedText
prop ofRenderHighlightContentProps
isn't correct