@contentful/field-editor-reference 5.8.0 → 5.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3603,6 +3603,15 @@ var WrappedAssetCard = function WrappedAssetCard(props) {
3603
3603
  e.preventDefault();
3604
3604
  onEdit && onEdit();
3605
3605
  } : undefined,
3606
+
3607
+ /* todo - remove this when onKeyDown is allowed as a prop for BaseCard in forma 36
3608
+ // @ts-expect-error */
3609
+ onKeyDown: isClickable ? function (e) {
3610
+ if (e.key === 'Enter' && onEdit) {
3611
+ e.preventDefault();
3612
+ onEdit();
3613
+ }
3614
+ } : undefined,
3606
3615
  dragHandleRender: props.renderDragHandle,
3607
3616
  withDragHandle: !!props.renderDragHandle,
3608
3617
  actions: [].concat(renderActions({
@@ -3673,6 +3682,12 @@ var WrappedAssetLink = function WrappedAssetLink(props) {
3673
3682
  e.preventDefault();
3674
3683
  onEdit();
3675
3684
  },
3685
+ onKeyDown: function onKeyDown(e) {
3686
+ if (e.key === 'Enter' && onEdit) {
3687
+ e.preventDefault();
3688
+ onEdit();
3689
+ }
3690
+ },
3676
3691
  dragHandleRender: props.renderDragHandle,
3677
3692
  withDragHandle: !!props.renderDragHandle,
3678
3693
  actions: [renderActions({