konveyor / tackle2-ui

Tackle (2nd generation) UI component.
Apache License 2.0
8 stars 43 forks source link

:seedling: Refactor FilterSelectOptionProps #1802

Closed rszwajko closed 7 months ago

rszwajko commented 8 months ago

Key points:

  1. do not extend PF SelectOptionProps interface - this allows to add custom props to the interface and provides better control what prop are forwarded to SelectOption
  2. remove key prop as it's a special prop used internally by React
  3. use value prop according to PF documentation - effectively replace previously used key prop
  4. add label prop - to be used as human friendly representation of the value
  5. add groupLabel prop
  6. add chipLabel prop - for cases where it differs from the label prop (main use case are tag items)
rszwajko commented 7 months ago

@sjd78 the problem should be fixed in the recent force-push

sjd78 commented 7 months ago

@sjd78 the problem should be fixed in the recent force-push

The menu now closes as expected. :grinning:

sjd78 commented 7 months ago

This PR looks to be a pre-req for #1815 which is a fix for 0.3.next. Therefore this PR should target 0.3.next and be cherry-picked.

@ibolton336, does that make sense to you?