yii2-multiple-input icon indicating copy to clipboard operation
yii2-multiple-input copied to clipboard

Inconsistent input name when one column or multiple columns

Open pawelkania opened this issue 5 years ago • 1 comments

Why getElementName in MultipleInputColumn have different behavior when there is only one column? I think input should always have name like in multiple option (buttons[0][text], buttons[1][text]) or there should be param to choose behavior. Currently there is some "magic" there and behavior of widget is inconsistent so developer needs to do some debug to find reason why data is in unexpected format after removing or adding columns.

Anyway it's great extension, thanks.

pawelkania avatar May 17 '19 10:05 pawelkania

When i was implementing the prototype of the widget it was reasonable for me to not send data as array with one key in case of one field . Probably we can change such behavior in new major version to avoid breaking BC

unclead avatar May 17 '19 18:05 unclead