diff --git a/docs/data/data-grid/localization/data.json b/docs/data/data-grid/localization/data.json index 6fa9ffcd38ddb..e6d0c4013acee 100644 --- a/docs/data/data-grid/localization/data.json +++ b/docs/data/data-grid/localization/data.json @@ -3,280 +3,280 @@ "languageTag": "ar-SD", "importName": "arSD", "localeName": "Arabic (Sudan)", - "missingKeysCount": 8, - "totalKeysCount": 122, + "missingKeysCount": 9, + "totalKeysCount": 123, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/arSD.ts" }, { "languageTag": "be-BY", "importName": "beBY", "localeName": "Belarusian", - "missingKeysCount": 34, - "totalKeysCount": 122, + "missingKeysCount": 35, + "totalKeysCount": 123, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/beBY.ts" }, { "languageTag": "bg-BG", "importName": "bgBG", "localeName": "Bulgarian", - "missingKeysCount": 0, - "totalKeysCount": 122, + "missingKeysCount": 1, + "totalKeysCount": 123, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/bgBG.ts" }, { "languageTag": "zh-HK", "importName": "zhHK", "localeName": "Chinese (Hong Kong)", - "missingKeysCount": 8, - "totalKeysCount": 122, + "missingKeysCount": 9, + "totalKeysCount": 123, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/zhHK.ts" }, { "languageTag": "zh-CN", "importName": "zhCN", "localeName": "Chinese (Simplified)", - "missingKeysCount": 0, - "totalKeysCount": 122, + "missingKeysCount": 1, + "totalKeysCount": 123, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/zhCN.ts" }, { "languageTag": "zh-TW", "importName": "zhTW", "localeName": "Chinese (Taiwan)", - "missingKeysCount": 8, - "totalKeysCount": 122, + "missingKeysCount": 9, + "totalKeysCount": 123, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/zhTW.ts" }, { "languageTag": "hr-HR", "importName": "hrHR", "localeName": "Croatian", - "missingKeysCount": 0, - "totalKeysCount": 122, + "missingKeysCount": 1, + "totalKeysCount": 123, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/hrHR.ts" }, { "languageTag": "cs-CZ", "importName": "csCZ", "localeName": "Czech", - "missingKeysCount": 4, - "totalKeysCount": 122, + "missingKeysCount": 5, + "totalKeysCount": 123, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/csCZ.ts" }, { "languageTag": "da-DK", "importName": "daDK", "localeName": "Danish", - "missingKeysCount": 0, - "totalKeysCount": 122, + "missingKeysCount": 1, + "totalKeysCount": 123, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/daDK.ts" }, { "languageTag": "nl-NL", "importName": "nlNL", "localeName": "Dutch", - "missingKeysCount": 4, - "totalKeysCount": 122, + "missingKeysCount": 5, + "totalKeysCount": 123, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/nlNL.ts" }, { "languageTag": "fi-FI", "importName": "fiFI", "localeName": "Finnish", - "missingKeysCount": 4, - "totalKeysCount": 122, + "missingKeysCount": 5, + "totalKeysCount": 123, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/fiFI.ts" }, { "languageTag": "fr-FR", "importName": "frFR", "localeName": "French", - "missingKeysCount": 0, - "totalKeysCount": 122, + "missingKeysCount": 1, + "totalKeysCount": 123, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/frFR.ts" }, { "languageTag": "de-DE", "importName": "deDE", "localeName": "German", - "missingKeysCount": 0, - "totalKeysCount": 122, + "missingKeysCount": 1, + "totalKeysCount": 123, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/deDE.ts" }, { "languageTag": "el-GR", "importName": "elGR", "localeName": "Greek", - "missingKeysCount": 8, - "totalKeysCount": 122, + "missingKeysCount": 9, + "totalKeysCount": 123, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/elGR.ts" }, { "languageTag": "he-IL", "importName": "heIL", "localeName": "Hebrew", - "missingKeysCount": 4, - "totalKeysCount": 122, + "missingKeysCount": 5, + "totalKeysCount": 123, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/heIL.ts" }, { "languageTag": "hu-HU", "importName": "huHU", "localeName": "Hungarian", - "missingKeysCount": 6, - "totalKeysCount": 122, + "missingKeysCount": 7, + "totalKeysCount": 123, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/huHU.ts" }, { "languageTag": "is-IS", "importName": "isIS", "localeName": "Icelandic", - "missingKeysCount": 8, - "totalKeysCount": 122, + "missingKeysCount": 9, + "totalKeysCount": 123, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/isIS.ts" }, { "languageTag": "it-IT", "importName": "itIT", "localeName": "Italian", - "missingKeysCount": 0, - "totalKeysCount": 122, + "missingKeysCount": 1, + "totalKeysCount": 123, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/itIT.ts" }, { "languageTag": "ja-JP", "importName": "jaJP", "localeName": "Japanese", - "missingKeysCount": 0, - "totalKeysCount": 122, + "missingKeysCount": 1, + "totalKeysCount": 123, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/jaJP.ts" }, { "languageTag": "ko-KR", "importName": "koKR", "localeName": "Korean", - "missingKeysCount": 35, - "totalKeysCount": 122, + "missingKeysCount": 36, + "totalKeysCount": 123, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/koKR.ts" }, { "languageTag": "nb-NO", "importName": "nbNO", "localeName": "Norwegian (Bokmål)", - "missingKeysCount": 4, - "totalKeysCount": 122, + "missingKeysCount": 5, + "totalKeysCount": 123, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/nbNO.ts" }, { "languageTag": "nn-NO", "importName": "nnNO", "localeName": "Norwegian (Nynorsk)", - "missingKeysCount": 4, - "totalKeysCount": 122, + "missingKeysCount": 5, + "totalKeysCount": 123, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/nnNO.ts" }, { "languageTag": "fa-IR", "importName": "faIR", "localeName": "Persian", - "missingKeysCount": 4, - "totalKeysCount": 122, + "missingKeysCount": 5, + "totalKeysCount": 123, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/faIR.ts" }, { "languageTag": "pl-PL", "importName": "plPL", "localeName": "Polish", - "missingKeysCount": 11, - "totalKeysCount": 122, + "missingKeysCount": 12, + "totalKeysCount": 123, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/plPL.ts" }, { "languageTag": "pt-PT", "importName": "ptPT", "localeName": "Portuguese", - "missingKeysCount": 0, - "totalKeysCount": 122, + "missingKeysCount": 1, + "totalKeysCount": 123, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/ptPT.ts" }, { "languageTag": "pt-BR", "importName": "ptBR", "localeName": "Portuguese (Brazil)", - "missingKeysCount": 0, - "totalKeysCount": 122, + "missingKeysCount": 1, + "totalKeysCount": 123, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/ptBR.ts" }, { "languageTag": "ro-RO", "importName": "roRO", "localeName": "Romanian", - "missingKeysCount": 8, - "totalKeysCount": 122, + "missingKeysCount": 9, + "totalKeysCount": 123, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/roRO.ts" }, { "languageTag": "ru-RU", "importName": "ruRU", "localeName": "Russian", - "missingKeysCount": 4, - "totalKeysCount": 122, + "missingKeysCount": 5, + "totalKeysCount": 123, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/ruRU.ts" }, { "languageTag": "sk-SK", "importName": "skSK", "localeName": "Slovak", - "missingKeysCount": 5, - "totalKeysCount": 122, + "missingKeysCount": 6, + "totalKeysCount": 123, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/skSK.ts" }, { "languageTag": "es-ES", "importName": "esES", "localeName": "Spanish", - "missingKeysCount": 0, - "totalKeysCount": 122, + "missingKeysCount": 1, + "totalKeysCount": 123, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/esES.ts" }, { "languageTag": "sv-SE", "importName": "svSE", "localeName": "Swedish", - "missingKeysCount": 0, - "totalKeysCount": 122, + "missingKeysCount": 1, + "totalKeysCount": 123, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/svSE.ts" }, { "languageTag": "tr-TR", "importName": "trTR", "localeName": "Turkish", - "missingKeysCount": 2, - "totalKeysCount": 122, + "missingKeysCount": 3, + "totalKeysCount": 123, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/trTR.ts" }, { "languageTag": "uk-UA", "importName": "ukUA", "localeName": "Ukrainian", - "missingKeysCount": 8, - "totalKeysCount": 122, + "missingKeysCount": 9, + "totalKeysCount": 123, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/ukUA.ts" }, { "languageTag": "ur-PK", "importName": "urPK", "localeName": "Urdu (Pakistan)", - "missingKeysCount": 8, - "totalKeysCount": 122, + "missingKeysCount": 9, + "totalKeysCount": 123, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/urPK.ts" }, { "languageTag": "vi-VN", "importName": "viVN", "localeName": "Vietnamese", - "missingKeysCount": 0, - "totalKeysCount": 122, + "missingKeysCount": 1, + "totalKeysCount": 123, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/viVN.ts" } ] diff --git a/docs/pages/x/api/data-grid/data-grid-premium.json b/docs/pages/x/api/data-grid/data-grid-premium.json index ded5c1bd3c907..ec134312c970d 100644 --- a/docs/pages/x/api/data-grid/data-grid-premium.json +++ b/docs/pages/x/api/data-grid/data-grid-premium.json @@ -1476,6 +1476,12 @@ "description": "Styles applied to the columns management row element.", "isGlobal": false }, + { + "key": "columnsManagementSearchInput", + "className": "MuiDataGridPremium-columnsManagementSearchInput", + "description": "Styles applied to the columns management search input element.", + "isGlobal": false + }, { "key": "container--bottom", "className": "MuiDataGridPremium-container--bottom", diff --git a/docs/pages/x/api/data-grid/data-grid-pro.json b/docs/pages/x/api/data-grid/data-grid-pro.json index 42df3c1393111..8fba87d572249 100644 --- a/docs/pages/x/api/data-grid/data-grid-pro.json +++ b/docs/pages/x/api/data-grid/data-grid-pro.json @@ -1390,6 +1390,12 @@ "description": "Styles applied to the columns management row element.", "isGlobal": false }, + { + "key": "columnsManagementSearchInput", + "className": "MuiDataGridPro-columnsManagementSearchInput", + "description": "Styles applied to the columns management search input element.", + "isGlobal": false + }, { "key": "container--bottom", "className": "MuiDataGridPro-container--bottom", diff --git a/docs/pages/x/api/data-grid/data-grid.json b/docs/pages/x/api/data-grid/data-grid.json index 9994e0dc63178..caf8c0b7d0357 100644 --- a/docs/pages/x/api/data-grid/data-grid.json +++ b/docs/pages/x/api/data-grid/data-grid.json @@ -1265,6 +1265,12 @@ "description": "Styles applied to the columns management row element.", "isGlobal": false }, + { + "key": "columnsManagementSearchInput", + "className": "MuiDataGrid-columnsManagementSearchInput", + "description": "Styles applied to the columns management search input element.", + "isGlobal": false + }, { "key": "container--bottom", "className": "MuiDataGrid-container--bottom", diff --git a/docs/translations/api-docs/data-grid/data-grid-premium/data-grid-premium.json b/docs/translations/api-docs/data-grid/data-grid-premium/data-grid-premium.json index 3b9442aa58e3b..8879a0ba952c8 100644 --- a/docs/translations/api-docs/data-grid/data-grid-premium/data-grid-premium.json +++ b/docs/translations/api-docs/data-grid/data-grid-premium/data-grid-premium.json @@ -923,6 +923,10 @@ "description": "Styles applied to {{nodeName}}.", "nodeName": "the columns management row element" }, + "columnsManagementSearchInput": { + "description": "Styles applied to {{nodeName}}.", + "nodeName": "the columns management search input element" + }, "container--bottom": { "description": "Styles applied to {{nodeName}}.", "nodeName": "the bottom container" diff --git a/docs/translations/api-docs/data-grid/data-grid-pro/data-grid-pro.json b/docs/translations/api-docs/data-grid/data-grid-pro/data-grid-pro.json index c1d26982ac46e..c56adbe4fb0be 100644 --- a/docs/translations/api-docs/data-grid/data-grid-pro/data-grid-pro.json +++ b/docs/translations/api-docs/data-grid/data-grid-pro/data-grid-pro.json @@ -861,6 +861,10 @@ "description": "Styles applied to {{nodeName}}.", "nodeName": "the columns management row element" }, + "columnsManagementSearchInput": { + "description": "Styles applied to {{nodeName}}.", + "nodeName": "the columns management search input element" + }, "container--bottom": { "description": "Styles applied to {{nodeName}}.", "nodeName": "the bottom container" diff --git a/docs/translations/api-docs/data-grid/data-grid/data-grid.json b/docs/translations/api-docs/data-grid/data-grid/data-grid.json index d082ef5d495db..77ba99fb40302 100644 --- a/docs/translations/api-docs/data-grid/data-grid/data-grid.json +++ b/docs/translations/api-docs/data-grid/data-grid/data-grid.json @@ -741,6 +741,10 @@ "description": "Styles applied to {{nodeName}}.", "nodeName": "the columns management row element" }, + "columnsManagementSearchInput": { + "description": "Styles applied to {{nodeName}}.", + "nodeName": "the columns management search input element" + }, "container--bottom": { "description": "Styles applied to {{nodeName}}.", "nodeName": "the bottom container" diff --git a/packages/x-data-grid/src/components/columnsManagement/GridColumnsManagement.tsx b/packages/x-data-grid/src/components/columnsManagement/GridColumnsManagement.tsx index 431736337d349..a5c15703ecb10 100644 --- a/packages/x-data-grid/src/components/columnsManagement/GridColumnsManagement.tsx +++ b/packages/x-data-grid/src/components/columnsManagement/GridColumnsManagement.tsx @@ -4,6 +4,8 @@ import PropTypes from 'prop-types'; import composeClasses from '@mui/utils/composeClasses'; import FormControlLabel from '@mui/material/FormControlLabel'; import { styled } from '@mui/material/styles'; +import TextField, { TextFieldProps } from '@mui/material/TextField'; +import { inputBaseClasses } from '@mui/material/InputBase'; import { gridColumnDefinitionsSelector, gridColumnVisibilityModelSelector, @@ -24,6 +26,7 @@ export interface GridColumnsManagementProps { */ sort?: 'asc' | 'desc'; searchPredicate?: (column: GridColDef, searchValue: string) => boolean; + searchInputProps?: Partial; /** * If `true`, the column search field will be focused automatically. * If `false`, the first column switch input will be focused automatically. @@ -66,6 +69,7 @@ const useUtilityClasses = (ownerState: OwnerState) => { const slots = { root: ['columnsManagement'], header: ['columnsManagementHeader'], + searchInput: ['columnsManagementSearchInput'], footer: ['columnsManagementFooter'], row: ['columnsManagementRow'], }; @@ -95,6 +99,7 @@ function GridColumnsManagement(props: GridColumnsManagementProps) { disableResetButton = false, toggleAllMode = 'all', getTogglableColumns, + searchInputProps, } = props; const isResetDisabled = React.useMemo( @@ -207,27 +212,59 @@ function GridColumnsManagement(props: GridColumnsManagementProps) { } return false; }; + const handleSearchReset = React.useCallback(() => { + setSearchValue(''); + searchInputRef.current!.focus(); + }, []); return ( - ), - sx: { pl: 1.5 }, + endAdornment: ( + + + + ), + }} + inputProps={{ + 'aria-label': apiRef.current.getLocaleText('columnsManagementSearchTitle'), }} + autoComplete="off" fullWidth {...rootProps.slotProps?.baseTextField} + {...searchInputProps} /> @@ -321,6 +358,7 @@ GridColumnsManagement.propTypes = { * @returns {GridColDef['field'][]} The list of togglable columns' field names. */ getTogglableColumns: PropTypes.func, + searchInputProps: PropTypes.object, searchPredicate: PropTypes.func, sort: PropTypes.oneOf(['asc', 'desc']), /** @@ -354,6 +392,23 @@ const GridColumnsManagementHeader = styled('div', { padding: theme.spacing(1.5, 3), })); +const SearchInput = styled(TextField, { + name: 'MuiDataGrid', + slot: 'ColumnsManagementSearchInput', + overridesResolver: (props, styles) => styles.columnsManagementSearchInput, +})<{ ownerState: OwnerState }>(({ theme }) => ({ + [`& .${inputBaseClasses.root}`]: { + padding: theme.spacing(0, 1.5, 0, 1.5), + }, + [`& .${inputBaseClasses.input}::-webkit-search-decoration, + & .${inputBaseClasses.input}::-webkit-search-cancel-button, + & .${inputBaseClasses.input}::-webkit-search-results-button, + & .${inputBaseClasses.input}::-webkit-search-results-decoration`]: { + /* clears the 'X' icon from Chrome */ + display: 'none', + }, +})); + const GridColumnsManagementFooter = styled('div', { name: 'MuiDataGrid', slot: 'ColumnsManagementFooter', diff --git a/packages/x-data-grid/src/constants/gridClasses.ts b/packages/x-data-grid/src/constants/gridClasses.ts index 06ce8915846a9..9082fae28e0ee 100644 --- a/packages/x-data-grid/src/constants/gridClasses.ts +++ b/packages/x-data-grid/src/constants/gridClasses.ts @@ -242,6 +242,10 @@ export interface GridClasses { * Styles applied to the columns management header element. */ columnsManagementHeader: string; + /** + * Styles applied to the columns management search input element. + */ + columnsManagementSearchInput: string; /** * Styles applied to the columns management footer element. */ @@ -720,6 +724,7 @@ export const gridClasses = generateUtilityClasses('MuiDataGrid', [ 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', + 'columnsManagementSearchInput', 'columnsManagementFooter', 'container--top', 'container--bottom', diff --git a/packages/x-data-grid/src/constants/localeTextConstants.ts b/packages/x-data-grid/src/constants/localeTextConstants.ts index c0d29a97a0e9c..395d73a7355b2 100644 --- a/packages/x-data-grid/src/constants/localeTextConstants.ts +++ b/packages/x-data-grid/src/constants/localeTextConstants.ts @@ -41,6 +41,7 @@ export const GRID_DEFAULT_LOCALE_TEXT: GridLocaleText = { columnsManagementNoColumns: 'No columns', columnsManagementShowHideAllText: 'Show/Hide All', columnsManagementReset: 'Reset', + columnsManagementDeleteIconLabel: 'Clear', // Filter panel text filterPanelAddFilter: 'Add filter', diff --git a/packages/x-data-grid/src/locales/arSD.ts b/packages/x-data-grid/src/locales/arSD.ts index 5d3ebd5993e56..b9aadc4d34bb9 100644 --- a/packages/x-data-grid/src/locales/arSD.ts +++ b/packages/x-data-grid/src/locales/arSD.ts @@ -43,6 +43,7 @@ const arSDGrid: Partial = { // columnsManagementNoColumns: 'No columns', // columnsManagementShowHideAllText: 'Show/Hide All', // columnsManagementReset: 'Reset', + // columnsManagementDeleteIconLabel: 'Clear', // Filter panel text filterPanelAddFilter: 'إضافة مرشِح', diff --git a/packages/x-data-grid/src/locales/beBY.ts b/packages/x-data-grid/src/locales/beBY.ts index bba9d37e0fbd1..e11cb810e4cfd 100644 --- a/packages/x-data-grid/src/locales/beBY.ts +++ b/packages/x-data-grid/src/locales/beBY.ts @@ -66,6 +66,7 @@ const beBYGrid: Partial = { // columnsManagementNoColumns: 'No columns', // columnsManagementShowHideAllText: 'Show/Hide All', // columnsManagementReset: 'Reset', + // columnsManagementDeleteIconLabel: 'Clear', // Filter panel text filterPanelAddFilter: 'Дадаць фільтр', diff --git a/packages/x-data-grid/src/locales/bgBG.ts b/packages/x-data-grid/src/locales/bgBG.ts index 3c360f174e455..a27adce61ffae 100644 --- a/packages/x-data-grid/src/locales/bgBG.ts +++ b/packages/x-data-grid/src/locales/bgBG.ts @@ -42,6 +42,7 @@ const bgBGGrid: Partial = { columnsManagementNoColumns: 'Няма колони', columnsManagementShowHideAllText: 'Покажи/Скрий Всичко', columnsManagementReset: 'Нулирай', + // columnsManagementDeleteIconLabel: 'Clear', // Filter panel text filterPanelAddFilter: 'Добави Филтър', diff --git a/packages/x-data-grid/src/locales/csCZ.ts b/packages/x-data-grid/src/locales/csCZ.ts index c5b26a3ce10e1..18611554aa824 100644 --- a/packages/x-data-grid/src/locales/csCZ.ts +++ b/packages/x-data-grid/src/locales/csCZ.ts @@ -50,6 +50,7 @@ const csCZGrid: Partial = { columnsManagementNoColumns: 'Žádné sloupce', columnsManagementShowHideAllText: 'Zobrazit/skrýt vše', columnsManagementReset: 'Resetovat', + // columnsManagementDeleteIconLabel: 'Clear', // Filter panel text filterPanelAddFilter: 'Přidat filtr', diff --git a/packages/x-data-grid/src/locales/daDK.ts b/packages/x-data-grid/src/locales/daDK.ts index dc305634c30e7..d6094d42ce260 100644 --- a/packages/x-data-grid/src/locales/daDK.ts +++ b/packages/x-data-grid/src/locales/daDK.ts @@ -43,6 +43,7 @@ const daDKGrid: Partial = { columnsManagementNoColumns: 'Ingen søjler', columnsManagementShowHideAllText: 'Vis/Skjul Alle', columnsManagementReset: 'Nulstil', + // columnsManagementDeleteIconLabel: 'Clear', // Filter panel text filterPanelAddFilter: 'Tilføj filter', diff --git a/packages/x-data-grid/src/locales/deDE.ts b/packages/x-data-grid/src/locales/deDE.ts index 31a9350cb5e1d..48c894e57ecd6 100644 --- a/packages/x-data-grid/src/locales/deDE.ts +++ b/packages/x-data-grid/src/locales/deDE.ts @@ -43,6 +43,7 @@ const deDEGrid: Partial = { columnsManagementNoColumns: 'Keine Spalten', columnsManagementShowHideAllText: 'Alle anzeigen/verbergen', columnsManagementReset: 'Zurücksetzen', + // columnsManagementDeleteIconLabel: 'Clear', // Filter panel text filterPanelAddFilter: 'Filter hinzufügen', diff --git a/packages/x-data-grid/src/locales/elGR.ts b/packages/x-data-grid/src/locales/elGR.ts index dbd6bdc36f3df..ad0c394d99efb 100644 --- a/packages/x-data-grid/src/locales/elGR.ts +++ b/packages/x-data-grid/src/locales/elGR.ts @@ -43,6 +43,7 @@ const elGRGrid: Partial = { // columnsManagementNoColumns: 'No columns', // columnsManagementShowHideAllText: 'Show/Hide All', // columnsManagementReset: 'Reset', + // columnsManagementDeleteIconLabel: 'Clear', // Filter panel text filterPanelAddFilter: 'Προσθήκη φίλτρου', diff --git a/packages/x-data-grid/src/locales/esES.ts b/packages/x-data-grid/src/locales/esES.ts index 51d21e31b688a..87d6133d30a27 100644 --- a/packages/x-data-grid/src/locales/esES.ts +++ b/packages/x-data-grid/src/locales/esES.ts @@ -43,6 +43,7 @@ const esESGrid: Partial = { columnsManagementNoColumns: 'Sin columnas', columnsManagementShowHideAllText: 'Mostrar/Ocultar todas', columnsManagementReset: 'Restablecer', + // columnsManagementDeleteIconLabel: 'Clear', // Filter panel text filterPanelAddFilter: 'Agregar filtro', diff --git a/packages/x-data-grid/src/locales/faIR.ts b/packages/x-data-grid/src/locales/faIR.ts index 41dbdd4ca402d..6fc24b6f734ed 100644 --- a/packages/x-data-grid/src/locales/faIR.ts +++ b/packages/x-data-grid/src/locales/faIR.ts @@ -43,6 +43,7 @@ const faIRGrid: Partial = { columnsManagementNoColumns: 'بدون سطر', columnsManagementShowHideAllText: 'نمایش/مخفی کردن همه', columnsManagementReset: 'بازنشانی', + // columnsManagementDeleteIconLabel: 'Clear', // Filter panel text filterPanelAddFilter: 'افزودن فیلتر', diff --git a/packages/x-data-grid/src/locales/fiFI.ts b/packages/x-data-grid/src/locales/fiFI.ts index d8fee01123fb1..00391b62b18cd 100644 --- a/packages/x-data-grid/src/locales/fiFI.ts +++ b/packages/x-data-grid/src/locales/fiFI.ts @@ -43,6 +43,7 @@ const fiFIGrid: Partial = { columnsManagementNoColumns: 'Ei sarakkeita näytettäväksi', columnsManagementShowHideAllText: 'Näytä/Piilota kaikki', columnsManagementReset: 'Palauta', + // columnsManagementDeleteIconLabel: 'Clear', // Filter panel text filterPanelAddFilter: 'Lisää suodatin', diff --git a/packages/x-data-grid/src/locales/frFR.ts b/packages/x-data-grid/src/locales/frFR.ts index 96abb7fc40e90..e6928a00e57ab 100644 --- a/packages/x-data-grid/src/locales/frFR.ts +++ b/packages/x-data-grid/src/locales/frFR.ts @@ -43,6 +43,7 @@ const frFRGrid: Partial = { columnsManagementNoColumns: 'Pas de colonnes', columnsManagementShowHideAllText: 'Afficher/masquer toutes', columnsManagementReset: 'Réinitialiser', + // columnsManagementDeleteIconLabel: 'Clear', // Filter panel text filterPanelAddFilter: 'Ajouter un filtre', diff --git a/packages/x-data-grid/src/locales/heIL.ts b/packages/x-data-grid/src/locales/heIL.ts index 61556403a76a1..7612d2a8cc397 100644 --- a/packages/x-data-grid/src/locales/heIL.ts +++ b/packages/x-data-grid/src/locales/heIL.ts @@ -43,6 +43,7 @@ const heILGrid: Partial = { columnsManagementNoColumns: 'אין עמודות', columnsManagementShowHideAllText: 'הצג/הסתר הכל', columnsManagementReset: 'אתחול', + // columnsManagementDeleteIconLabel: 'Clear', // Filter panel text filterPanelAddFilter: 'הוסף מסנן', diff --git a/packages/x-data-grid/src/locales/hrHR.ts b/packages/x-data-grid/src/locales/hrHR.ts index 26493db593d96..5999823e9d726 100644 --- a/packages/x-data-grid/src/locales/hrHR.ts +++ b/packages/x-data-grid/src/locales/hrHR.ts @@ -50,6 +50,7 @@ const hrHRGrid: Partial = { columnsManagementNoColumns: 'Nema stupaca', columnsManagementShowHideAllText: 'Prikaži/Sakrij sve', columnsManagementReset: 'Ponovno namjesti', + // columnsManagementDeleteIconLabel: 'Clear', // Filter panel text filterPanelAddFilter: 'Dodaj filter', diff --git a/packages/x-data-grid/src/locales/huHU.ts b/packages/x-data-grid/src/locales/huHU.ts index f65c09cdba738..9d9d78e8a7f63 100644 --- a/packages/x-data-grid/src/locales/huHU.ts +++ b/packages/x-data-grid/src/locales/huHU.ts @@ -42,6 +42,7 @@ const huHUGrid: Partial = { columnsManagementNoColumns: 'Nincsenek oszlopok', columnsManagementShowHideAllText: 'Összes', columnsManagementReset: 'Visszavon', + // columnsManagementDeleteIconLabel: 'Clear', // Filter panel text filterPanelAddFilter: 'Szűrő hozzáadása', diff --git a/packages/x-data-grid/src/locales/isIS.ts b/packages/x-data-grid/src/locales/isIS.ts index 307231873d9d3..70f9c45d61199 100644 --- a/packages/x-data-grid/src/locales/isIS.ts +++ b/packages/x-data-grid/src/locales/isIS.ts @@ -43,6 +43,7 @@ const isISGrid: Partial = { // columnsManagementNoColumns: 'No columns', // columnsManagementShowHideAllText: 'Show/Hide All', // columnsManagementReset: 'Reset', + // columnsManagementDeleteIconLabel: 'Clear', // Filter panel text filterPanelAddFilter: 'Bæta síu', diff --git a/packages/x-data-grid/src/locales/itIT.ts b/packages/x-data-grid/src/locales/itIT.ts index 2058096d6165e..7291525a07b83 100644 --- a/packages/x-data-grid/src/locales/itIT.ts +++ b/packages/x-data-grid/src/locales/itIT.ts @@ -43,6 +43,7 @@ const itITGrid: Partial = { columnsManagementNoColumns: 'Nessuna colonna', columnsManagementShowHideAllText: 'Mostra/Nascondi Tutto', columnsManagementReset: 'Resetta', + // columnsManagementDeleteIconLabel: 'Clear', // Filter panel text filterPanelAddFilter: 'Aggiungi un filtro', diff --git a/packages/x-data-grid/src/locales/jaJP.ts b/packages/x-data-grid/src/locales/jaJP.ts index 00f626c511877..fd2f69883cf85 100644 --- a/packages/x-data-grid/src/locales/jaJP.ts +++ b/packages/x-data-grid/src/locales/jaJP.ts @@ -42,6 +42,7 @@ const jaJPGrid: Partial = { columnsManagementNoColumns: 'カラムなし', columnsManagementShowHideAllText: 'すべて表示/非表示', columnsManagementReset: 'リセット', + // columnsManagementDeleteIconLabel: 'Clear', // Filter panel text filterPanelAddFilter: 'フィルター追加', diff --git a/packages/x-data-grid/src/locales/koKR.ts b/packages/x-data-grid/src/locales/koKR.ts index 671f6abd05209..bacd936d8fd3a 100644 --- a/packages/x-data-grid/src/locales/koKR.ts +++ b/packages/x-data-grid/src/locales/koKR.ts @@ -42,6 +42,7 @@ const koKRGrid: Partial = { // columnsManagementNoColumns: 'No columns', // columnsManagementShowHideAllText: 'Show/Hide All', // columnsManagementReset: 'Reset', + // columnsManagementDeleteIconLabel: 'Clear', // Filter panel text filterPanelAddFilter: '필터 추가', diff --git a/packages/x-data-grid/src/locales/nbNO.ts b/packages/x-data-grid/src/locales/nbNO.ts index 9fa25b0cc4f82..70bd33fc7704f 100644 --- a/packages/x-data-grid/src/locales/nbNO.ts +++ b/packages/x-data-grid/src/locales/nbNO.ts @@ -43,6 +43,7 @@ const nbNOGrid: Partial = { columnsManagementNoColumns: 'Ingen kolonner', columnsManagementShowHideAllText: 'Vis/skjul alle', columnsManagementReset: 'Nullstill', + // columnsManagementDeleteIconLabel: 'Clear', // Filter panel text filterPanelAddFilter: 'Legg til filter', diff --git a/packages/x-data-grid/src/locales/nlNL.ts b/packages/x-data-grid/src/locales/nlNL.ts index ccc1f5378ab44..4f247c94b2d85 100644 --- a/packages/x-data-grid/src/locales/nlNL.ts +++ b/packages/x-data-grid/src/locales/nlNL.ts @@ -43,6 +43,7 @@ const nlNLGrid: Partial = { columnsManagementNoColumns: 'Geen kolommen', columnsManagementShowHideAllText: 'Toon/Verberg Alle', columnsManagementReset: 'Reset', + // columnsManagementDeleteIconLabel: 'Clear', // Filter panel text filterPanelAddFilter: 'Filter toevoegen', diff --git a/packages/x-data-grid/src/locales/nnNO.ts b/packages/x-data-grid/src/locales/nnNO.ts index 58595a0a44560..e97a9692adb55 100644 --- a/packages/x-data-grid/src/locales/nnNO.ts +++ b/packages/x-data-grid/src/locales/nnNO.ts @@ -43,6 +43,7 @@ const nnNOGrid: Partial = { columnsManagementNoColumns: 'Ingen kolonner', columnsManagementShowHideAllText: 'Vis/skjul alle', columnsManagementReset: 'Nullstill', + // columnsManagementDeleteIconLabel: 'Clear', // Filter panel text filterPanelAddFilter: 'Legg til filter', diff --git a/packages/x-data-grid/src/locales/plPL.ts b/packages/x-data-grid/src/locales/plPL.ts index af001de706173..772e84dd64e5e 100644 --- a/packages/x-data-grid/src/locales/plPL.ts +++ b/packages/x-data-grid/src/locales/plPL.ts @@ -42,6 +42,7 @@ const plPLGrid: Partial = { columnsManagementNoColumns: 'Brak kolumn', columnsManagementShowHideAllText: 'Wyświetl/Ukryj wszystkie', columnsManagementReset: 'Resetuj', + // columnsManagementDeleteIconLabel: 'Clear', // Filter panel text filterPanelAddFilter: 'Dodaj filtr', diff --git a/packages/x-data-grid/src/locales/ptBR.ts b/packages/x-data-grid/src/locales/ptBR.ts index 4dbd7b806024c..a921b980bd904 100644 --- a/packages/x-data-grid/src/locales/ptBR.ts +++ b/packages/x-data-grid/src/locales/ptBR.ts @@ -43,6 +43,7 @@ const ptBRGrid: Partial = { columnsManagementNoColumns: 'Nenhuma coluna', columnsManagementShowHideAllText: 'Mostrar/Ocultar Todas', columnsManagementReset: 'Redefinir', + // columnsManagementDeleteIconLabel: 'Clear', // Filter panel text filterPanelAddFilter: 'Adicionar filtro', diff --git a/packages/x-data-grid/src/locales/ptPT.ts b/packages/x-data-grid/src/locales/ptPT.ts index 1024917ed9c31..88fa81bdc1c0a 100644 --- a/packages/x-data-grid/src/locales/ptPT.ts +++ b/packages/x-data-grid/src/locales/ptPT.ts @@ -43,6 +43,7 @@ const ptPTGrid: Partial = { columnsManagementNoColumns: 'Sem colunas', columnsManagementShowHideAllText: 'Mostrar/Ocultar Todas', columnsManagementReset: 'Repor', + // columnsManagementDeleteIconLabel: 'Clear', // Filter panel text filterPanelAddFilter: 'Adicionar filtro', diff --git a/packages/x-data-grid/src/locales/roRO.ts b/packages/x-data-grid/src/locales/roRO.ts index 2a2db174eeac3..cc49a4f52e6d5 100644 --- a/packages/x-data-grid/src/locales/roRO.ts +++ b/packages/x-data-grid/src/locales/roRO.ts @@ -43,6 +43,7 @@ const roROGrid: Partial = { // columnsManagementNoColumns: 'No columns', // columnsManagementShowHideAllText: 'Show/Hide All', // columnsManagementReset: 'Reset', + // columnsManagementDeleteIconLabel: 'Clear', // Filter panel text filterPanelAddFilter: 'Adăugare filtru', diff --git a/packages/x-data-grid/src/locales/ruRU.ts b/packages/x-data-grid/src/locales/ruRU.ts index 54a7b85149620..61a1613e8ecdf 100644 --- a/packages/x-data-grid/src/locales/ruRU.ts +++ b/packages/x-data-grid/src/locales/ruRU.ts @@ -67,6 +67,7 @@ const ruRUGrid: Partial = { columnsManagementNoColumns: 'Нет столбцов', columnsManagementShowHideAllText: 'Показать/Скрыть Всё', columnsManagementReset: 'Сбросить', + // columnsManagementDeleteIconLabel: 'Clear', // Filter panel text filterPanelAddFilter: 'Добавить фильтр', diff --git a/packages/x-data-grid/src/locales/skSK.ts b/packages/x-data-grid/src/locales/skSK.ts index f1d2f3be0513c..bca93172c2214 100644 --- a/packages/x-data-grid/src/locales/skSK.ts +++ b/packages/x-data-grid/src/locales/skSK.ts @@ -50,6 +50,7 @@ const skSKGrid: Partial = { columnsManagementNoColumns: 'Žiadne stĺpce', columnsManagementShowHideAllText: 'Zobraziť/Skryť všetko', // columnsManagementReset: 'Reset', + // columnsManagementDeleteIconLabel: 'Clear', // Filter panel text filterPanelAddFilter: 'Pridať filter', diff --git a/packages/x-data-grid/src/locales/svSE.ts b/packages/x-data-grid/src/locales/svSE.ts index 20c42538304bd..46c5a6f089c58 100644 --- a/packages/x-data-grid/src/locales/svSE.ts +++ b/packages/x-data-grid/src/locales/svSE.ts @@ -43,6 +43,7 @@ const svSEGrid: Partial = { columnsManagementNoColumns: 'Inga kolumner', columnsManagementShowHideAllText: 'Visa/Dölj alla', columnsManagementReset: 'Återställ', + // columnsManagementDeleteIconLabel: 'Clear', // Filter panel text filterPanelAddFilter: 'Lägg till filter', diff --git a/packages/x-data-grid/src/locales/trTR.ts b/packages/x-data-grid/src/locales/trTR.ts index aac3da7f9772b..07dd3ee608eca 100644 --- a/packages/x-data-grid/src/locales/trTR.ts +++ b/packages/x-data-grid/src/locales/trTR.ts @@ -42,6 +42,7 @@ const trTRGrid: Partial = { columnsManagementNoColumns: 'Kolon yok', columnsManagementShowHideAllText: 'Hepsini Göster/Gizle', columnsManagementReset: 'Sıfırla', + // columnsManagementDeleteIconLabel: 'Clear', // Filter panel text filterPanelAddFilter: 'Filtre Ekle', diff --git a/packages/x-data-grid/src/locales/ukUA.ts b/packages/x-data-grid/src/locales/ukUA.ts index 456bf8b00f06f..f04fa67e9b5d7 100644 --- a/packages/x-data-grid/src/locales/ukUA.ts +++ b/packages/x-data-grid/src/locales/ukUA.ts @@ -67,6 +67,7 @@ const ukUAGrid: Partial = { // columnsManagementNoColumns: 'No columns', // columnsManagementShowHideAllText: 'Show/Hide All', // columnsManagementReset: 'Reset', + // columnsManagementDeleteIconLabel: 'Clear', // Filter panel text filterPanelAddFilter: 'Додати фільтр', diff --git a/packages/x-data-grid/src/locales/urPK.ts b/packages/x-data-grid/src/locales/urPK.ts index 2001e0ea29d18..2ea1572123cac 100644 --- a/packages/x-data-grid/src/locales/urPK.ts +++ b/packages/x-data-grid/src/locales/urPK.ts @@ -43,6 +43,7 @@ const urPKGrid: Partial = { // columnsManagementNoColumns: 'No columns', // columnsManagementShowHideAllText: 'Show/Hide All', // columnsManagementReset: 'Reset', + // columnsManagementDeleteIconLabel: 'Clear', // Filter panel text filterPanelAddFilter: 'نیا فلٹر', diff --git a/packages/x-data-grid/src/locales/viVN.ts b/packages/x-data-grid/src/locales/viVN.ts index a76c4783b593c..354f9db689d34 100644 --- a/packages/x-data-grid/src/locales/viVN.ts +++ b/packages/x-data-grid/src/locales/viVN.ts @@ -43,6 +43,7 @@ const viVNGrid: Partial = { columnsManagementNoColumns: 'Không có cột', columnsManagementShowHideAllText: 'Hiện/Ẩn Tất cả', columnsManagementReset: 'Đặt lại', + // columnsManagementDeleteIconLabel: 'Clear', // Filter panel text filterPanelAddFilter: 'Thêm bộ lọc', diff --git a/packages/x-data-grid/src/locales/zhCN.ts b/packages/x-data-grid/src/locales/zhCN.ts index 4badeddc8aef3..74574df253b86 100644 --- a/packages/x-data-grid/src/locales/zhCN.ts +++ b/packages/x-data-grid/src/locales/zhCN.ts @@ -42,6 +42,7 @@ const zhCNGrid: Partial = { columnsManagementNoColumns: '没有列', columnsManagementShowHideAllText: '显示/隐藏所有', columnsManagementReset: '重置', + // columnsManagementDeleteIconLabel: 'Clear', // Filter panel text filterPanelAddFilter: '添加筛选器', diff --git a/packages/x-data-grid/src/locales/zhHK.ts b/packages/x-data-grid/src/locales/zhHK.ts index 3f53e6b7d9eee..0e73634398a02 100644 --- a/packages/x-data-grid/src/locales/zhHK.ts +++ b/packages/x-data-grid/src/locales/zhHK.ts @@ -43,6 +43,7 @@ const zhHKGrid: Partial = { // columnsManagementNoColumns: 'No columns', // columnsManagementShowHideAllText: 'Show/Hide All', // columnsManagementReset: 'Reset', + // columnsManagementDeleteIconLabel: 'Clear', // Filter panel text filterPanelAddFilter: '新增過濾器', diff --git a/packages/x-data-grid/src/locales/zhTW.ts b/packages/x-data-grid/src/locales/zhTW.ts index facba1f16343c..0052bc7009641 100644 --- a/packages/x-data-grid/src/locales/zhTW.ts +++ b/packages/x-data-grid/src/locales/zhTW.ts @@ -42,6 +42,7 @@ const zhTWGrid: Partial = { // columnsManagementNoColumns: 'No columns', // columnsManagementShowHideAllText: 'Show/Hide All', // columnsManagementReset: 'Reset', + // columnsManagementDeleteIconLabel: 'Clear', // Filter panel text filterPanelAddFilter: '增加篩選器', diff --git a/packages/x-data-grid/src/models/api/gridLocaleTextApi.ts b/packages/x-data-grid/src/models/api/gridLocaleTextApi.ts index b2ce738ff7216..9573191b47561 100644 --- a/packages/x-data-grid/src/models/api/gridLocaleTextApi.ts +++ b/packages/x-data-grid/src/models/api/gridLocaleTextApi.ts @@ -53,6 +53,7 @@ export interface GridLocaleText { columnsManagementNoColumns: string; columnsManagementShowHideAllText: string; columnsManagementReset: string; + columnsManagementDeleteIconLabel: string; // Filter panel text filterPanelAddFilter: React.ReactNode; diff --git a/packages/x-data-grid/src/tests/toolbar.DataGrid.test.tsx b/packages/x-data-grid/src/tests/toolbar.DataGrid.test.tsx index 92cea1015317f..5f35b8c50009e 100644 --- a/packages/x-data-grid/src/tests/toolbar.DataGrid.test.tsx +++ b/packages/x-data-grid/src/tests/toolbar.DataGrid.test.tsx @@ -154,7 +154,7 @@ describe(' - Toolbar', () => { fireEvent.click(screen.getByText('Columns')); - const searchInput = document.querySelector('input[type="text"]')!; + const searchInput = document.querySelector('input[type="search"]')!; fireEvent.change(searchInput, { target: { value: 'test' } }); expect(document.querySelector('[role="tooltip"] [name="id"]')).not.to.equal(null);