Skip to content

Commit

Permalink
allow no onSelect, update integration and snap
Browse files Browse the repository at this point in the history
  • Loading branch information
kmcfaul committed Feb 9, 2023
1 parent 5fe6c5c commit e4ed53e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const DropdownBase: React.FunctionComponent<DropdownProps> = ({
<Menu
className={css(className)}
ref={menuRef}
onSelect={(event, itemId) => onSelect(event, itemId)}
onSelect={(event, itemId) => onSelect && onSelect(event, itemId)}
isPlain={isPlain}
isScrollable={isScrollable}
{...(minWidth && {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-core/src/next/components/Select/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const SelectBase: React.FunctionComponent<SelectProps & OUIAProps> = ({
role={role}
className={css(className)}
ref={menuRef}
onSelect={(event, itemId) => onSelect(event, itemId)}
onSelect={(event, itemId) => onSelect && onSelect(event, itemId)}
isPlain={isPlain}
selected={selected}
{...(minWidth && {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ describe('Table Simple Actions Test', () => {
});

it('Verify dropdown toggle', () => {
cy.get('td .pf-c-dropdown__toggle')
cy.get('td .pf-c-menu-toggle')
.first()
.should('exist');
cy.get('td .pf-c-dropdown__toggle')
cy.get('td .pf-c-menu-toggle')
.first()
.click();
cy.get('.pf-c-dropdown__menu').should('exist');
cy.get('.pf-c-dropdown__menu-item')
cy.get('.pf-c-menu').should('exist');
cy.get('.pf-c-menu__item')
.first()
.click();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ exports[`Table Actions table 1`] = `
>
<button
aria-expanded="false"
aria-label="Kebab toggle"
class="pf-c-menu-toggle pf-m-plain"
type="button"
>
Expand Down Expand Up @@ -234,6 +235,7 @@ exports[`Table Actions table 1`] = `
>
<button
aria-expanded="false"
aria-label="Kebab toggle"
class="pf-c-menu-toggle pf-m-plain"
type="button"
>
Expand Down Expand Up @@ -311,6 +313,7 @@ exports[`Table Actions table 1`] = `
>
<button
aria-expanded="false"
aria-label="Kebab toggle"
class="pf-c-menu-toggle pf-m-plain"
type="button"
>
Expand Down Expand Up @@ -388,6 +391,7 @@ exports[`Table Actions table 1`] = `
>
<button
aria-expanded="false"
aria-label="Kebab toggle"
class="pf-c-menu-toggle pf-m-plain"
type="button"
>
Expand Down Expand Up @@ -465,6 +469,7 @@ exports[`Table Actions table 1`] = `
>
<button
aria-expanded="false"
aria-label="Kebab toggle"
class="pf-c-menu-toggle pf-m-plain"
type="button"
>
Expand Down Expand Up @@ -542,6 +547,7 @@ exports[`Table Actions table 1`] = `
>
<button
aria-expanded="false"
aria-label="Kebab toggle"
class="pf-c-menu-toggle pf-m-plain"
type="button"
>
Expand Down Expand Up @@ -619,6 +625,7 @@ exports[`Table Actions table 1`] = `
>
<button
aria-expanded="false"
aria-label="Kebab toggle"
class="pf-c-menu-toggle pf-m-plain"
type="button"
>
Expand Down Expand Up @@ -696,6 +703,7 @@ exports[`Table Actions table 1`] = `
>
<button
aria-expanded="false"
aria-label="Kebab toggle"
class="pf-c-menu-toggle pf-m-plain"
type="button"
>
Expand Down Expand Up @@ -773,6 +781,7 @@ exports[`Table Actions table 1`] = `
>
<button
aria-expanded="false"
aria-label="Kebab toggle"
class="pf-c-menu-toggle pf-m-plain"
type="button"
>
Expand Down Expand Up @@ -5383,6 +5392,7 @@ exports[`Table Simple Actions table 1`] = `
>
<button
aria-expanded="false"
aria-label="Kebab toggle"
class="pf-c-menu-toggle pf-m-plain"
type="button"
>
Expand Down Expand Up @@ -5460,6 +5470,7 @@ exports[`Table Simple Actions table 1`] = `
>
<button
aria-expanded="false"
aria-label="Kebab toggle"
class="pf-c-menu-toggle pf-m-plain"
type="button"
>
Expand Down Expand Up @@ -5537,6 +5548,7 @@ exports[`Table Simple Actions table 1`] = `
>
<button
aria-expanded="false"
aria-label="Kebab toggle"
class="pf-c-menu-toggle pf-m-plain"
type="button"
>
Expand Down Expand Up @@ -5614,6 +5626,7 @@ exports[`Table Simple Actions table 1`] = `
>
<button
aria-expanded="false"
aria-label="Kebab toggle"
class="pf-c-menu-toggle pf-m-plain"
type="button"
>
Expand Down Expand Up @@ -5691,6 +5704,7 @@ exports[`Table Simple Actions table 1`] = `
>
<button
aria-expanded="false"
aria-label="Kebab toggle"
class="pf-c-menu-toggle pf-m-plain"
type="button"
>
Expand Down Expand Up @@ -5768,6 +5782,7 @@ exports[`Table Simple Actions table 1`] = `
>
<button
aria-expanded="false"
aria-label="Kebab toggle"
class="pf-c-menu-toggle pf-m-plain"
type="button"
>
Expand Down Expand Up @@ -5845,6 +5860,7 @@ exports[`Table Simple Actions table 1`] = `
>
<button
aria-expanded="false"
aria-label="Kebab toggle"
class="pf-c-menu-toggle pf-m-plain"
type="button"
>
Expand Down Expand Up @@ -5922,6 +5938,7 @@ exports[`Table Simple Actions table 1`] = `
>
<button
aria-expanded="false"
aria-label="Kebab toggle"
class="pf-c-menu-toggle pf-m-plain"
type="button"
>
Expand Down Expand Up @@ -5999,6 +6016,7 @@ exports[`Table Simple Actions table 1`] = `
>
<button
aria-expanded="false"
aria-label="Kebab toggle"
class="pf-c-menu-toggle pf-m-plain"
type="button"
>
Expand Down Expand Up @@ -6076,6 +6094,7 @@ exports[`Table Simple Actions table 1`] = `
>
<button
aria-expanded="false"
aria-label="Kebab toggle"
class="pf-c-menu-toggle pf-m-plain pf-m-disabled"
disabled=""
type="button"
Expand Down

0 comments on commit e4ed53e

Please sign in to comment.