Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow Select to more easily support filtering via extension #6896

Open
atmgrifter00 opened this issue Jan 22, 2024 · 1 comment
Open
Labels
area:fast-foundation Pertains to fast-foundation community:request Issues specifically reported by a member of the community.

Comments

@atmgrifter00
Copy link
Contributor

馃檵 Feature Request

We have a need to provide filtering capability for the Select, which was a mostly painless process, save for one unfortunate implementation hack. Ultimately, we had to provide an override to the set value implementation so we could reference our overridden options reference which returns a filtered set of options (just like the Combobox). However, in the Select base implementation it ultimately sets its private _value field. The only solution I had was to sidestep our linter and do something like this['_value'] = newValue;.

I'm not sure if the ultimate answer is to make _value protected or some other more official extensibility support, but I think the ideal results in clients not having to write the kind of code I mention above.

馃 Expected Behavior

I should be able to extend Select to provide filtering support without having to write non-type safe code.

馃槸 Current Behavior

Couldn't come up with a way to provide the behavior I needed without writing non-type safe code (ala this['_value'] = newValue;).

馃拋 Possible Solution

Make _value protected.

馃敠 Context

馃捇 Examples

@atmgrifter00 atmgrifter00 added the status:triage New Issue - needs triage label Jan 22, 2024
@chrisdholt chrisdholt added area:fast-foundation Pertains to fast-foundation community:request Issues specifically reported by a member of the community. and removed status:triage New Issue - needs triage labels Feb 16, 2024
@chrisdholt
Copy link
Member

I'm not against enabling extensibility through protected methods. _value is interesting, but in some sense, if you're going to take extend there is an author responsibility in my mind on doing that. I also think there is value is that over increasing complexity within the base component.

Thoughts from @KingOfTac, @radium-v, @bheston, @scomea?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:fast-foundation Pertains to fast-foundation community:request Issues specifically reported by a member of the community.
Projects
None yet
Development

No branches or pull requests

2 participants