Skip to content

Commit 10ad7af

Browse files
authored
Allow non-control input elements to be visible inside of control components (#7494)
1 parent 745fd6b commit 10ad7af

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

packages/core/src/common/classes.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ export const TEXT_AREA = `${NS}-text-area`;
194194
export const TEXT_AREA_AUTO_RESIZE = `${TEXT_AREA}-auto-resize`;
195195

196196
export const CONTROL = `${NS}-control`;
197+
export const CONTROL_INPUT = `${CONTROL}-input`;
197198
export const CONTROL_INDICATOR = `${CONTROL}-indicator`;
198199
export const CONTROL_INDICATOR_CHILD = `${CONTROL_INDICATOR}-child`;
199200
export const CHECKBOX = `${NS}-checkbox`;

packages/core/src/components/forms/_controls.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ $control-indicator-spacing: $pt-grid-size !default;
144144
margin-inline-end: $pt-grid-size * 2;
145145
}
146146

147-
input {
147+
.#{$ns}-control-input {
148148
left: 0;
149149
opacity: 0;
150150
position: absolute;

packages/core/src/components/forms/controls.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const ControlInternal: React.FC<ControlInternalProps> = React.forwardRef<HTMLLab
6969
return React.createElement(
7070
tagName,
7171
{ className: classes, ref, style },
72-
<input {...htmlProps} ref={inputRef} type={type} />,
72+
<input className={Classes.CONTROL_INPUT} {...htmlProps} ref={inputRef} type={type} />,
7373
<span className={Classes.CONTROL_INDICATOR}>{indicatorChildren}</span>,
7474
label,
7575
labelElement,

0 commit comments

Comments
 (0)