ionic-team / ionic-team/ionic-framework

feat: ion-select centering option

Open
#29,503 4 comments 0 reactions 0 assignees View on GitHub
package: core type: feature request
Dominant language
TypeScript
Stars
52.7k
Forks
13.3k
Avg merge
1d 15h
Merged PRs (30d)
51

Description

### Prerequisites

- [X] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#creating-an-issue).
- [X] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [X] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already include this feature request, without success.

### Describe the Feature Request

Hi,
I would like to be able to have an option on the `ion-select` to center the dropdown (with or without the label).
Thanks!

@amandaejohnston @Lechevallier

### Describe the Use Case

This is the target
![image](https://github.com/ionic-team/ionic-framework/assets/459963/2b532a97-5fc7-41b3-8257-ff8ae4a6358f)

### Describe Preferred Solution

I suppose we can add a `center` option into the select linked SCSS.
See here
https://github.com/ionic-team/ionic-framework/blob/44e1977e98b9b5a5556477dfbc5e7cba31c8c0e3/core/src/components/select/select.scss#L360-L373

### Describe Alternatives

_No response_

### Related Code

_No response_

### Additional Information

There was already a similar [ticket](https://github.com/ionic-team/ionic-framework/issues/27296) for react project
However, I cannot applied this on Angular project with the latest 7.x.

Ionic:

Ionic CLI : 7.2.0
Ionic Framework : @ionic/angular 7.8.5
@angular-devkit/build-angular : 17.3.3
@angular-devkit/schematics : 17.3.3
@angular/cli : 17.3.3
@ionic/angular-toolkit : 11.0.1

Capacitor:

Capacitor CLI : 6.0.0
@capacitor/android : 6.0.0
@capacitor/core : 6.0.0
@capacitor/ios : 6.0.0

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.