Scrivito JS SDK 1.44.0 Released

Posted on September 16, 2024

Interface Builder improvements

LinkTag supports data items

The LinkTag component now supports data items as navigation targets. Passing a DataItem to the to prop causes the link to point to the details page of the item concerned.

Accessing current data of a specific class

The useDataScope and useDataItem hooks can now be called with a data class name.

When useDataItem is called with a data class name, then the current data is searched for the first DataItem with the given class. If no such DataItem can be found in the current data, a matching global DataItem (via provideDataItem) is returned if it exists.

When useDataScope is called with a data class name, then the current data is searched for the first multi-item DataScope with the given class.

More flexible useDataItem hook

With the latest Scrivito SDK, the behavior of the useDataItem React hook changed. Previously, if the closest current data was a single-item DataScope, the hook still returned undefined. Now, if the current data contains a single-item DataScope, the hook returns a DataItem that corresponds to the found scope.

Further improvements

Fixed initializeCopy callback when moving widgets

An issue has been fixed that wrongly triggered the initializeCopy callback when a widget was moved to another container.

Thanks again for using Scrivito!