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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Placeholder Binding to GoSelect Component #251

Merged
merged 2 commits into from
Oct 7, 2019

Conversation

mwagz
Copy link
Contributor

@mwagz mwagz commented Oct 7, 2019

Why do we need this?

Some implementations of select boxes require a placeholder to be designated for that select box. With our current version of the GoSelect component, we are not capable of adding a placeholder value.

How does this solve that problem?

The NgSelect module allows us to pass it a placeholder for the select box. This adds the placeholder option as a binding to the GoSelect component and then leverages that binding when creating an NgSelect instance.

Additional Information/Important Links

I leveraged the HTML for Template/Header/Footer example that NgSelect provides in order to best implement this solution.

mwagz added 2 commits October 7, 2019 12:34
Some implementations of select boxes require a placeholder to be
designated for that select box. With our current version of the GoSelect
component, we are not capable of adding a placeholder value.

The NgSelect module allows us to pass it a placeholder for the select
box. This adds the placeholder option as a binding to the GoSelect
component and then leverages that binding when creating an NgSelect
instance.

I leverged the HTML for Template/Header/Footer[0] example that NgSelect
provides in order to best implement this solution.

[0] - https://github.com/ng-select/ng-select/blob/master/src/demo/app/examples/template-header-footer-example/template-header-footer-example.component.html
@mwagz mwagz requested a review from grahamhency October 7, 2019 16:46
@grahamhency grahamhency changed the base branch from master to v1.3.0 October 7, 2019 16:51
Copy link
Contributor

@grahamhency grahamhency left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a decent change, thanks for putting this up. 👍

@grahamhency grahamhency added this to the v1.3.0 milestone Oct 7, 2019
@grahamhency grahamhency added the chore General chore or maintenance task label Oct 7, 2019
@grahamhency grahamhency merged commit 01370e8 into v1.3.0 Oct 7, 2019
@grahamhency grahamhency deleted the add_placeholder_to_goselect branch October 7, 2019 16:53
@grahamhency grahamhency mentioned this pull request Oct 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore General chore or maintenance task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants