Closed (fixed)
Project:
Paragraphs
Version:
8.x-1.x-dev
Component:
Experimental Widget
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
11 Feb 2018 at 20:25 UTC
Updated:
25 Feb 2020 at 15:23 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
johnchqueNice catch. Let's try to get some failing tests here then. :)
Let's go to dev. :)
Comment #3
miro_dietikerAlso just stumbled across this.
We fixed something similar for the remove button.
5b5532c #2919186: Hide "Remove" button if cardinality 1 (required) and only one allowed Paragraph type
Comment #4
johnchqueWorking on this. :)
Comment #5
johnchqueThis should work. :)
Comment #7
berdirA more generic way of putting this would be to say that duplicate should follow a similar rule as adding a new paragraph. It should not be allowed if there is a fixed cardinality. So e.g. if you have cardinality 2 and 2 paragraphs you shoudln't see it but you should if you only have one.
But I think that's very hard to check inside the item loop, when you have to consider deleted paragraphs and so on.
So I think this is fine, a fixed cardinality > 1 is a pretty rare use case I think.
Comment #9
miro_dietikerYeah, let's cover the basic case here. Committed and thanks! :-)
Comment #10
Ralf Eisler commentedThank you very much for the patch, it works!
However, there is still markup left (td.field-multiple-drag.paragraph-bullet), when the field storage setting is 1 (which would’t be a problem, if the table cell collapsed).
Will you keep the the table-wrapper in the future for this use case (I do extensible backend-styling)?
Comment #11
berdirYes, we recently simplified to always show the table even when it is single value. Drag and drop changes are possible but likely then configurable.
Comment #12
Ralf Eisler commentedGreat!
Comment #14
idebr commented#7
I created a follow-up to fix this issue: #3115916: Do not show 'Duplicate' action when maximum items has been reached for fields with cardinality > 1