MitchellMarinoDev / leptos_form_tool

A declarative way to create forms for leptos.
Other
4 stars 2 forks source link

Select `with_options` method signature. #6

Closed MitchellMarinoDev closed 2 months ago

MitchellMarinoDev commented 3 months ago

When using the with_options method on the select builder, I often have an iterator of Item = &(impl ToString, impl ToString) not (impl ToString, impl ToString). Change the method signature accordingly.

MitchellMarinoDev commented 3 months ago

Ensure this still works with passing in a vec![] literal that will often happen.

MitchellMarinoDev commented 2 months ago

I think making this a borrow would cause more issues than it solves, because then all items will always need to be borrows.

If you do have a borrow, you will just need to add .map(|(v1, v2)| (v1, v2)). Which is slightly annoying, but workable.