thaw-ui/thaw

`Select` component's value should not be an `Option<T>`

Closed this issue · 2 comments

The Select component takes a Model<Option<T>> for the value. But this over complicates things in most cases, since there select would never have a None option. So the user needs to .unwrap() or match on the value every time they need to access it.

If the Option is removed, and user does in fact need a None option for their select, then they can make their own value be Option<T>, whilst the Select component itself doesn't need to care if the value uses an Option or not.

If you're happy with this change, I can implement it in #166

It's a great idea. We can implement it.

If you're happy with this change, I can implement it in #166

I feel that multiple PR is often better than a single large PR, so we can implement it after the #166 merge.

I have implemented this feature in the v0.4-beta version.