Skip to content

Commit

Permalink
release v1.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinVandy committed Aug 18, 2023
1 parent 499353b commit 8fe8513
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 25 deletions.
6 changes: 6 additions & 0 deletions apps/mantine-react-table-docs/pages/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ import Head from 'next/head';

### V1

#### V1.1.2 - 2023-08-18

- Disable other row edit buttons when one row is being edited by default
- Hide global and filter text input clear buttons until there is text in the input
- Added et translations that can be imported from `'material-react-table/locales/et'`

#### V1.1.1 - 2023-08-12

- Fixed editing cancel button not restoring original row data in modal editDisplayMode
Expand Down
2 changes: 1 addition & 1 deletion packages/mantine-react-table/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.1.1",
"version": "1.1.2",
"license": "MIT",
"name": "mantine-react-table",
"description": "A fully featured Mantine implementation of TanStack React Table V8, written from the ground up in TypeScript.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,17 @@ export const MRT_ToggleRowActionMenuButton = <
<Tooltip withinPortal position="right" label={localization.edit}>
<ActionIcon
aria-label={localization.edit}
disabled={!!editingRow && editingRow.id !== row.id}
onClick={handleStartEditMode}
sx={{
opacity: 0.8,
'&:hover': {
opacity: 1,
},
'&:disabled': {
backgroundColor: 'transparent',
border: 'none',
},
}}
>
<IconEdit />
Expand Down
10 changes: 2 additions & 8 deletions packages/mantine-react-table/src/inputs/MRT_FilterTextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -320,22 +320,16 @@ export const MRT_FilterTextInput = <TData extends Record<string, any> = {}>({
}),
} as const;

const ClearButton = (
const ClearButton = filterValue ? (
<ActionIcon
aria-label={localization.clearFilter}
onClick={handleClear}
size="sm"
sx={{
'&:disabled': {
backgroundColor: 'transparent',
border: 'none',
},
}}
title={localization.clearFilter ?? ''}
>
<IconX />
</ActionIcon>
);
) : null;

return filterChipLabel ? (
<Box sx={commonProps.sx}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,22 +89,18 @@ export const MRT_GlobalFilterTextInput = <
variant="filled"
icon={!enableGlobalFilterModes && <IconSearch />}
rightSection={
<ActionIcon
aria-label={localization.clearSearch}
disabled={!searchValue?.length}
onClick={handleClear}
size="sm"
sx={{
'&:disabled': {
backgroundColor: 'transparent',
border: 'none',
},
}}
>
<Tooltip withinPortal label={localization.clearSearch}>
<IconX />
</Tooltip>
</ActionIcon>
searchValue ? (
<ActionIcon
aria-label={localization.clearSearch}
disabled={!searchValue?.length}
onClick={handleClear}
size="sm"
>
<Tooltip withinPortal label={localization.clearSearch}>
<IconX />
</Tooltip>
</ActionIcon>
) : null
}
{...textFieldProps}
ref={(node) => {
Expand All @@ -116,6 +112,12 @@ export const MRT_GlobalFilterTextInput = <
}
}
}}
sx={(theme) => ({
minWidth: '250px',
...(textFieldProps?.sx instanceof Function
? textFieldProps.sx(theme)
: (textFieldProps?.sx as any)),
})}
/>
</Collapse>
);
Expand Down

2 comments on commit 8fe8513

@vercel
Copy link

@vercel vercel bot commented on 8fe8513 Aug 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 8fe8513 Aug 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.