Alter ChipsList to take a series of values and display text #19

Closed
opened 2025-11-20 16:03:28 +00:00 by BobdaFett · 1 comment
BobdaFett commented 2025-11-20 16:03:28 +00:00 (Migrated from github.com)

The ChipsList component must be able to take a series of key-value pairs that determine the value prop and the displayed text of the internal input elements.

There are two ways we could go about this:

  • Build a Vec of pairs that are passed in to the component
  • Build the Vec of pairs by taking both a values and display_text prop, then using zip inside the component's logic

I personally think that the first option is better - it allows for error handling outside of the component, which prevents some hiding of logic and improves readability.

The `ChipsList` component must be able to take a series of key-value pairs that determine the `value` prop and the displayed text of the internal `input` elements. There are two ways we could go about this: - Build a `Vec` of pairs that are passed in to the component - Build the `Vec` of pairs by taking both a `values` and `display_text` prop, then using `zip` inside the component's logic I personally think that the first option is better - it allows for error handling outside of the component, which prevents some hiding of logic and improves readability.
BobdaFett commented 2025-11-20 16:06:54 +00:00 (Migrated from github.com)

Closing this issue as it is an accidental duplicate of #14.

Closing this issue as it is an accidental duplicate of #14.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: r15-software-dev/scholarships-rs#19