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.
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.
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.
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.
An issue has been fixed that wrongly triggered the initializeCopy callback when a widget was moved to another container.
Thanks again for using Scrivito!