Skip to content

Commit

Permalink
update api prop name and description
Browse files Browse the repository at this point in the history
  • Loading branch information
pan-kot committed Nov 16, 2023
1 parent a8d1cb9 commit 0b819b2
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 25 deletions.
2 changes: 1 addition & 1 deletion pages/table/editable.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ const Demo = forwardRef(
resizableColumns={true}
ariaLabels={ariaLabels}
stickyHeader={true}
keyboardNavigation={keyboardNavigation}
enableKeyboardNavigation={keyboardNavigation}
/>
);
}
Expand Down
10 changes: 5 additions & 5 deletions pages/table/inline-actions.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,14 @@ export default function () {
header={<Header>Table with single actions</Header>}
columnDefinitions={columnDefinitionsSingle}
items={items}
keyboardNavigation={keyboardNavigation}
enableKeyboardNavigation={keyboardNavigation}
/>
<Table
ariaLabels={selectionLabels}
header={<Header>Table with multiple actions</Header>}
columnDefinitions={columnDefinitionsMultiple}
items={items}
keyboardNavigation={keyboardNavigation}
enableKeyboardNavigation={keyboardNavigation}
/>
<Table
ariaLabels={selectionLabels}
Expand All @@ -213,21 +213,21 @@ export default function () {
selectionType="multi"
columnDefinitions={columnDefinitionsDropdown}
items={items}
keyboardNavigation={keyboardNavigation}
enableKeyboardNavigation={keyboardNavigation}
/>
<Table
ariaLabels={selectionLabels}
header={<Header>Table with mixed actions</Header>}
columnDefinitions={columnDefinitionsMixed}
items={items}
keyboardNavigation={keyboardNavigation}
enableKeyboardNavigation={keyboardNavigation}
/>
<Table
ariaLabels={selectionLabels}
header={<Header>Table with only icon actions</Header>}
columnDefinitions={columnDefinitionsOnlyIcons}
items={items}
keyboardNavigation={keyboardNavigation}
enableKeyboardNavigation={keyboardNavigation}
/>
</SpaceBetween>
</Box>
Expand Down
2 changes: 1 addition & 1 deletion pages/table/resizable-columns.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export default function App() {
onSortingChange={event => setSorting(event.detail)}
onColumnWidthsChange={handleWidthChange}
variant={fullPage ? 'full-page' : undefined}
keyboardNavigation={keyboardNavigation}
enableKeyboardNavigation={keyboardNavigation}
/>
</ScreenshotArea>
</SpaceBetween>
Expand Down
6 changes: 3 additions & 3 deletions pages/table/sticky-columns.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type DemoContext = React.Context<
resizableColumns: boolean;
stickyHeader: boolean;
sortingDisabled: boolean;
keyboardNavigation: boolean;
enableKeyboardNavigation: boolean;
selectionType: undefined | 'single' | 'multi';
stickyColumnsFirst: string;
stickyColumnsLast: string;
Expand Down Expand Up @@ -193,9 +193,9 @@ export default () => {
</Checkbox>

<Checkbox
checked={urlParams.keyboardNavigation}
checked={urlParams.enableKeyboardNavigation}
onChange={event => {
setUrlParams({ keyboardNavigation: event.detail.checked });
setUrlParams({ enableKeyboardNavigation: event.detail.checked });
window.location.reload();
}}
>
Expand Down
19 changes: 7 additions & 12 deletions src/__tests__/__snapshots__/documenter.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -12953,6 +12953,13 @@ Use it in conjunction with the content display preference of the [collection pre
"optional": true,
"type": "string",
},
Object {
"description": "Use this property to activate advanced keyboard navigation and focusing behaviors.
When set to \`true\` table cells become navigable with arrow keys and the entire table has a single Tab stop.",
"name": "enableKeyboardNavigation",
"optional": true,
"type": "boolean",
},
Object {
"description": " Use this property to inform screen readers which range of items is currently displayed in the table.
It specifies the index (1-based) of the first item in the table.
Expand Down Expand Up @@ -12993,12 +13000,6 @@ by the \`cell\` property of each column definition in the \`columnDefinitions\`
"optional": false,
"type": "ReadonlyArray<T>",
},
Object {
"description": "Experimental API",
"name": "keyboardNavigation",
"optional": true,
"type": "boolean",
},
Object {
"description": "Renders the table in a loading state. We recommend that you also set a \`loadingText\`.",
"name": "loading",
Expand Down Expand Up @@ -13154,12 +13155,6 @@ Return a promise to keep loading state while the submit request is in progress."
"optional": true,
"type": "TableProps.SubmitEditFunction<T>",
},
Object {
"description": "Experimental API",
"name": "suppressKeyboardNavigationFor",
"optional": true,
"type": "((element: HTMLElement) => boolean) | string",
},
Object {
"description": "Use this property to inform screen readers how many items there are in a table.
It specifies the total count of all items in a table.
Expand Down
5 changes: 3 additions & 2 deletions src/table/interfaces.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,10 @@ export interface TableProps<T = any> extends BaseComponentProps {
onEditCancel?: CancelableEventHandler;

/**
* Experimental API
* Use this property to activate advanced keyboard navigation and focusing behaviors.
* When set to `true` table cells become navigable with arrow keys and the entire table has a single Tab stop.
*/
keyboardNavigation?: boolean;
enableKeyboardNavigation?: boolean;
}

export namespace TableProps {
Expand Down
2 changes: 1 addition & 1 deletion src/table/internal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const InternalTable = React.forwardRef(
renderAriaLive,
stickyColumns,
columnDisplay,
keyboardNavigation,
enableKeyboardNavigation: keyboardNavigation,
__funnelSubStepProps,
...rest
}: InternalTableProps<T>,
Expand Down

0 comments on commit 0b819b2

Please sign in to comment.