widgetti / solara

A Pure Python, React-style Framework for Scaling Your Jupyter and Web Apps
https://solara.dev
MIT License
1.91k stars 141 forks source link

[Breaking change] Feature request: Align `solara.Select` & `solara.SelectMultiple` API with standard vue parameter names #837

Open ntjess opened 4 weeks ago

ntjess commented 4 weeks ago

solara.Select{Multiple} uses custom parameter names of values/all_values, when it might make more sense to use value and items.

For reference, consider the v-select widget:

items Can be an array of objects or strings. By default objects should have title and value properties, and can optionally have a props property containing any VListItem props. Keys to use for these can be changed with the item-title, item-value, and item-props props.

This would be a breaking change, but I think it's worthwhile to adopt the standard naming conventions before more components are created

As a side note, it would also resolve the confusion between values vs. on_value (no s in the callback param) for SelectMultiple, so at least there is some precedent for this breaking change to provide internal consistency even in the current version