verbb / super-table

Super-charge your Craft workflow using Super Table.
MIT License
316 stars 47 forks source link

Dynamic usage of maxRows and minRows #527

Closed alexander-bozung closed 6 months ago

alexander-bozung commented 1 year ago

What are you trying to do?

I try to build reusable fields by using super-table blocks for example in oder to build "actions". An action for example has a field link (linkit), a text, a variant (button or textlink or something like that) etc. ... I use this super-table block "action" in different parent modules (for example with neo). Now I have modules that allow only one action to be added and others that allow two or more. To achieve this, I have tried to modify the "maxRows" field of my super-table block "actions" on a per module basis.

What's your proposed solution?

What I have tried is to use a AssetBunde (https://craftcms.com/docs/4.x/extend/asset-bundles.html) with a JavaScript that would then update the "maxRows" property - that is not working.

Is there a way to use maxRows and minRows dynamically depending on the parent element the super-table block element is used in?

Additional context

No response

engram-design commented 6 months ago

Super Table has now reached its end of life, and we'll be sticking with bug/security fixes from here on out. More in the announcement.