[proposal] create a standardized equality API for components that do comparisons #292
samrichardsontylertech
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Add an
equalsproperty to components that do comparisons. This property would consist of a predicate to compare two values and determine equality.Several components currently have different implementations of the concept, for example the autocomplete's
matchKeyproperty, but these are inconsistent in naming, behavior, and which components make use of them. This results in an API that can be unpredictable or fall short of the needs of consumers. Adopting a standardized method with consistent naming and behavior across the component library should address these issues.Affected components
Benefits
The consistent API will make it easier to keep track of and customize component behavior.
Caveats
Some components may need to perform different comparisons in different situations. Having one property dedicated to determining equality could conflict with that.
Beta Was this translation helpful? Give feedback.
All reactions