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

[BUG]: Set Default Item for Nav Control #396

Closed
sperry1625 opened this issue Sep 5, 2023 · 2 comments
Closed

[BUG]: Set Default Item for Nav Control #396

sperry1625 opened this issue Sep 5, 2023 · 2 comments
Labels
bug Something isn't working Component: Nav documentation Improvements or additions to documentation

Comments

@sperry1625
Copy link

sperry1625 commented Sep 5, 2023

Describe the bug
Cannot select a default item for a Nav control.

To Reproduce
Steps to reproduce the behavior:

  1. Add Nav control to screen
  2. Create variable to use for SelectedKey property (ex. ctxSelKey)
  3. Set Nav control SelectedKey property to variable, ctxSelKey
  4. Set variable, ctxSelKey, to default key value

Expected behavior
With SelectedKey variable set to a default key, when Nav is shown the Item with the Key value = to the SelectedKey value will be selected.
If this is not how this is supposed to work, please provide an example showing how to set the default selection in a Nav control.

Screenshots
N/A

Additional context
I tried creating an InputEvent for SetFocus, SetFocusOnRowSetSelection and SetSelection. The documentation only shows that the Nav Control supports the SetFocus InputEvent. None of these worked.

AB#951

@sperry1625 sperry1625 added bug Something isn't working ⚠️ needs triage Has not been triaged by the team yet. labels Sep 5, 2023
@sperry1625 sperry1625 changed the title [BUG]: [BUG]: Set Default Item for Nav Control Sep 5, 2023
@sperry1625
Copy link
Author

I was able to figure out the issue. The problem with the Nav control is the ItemKey must be Text. It cannot be numeric. I would still classify this as a bug because keys are usually numeric for performance reasons.

Is this working by design?

@denise-msft
Copy link
Member

Thanks for following up @sperry1625, we'll update documentation to make this clear. It is by design, the component looks for a specific data type, however the platform doesn't seem to give a good error message that lets you know it's not working. I'll log this as internal feedback as well so the team is awar.

@denise-msft denise-msft added documentation Improvements or additions to documentation Component: Nav and removed ⚠️ needs triage Has not been triaged by the team yet. labels Sep 21, 2023
@RajeevPentyala RajeevPentyala added this to the Backlog milestone Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Component: Nav documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants