palantir/blueprint
Input Group component input width doesn't get update when toggle with display:nonee
開放
#5,932 建立於 2023年2月9日
P3Package: coreType: bughelp wanted
倉庫指標
- 星標
- (20,263 顆星)
- PR 合併指標
- (PR 指標待抓取)
描述
Environment
- Package version(s): 4.15.1
- Operating System: mac os M1
- Browser name and version: chrome 110.0.5481.77
Code Sandbox
https://codesandbox.io/s/loving-feistel-zs09t4?file=/src/index.tsx
Steps to reproduce
<input type="text" placeholder="Search" class="bp4-input" style="padding-left: 0px; padding-right: 0px;">
Actual behavior
When the expanded input bar is display, the padding-left and padding-right don't get update to the actual icon width. Instead, stay as 0. Search bar position looks broken.
Expected behavior
When the expanded input bar is display, padding-left and padding-right should get re-calculated and set to the actual icon width.
Possible solution
https://github.com/palantir/blueprint/blob/develop/packages/core/src/components/forms/inputGroup.tsx#L250 updateInputWidth should get triggered once visibility change.