EightfoldAI / octuple

The Octuple component library
MIT License
16 stars 45 forks source link

fix: menu: adds onclick handler back to main button when secondarybuttonprops fixing menu onchange #813

Closed dkilgore-eightfold closed 2 months ago

dkilgore-eightfold commented 2 months ago

SUMMARY:

The onClick event was deferred to the ...rest spread via MenuItemButton props, this caused a regression in Menu as the onClick callback was being used internally to trigger Menu onChange callback upstream.

BEFORE FIX:

https://github.com/EightfoldAI/octuple/assets/99700808/e1cebfff-6772-45c4-895e-072e7751eb24

AFTER FIX:

https://github.com/EightfoldAI/octuple/assets/99700808/87acf590-855b-4c8a-8eb0-fcc3a2eb27e8

JIRA TASK (Eightfold Employees Only):

ENG-85650

CHANGE TYPE:

TEST COVERAGE:

TEST PLAN:

Pull the PR branch and run yarn and yarn storybook. Verify the Menu stories behave as expected.

codesandbox-ci[bot] commented 2 months ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.