Skip to content

Commit

Permalink
[DataGrid][FilterPanel] Fix styling grid filter input single select (#…
Browse files Browse the repository at this point in the history
…11520)

Co-authored-by: Wilfredo Perez <[email protected]>
  • Loading branch information
FreakDroid and Wilfredo Perez authored Feb 15, 2024
1 parent d246a1f commit 5cf9f36
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 11 deletions.
4 changes: 1 addition & 3 deletions .codesandbox/ci.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
"@mui/x-charts": "packages/x-charts/build",
"@mui/x-tree-view": "packages/x-tree-view/build"
},
"sandboxes": [
"/bug-reproductions/x-data-grid"
],
"sandboxes": ["/bug-reproductions/x-data-grid"],
"silent": true
}
2 changes: 1 addition & 1 deletion bug-reproductions/x-data-grid/public/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<title>DataGrid — MUI X</title>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ function GridFilterInputBoolean(props: GridFilterInputBooleanProps) {
clearButton,
tabIndex,
label: labelProp,
variant = 'standard',
InputLabelProps,
...others
} = props;
Expand Down Expand Up @@ -71,7 +72,7 @@ function GridFilterInputBoolean(props: GridFilterInputBooleanProps) {
{...rootProps.slotProps?.baseInputLabel}
id={labelId}
shrink
variant="standard"
variant={variant}
>
{label}
</rootProps.slots.baseInputLabel>
Expand All @@ -81,7 +82,8 @@ function GridFilterInputBoolean(props: GridFilterInputBooleanProps) {
label={label}
value={filterValueState}
onChange={onFilterChange}
variant="standard"
variant={variant}
notched={variant === 'outlined' ? true : undefined}
native={isSelectNative}
displayEmpty
inputProps={{ ref: focusElementRef, tabIndex }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ function GridFilterInputSingleSelect(props: GridFilterInputSingleSelectProps) {
placeholder,
tabIndex,
label: labelProp,
variant = 'standard',
isFilterActive,
clearButton,
InputLabelProps,
Expand Down Expand Up @@ -128,7 +129,7 @@ function GridFilterInputSingleSelect(props: GridFilterInputSingleSelectProps) {
id={labelId}
htmlFor={id}
shrink
variant="standard"
variant={variant}
>
{label}
</rootProps.slots.baseInputLabel>
Expand All @@ -138,14 +139,15 @@ function GridFilterInputSingleSelect(props: GridFilterInputSingleSelectProps) {
labelId={labelId}
value={filterValue}
onChange={onFilterChange}
variant="standard"
variant={variant}
type={type || 'text'}
inputProps={{
tabIndex,
ref: focusElementRef,
placeholder: placeholder ?? apiRef.current.getLocaleText('filterPanelInputPlaceholder'),
}}
native={isSelectNative}
notched={variant === 'outlined' ? true : undefined}
{
...(others as any) /* FIXME: typing error */
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ function GridFilterInputValue(props: GridTypeFilterInputValueProps) {
isFilterActive,
clearButton,
InputProps,
variant = 'standard',
...others
} = props;
const filterTimeout = useTimeout();
Expand Down Expand Up @@ -69,7 +70,7 @@ function GridFilterInputValue(props: GridTypeFilterInputValueProps) {
placeholder={apiRef.current.getLocaleText('filterPanelInputPlaceholder')}
value={filterValueState}
onChange={onFilterChange}
variant="standard"
variant={variant}
type={type || 'text'}
InputProps={{
...(applying || clearButton
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/template.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<title>Playwright end-to-end test</title>
Expand Down
2 changes: 1 addition & 1 deletion test/regressions/template.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<title>vrtest</title>
Expand Down

0 comments on commit 5cf9f36

Please sign in to comment.