CDK overlay auto calculate width when using ConnectedPositionStrategy
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
#### Bug, feature request, or proposal:
Feature
#### What is the expected behavior?
That i can somehow configure the popup overlay to change it width to be the same as the parent, without having to add a bunch of custom styling to my popup component.

#### What is the current behavior?

#### What is the use-case or motivation for changing an existing behavior?
I would have to do less custom styling to get a nice dropdown
#### Is there anything else we should know?
In the screenshots we have changed the width using css, however this is suboptimal to having a responsive design, where the input can change their width all the time.
To get around the problem we have to hard-code the width of both the input and the popups, so they look to fit together.
My best suggestion would be able to do something like this:
```typescript
this.overlay.position()
.connectedTo(target, {
originY: 'bottom',
originX: 'start'
}, {
overlayY: 'top',
overlayX: 'start'
})
.immitateWidth();
```
コントリビューションガイド
調査の方向性
CDK overlay ConnectedPositionStrategy API から始め、issue に記載されたレスポンシブ幅のケースを再現してください。完了の条件は、親の変更に合わせて接続されたポップアップが親の幅に合わせられ、ポップアップコンポーネントにカスタムスタイルを適用する必要がないことです。レポートでは、特定のソースファイルやテストは指定されていません。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- 機能追加
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 38/100