Repository navigation
fix(native-filters): keep filter value input caret left-aligned #42266
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -25,6 +25,22 @@ export const RESPONSIVE_WIDTH = 0; | |||||||||||||||||||||||||||||||||
| export const FilterPluginStyle = styled.div<PluginFilterStylesProps>` | ||||||||||||||||||||||||||||||||||
| min-height: ${({ height }) => height}px; | ||||||||||||||||||||||||||||||||||
| width: ${({ width }) => (width === RESPONSIVE_WIDTH ? '100%' : `${width}px`)}; | ||||||||||||||||||||||||||||||||||
| /* Input / InputNumber filter value controls resolve text-align by */ | ||||||||||||||||||||||||||||||||||
| /* inheritance, so pin them to the inline start to keep the caret and typed */ | ||||||||||||||||||||||||||||||||||
| /* text at the left edge. */ | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+28
to
+30
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reword to avoid the physical-"left" framing (RTL-correct) and cover all three value controls:
Suggested change
|
||||||||||||||||||||||||||||||||||
| text-align: start; | ||||||||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we add a focused Jest regression test for this fix? Rendering |
||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| /* antd v6 sets 'text-align: center' directly on '.ant-select-content' for */ | ||||||||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The locked Ant Design 6.5.1 CSS does not set |
||||||||||||||||||||||||||||||||||
| /* multiple-mode Selects (its selector '.ant-select-multiple */ | ||||||||||||||||||||||||||||||||||
| /* .ant-select-content' has specificity 0,2,0). The Select search input */ | ||||||||||||||||||||||||||||||||||
| /* lives inside '.ant-select-content' and inherits that value, so the caret */ | ||||||||||||||||||||||||||||||||||
| /* and typed text render centered. A value inherited from this wrapper */ | ||||||||||||||||||||||||||||||||||
| /* cannot beat a rule that targets '.ant-select-content' directly, so */ | ||||||||||||||||||||||||||||||||||
| /* override the element itself: this wrapper class plus the two antd classes */ | ||||||||||||||||||||||||||||||||||
| /* give specificity 0,3,0, which wins without !important. RTL-safe. */ | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+33
to
+40
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Stock antd 6.0.0–6.5.1 doesn't set
Suggested change
|
||||||||||||||||||||||||||||||||||
| .ant-select .ant-select-content { | ||||||||||||||||||||||||||||||||||
| text-align: start; | ||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
| `; | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| export const StyledFormItem = styled(FormItem)` | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: The new comment says text is kept at the “left edge,” but the implemented rule uses
text-align: start, which maps to the right edge in RTL; update the comment to describe “inline start” instead to avoid misleading future changes and tests. [comment mismatch]Severity Level: Minor 🧹
Steps of Reproduction ✅
(Use Cmd/Ctrl + Click for best experience)
Prompt for AI Agent 🤖