Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Our entity reference field widget comes with reordering functionality. When the carnality of the field is 1 this does't really make sense. It also introduces strange UX situations.
Proposed resolution
Only enable ordering for multi-value fields.
Comment | File | Size | Author |
---|---|---|---|
#2 | 2897232_2.patch | 2.04 KB | slashrsm |
Comments
Comment #2
slashrsm CreditAttribution: slashrsm at MD Systems GmbH commentedComment #3
miro_dietikerLooks cool.
The only thing i noticed is that this JS code snippet has no .once protection. But dunno if there is real risk that behaviors could be triggered twice? Anyway a different issue.
Comment #4
slashrsm CreditAttribution: slashrsm at MD Systems GmbH commentedI don't think that we need
.once()
since we're limiting the operation oncontext
, which makes sure it only gets applied to elements that are being added to the page.Comment #5
slashrsm CreditAttribution: slashrsm at MD Systems GmbH commentedCommitted.