Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add a method to programatically focus and open the dropdown element #867

Conversation

NOMADE55
Copy link
Contributor

@NOMADE55 NOMADE55 commented Nov 26, 2024

Describe pull-request

Adds a method to focus and open dropdown element programmatically.

Issue Linking:

How to test

Provide detailed steps for testing, including any necessary setup.
Whether you're using angular, react or web components

  1. Get dropdown's element reference.
  2. Invoke the focusElement() method.
  3. Dropdown should be focused and opened.

Checklist before submission

  • I have added unit tests for my changes (if applicable)
  • All existing tests pass
  • I have updated the documentation (if applicable)
  • Not breaking production behavior
  • Behavior available in storybook with documented descriptions (if applicable)
  • npm run build-all without errors

Suggested test steps

  • Browser testing (Chrome, Safari, Firefox)
  • Keyboard operability
  • Interactive elements have labels.
  • Storybook controls
  • Design/controls/props is aligned with other components
  • Dark/light mode and variants
  • Input fields – values should be displayed properly
  • Events

Additional context

An important note, method is named focusElement as focus is a reserved name.
I'm not really keen on this name, falling victim of the second hardest problem in programming, so feel free to suggest/change it to something more Tegel-ly.

Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-867.d3fazya28914g3.amplifyapp.com

@Lunkan89
Copy link
Collaborator

Lunkan89 commented Dec 5, 2024

@NOMADE55 you can rebase develop and then we can merge this one :)

@Lunkan89 Lunkan89 force-pushed the feat/add-focus-method-to-dropdown branch from 50f3430 to 8764eb1 Compare December 5, 2024 13:09
Copy link

sonarqubecloud bot commented Dec 5, 2024

@Lunkan89 Lunkan89 merged commit bef2cc5 into scania-digital-design-system:develop Dec 5, 2024
4 checks passed
@NOMADE55 NOMADE55 deleted the feat/add-focus-method-to-dropdown branch December 5, 2024 19:13
@NOMADE55
Copy link
Contributor Author

NOMADE55 commented Dec 5, 2024

I wasn't free until now. I see it already merged, glad to know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants