Skip to content

Commit

Permalink
fix(mantine): make Table.Predicate label prop required (#3927)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: the Table.Predicate label prop is now required.
  • Loading branch information
gdostie authored Oct 16, 2024
1 parent d911198 commit a49edf5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ describe('Table.Predicate', () => {
<Table.Header>
<Table.Predicate
id="rank"
label="Rank"
data={[
{value: 'first', label: 'First'},
{value: 'second', label: 'Second'},
Expand All @@ -35,7 +36,7 @@ describe('Table.Predicate', () => {
};
render(<Fixture />);
expect(screen.getByRole('button', {name: '2', current: 'page'})).toBeVisible();
await user.click(screen.getByRole('textbox', {name: 'rank'}));
await user.click(screen.getByRole('textbox', {name: 'Rank'}));
await user.click(screen.getByRole('option', {name: 'First'}));
expect(screen.getByRole('button', {name: '1', current: 'page'})).toBeVisible();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@ export interface TablePredicateProps
*/
data: ComboboxData;
/**
* Input label (not displayed for now)
* The label to display next to the Select
*
* @default default to the predicate id
*/
label?: string;
label: string;
}

export type TablePredicateFactory = Factory<{
Expand Down

0 comments on commit a49edf5

Please sign in to comment.