liferay / clay

A web implementation of the Lexicon Experience Language
http://clayui.com
Other
207 stars 470 forks source link

Improve DualListBox API #4313

Open carloslancha opened 3 years ago

carloslancha commented 3 years ago

Current DualListBox API seems a bit confusing to me:

Shouldn't it be named maxSize, maxSideSize, maxItems, maxItemsPerSide or sth like that?

This is an array of arrays, where position 0 are the items for the left select box and the position 1 are the items for the right select box. Why don't we make it more explicit? Maybe an object items: { leftItems: [...], rightItems: [...]} or two different props instead of one leftItems: [], rightItems: []

Why not leftProps or, even better, leftSelectBoxProps

The same as above.

Also, I'm not sure about refering to the select boxes as left and right ones, since I guess (I may be wrong) that could change for RTL.

matuzalemsteles commented 1 year ago

LPS Ticket https://liferay.atlassian.net/browse/LPS-190537