ionic-team / ionic-team/ionic-framework

feat: select buttons should be more customizable

オープン
#21,172 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
package: core type: feature request
主要言語
TypeScript
スター
52.7k
フォーク
13.3k
平均マージ
1日 15時間
マージ済み PR(30日)
51

説明

# Feature Request

**Ionic version:**
[x] **5.0.0**

**Describe the Feature Request**

Currently the [select API](https://ionicframework.com/docs/api/select) offers a way to set the cancel text with the [cancelText property](https://ionicframework.com/docs/api/select#properties), but not a way to edit the cancel icon when action sheet is used as interface.

**Describe Preferred Solution**
Add a `cancelIcon` property that can be used for action-sheet and alert interfaces. (For action sheet especially, there no styling difference between the cancel option and the others)

**Describe Alternatives**
When adding action sheet custom properties with a "buttons" property with a role "cancel", this doesn't erase the default cancel button either.

Take buttons properties, and use the role to erase any default role that would be set by the select component.

Following attempt (cf. suggested alternative) doesn't work:
TS file:
```typescript
// .ts file
customActionSheetOptions: any = {
buttons: [{
text: 'Cancel',
icon: 'close',
role: 'cancel'
}]
};
```
HTML file:
```html
doesn't change the icon of the cancel button

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。