Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ export const FilterAttributeSearch: React.FunctionComponent = () => {
rowIndex,
onSelect: (_event, isSelecting) => onSelectRepo(repo, rowIndex, isSelecting),
isSelected: isRepoSelected(repo),
disable: !isRepoSelectable(repo)
isDisabled: !isRepoSelectable(repo)
}}
/>
<Td dataLabel={columnNames.name} modifier="truncate">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ export const FilterCheckboxSelect: React.FunctionComponent = () => {
rowIndex,
onSelect: (_event, isSelecting) => onSelectRepo(repo, rowIndex, isSelecting),
isSelected: isRepoSelected(repo),
disable: !isRepoSelectable(repo)
isDisabled: !isRepoSelectable(repo)
}}
/>
<Td dataLabel={columnNames.name} modifier="truncate">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ export const FilterFaceted: React.FunctionComponent = () => {
rowIndex,
onSelect: (_event, isSelecting) => onSelectRepo(repo, rowIndex, isSelecting),
isSelected: isRepoSelected(repo),
disable: !isRepoSelectable(repo)
isDisabled: !isRepoSelectable(repo)
}}
/>
<Td dataLabel={columnNames.name} modifier="truncate">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ export const FilterMixedSelectGroup: React.FunctionComponent = () => {
rowIndex,
onSelect: (_event, isSelecting) => onSelectRepo(repo, rowIndex, isSelecting),
isSelected: isRepoSelected(repo),
disable: !isRepoSelectable(repo)
isDisabled: !isRepoSelectable(repo)
}}
/>
<Td dataLabel={columnNames.name} modifier="truncate">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ export const FilterSameSelectGroup: React.FunctionComponent = () => {
rowIndex,
onSelect: (_event, isSelecting) => onSelectRepo(repo, rowIndex, isSelecting),
isSelected: isRepoSelected(repo),
disable: !isRepoSelectable(repo)
isDisabled: !isRepoSelectable(repo)
}}
/>
<Td dataLabel={columnNames.name} modifier="truncate">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ export const FilterSearchInput: React.FunctionComponent = () => {
rowIndex,
onSelect: (_event, isSelecting) => onSelectRepo(repo, rowIndex, isSelecting),
isSelected: isRepoSelected(repo),
disable: !isRepoSelectable(repo)
isDisabled: !isRepoSelectable(repo)
}}
/>
<Td dataLabel={columnNames.name} modifier="truncate">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ export const FilterSingleSelect: React.FunctionComponent = () => {
rowIndex,
onSelect: (_event, isSelecting) => onSelectRepo(repo, rowIndex, isSelecting),
isSelected: isRepoSelected(repo),
disable: !isRepoSelectable(repo)
isDisabled: !isRepoSelectable(repo)
}}
/>
<Td dataLabel={columnNames.name} modifier="truncate">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ export const TableComposableDemo = () => {
rowIndex,
onSelect,
isSelected: selected[rowIndex],
disable: rowIndex === 1
isDisabled: rowIndex === 1
}}
/>
{row.map((cell, cellIndex) => {
Expand Down Expand Up @@ -362,7 +362,7 @@ export const TableComposableDemo = () => {
rowIndex,
onSelect,
isSelected: selected === rowIndex,
disable: rowIndex === 1,
isDisabled: rowIndex === 1,
variant: 'radio'
}}
/>
Expand Down
2 changes: 1 addition & 1 deletion packages/react-table/src/components/Table/Td.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const TdBase: React.FunctionComponent<TdProps> = ({
rowIndex: select.rowIndex,
rowData: {
selected: select.isSelected,
disableSelection: select?.disable,
disableSelection: select?.isDisabled,
props: select?.props
},
column: {
Expand Down
4 changes: 2 additions & 2 deletions packages/react-table/src/components/Table/base/types.tsx
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nicolethoen I just found out there is another prop (in TdActionsType), which should probably also be named isDisabled can I create another issue for that? or is it fine to leave it as it is?

Copy link
Contributor

Choose a reason for hiding this comment

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

You should make another issue for it and send it over to @tlabaj so she can decide if it's something we should do before the v5 release.

Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ export interface TdSelectType {
onSelect?: OnSelect;
/** Whether the cell is selected */
isSelected: boolean;
/** Whether to disable the selection */
disable?: boolean;
/** Whether the selection is disabled */
isDisabled?: boolean;
/** The row index */
rowIndex: number;
/** Additional props forwarded to select rowData */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export const TableSelectable: React.FunctionComponent = () => {
rowIndex,
onSelect: (_event, isSelecting) => onSelectRepo(repo, rowIndex, isSelecting),
isSelected: isRepoSelected(repo),
disable: !isRepoSelectable(repo)
isDisabled: !isRepoSelectable(repo)
}}
/>
<Td dataLabel={columnNames.name}>{repo.name}</Td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const TableSelectableRadio: React.FunctionComponent = () => {
rowIndex,
onSelect: () => setSelectedRepoName(repo.name),
isSelected: selectedRepoName === repo.name,
disable: !isRepoSelectable(repo),
isDisabled: !isRepoSelectable(repo),
variant: 'radio'
}}
/>
Expand Down