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] Chosen Dropdown Option Not Showing as Selected #216

Closed
muya opened this issue Jun 4, 2022 · 0 comments · Fixed by #217
Closed

[BUG] Chosen Dropdown Option Not Showing as Selected #216

muya opened this issue Jun 4, 2022 · 0 comments · Fixed by #217

Comments

@muya
Copy link
Contributor

muya commented Jun 4, 2022

Description

When dropdown options load in Obsidian Linter settings, the user-selected option is not shown as the currently selected item.

Steps to Reproduce

We can use the "Capitalize Headings > Style" option to demonstrate.

  1. Open Obsidian Linter settings, and scroll down to the "Capitalize Headings" section
  2. For the "Style" dropdown, choose a setting that's different from what's currently enabled. For example, if "Title Case" is currently your preferred setting, choose "All Caps".
  3. Close the settings page. (Optional: test that the linter is now changing headings to "ALL CAPS").
  4. Re-open the settings page, and scroll down to "Capitalize Headings"

Expected: that the newly selected option "ALL CAPS" is chosen as the Style (i.e. with a checkmark), and is currently shown

obsidian-linter-dropdown-settings-display-expected

Actual: "Title Case" is still chosen as the Style, and it has the checkmark.

obsidian-linter-dropdown-settings-display-actual

Video Demonstration
obsidian-linter-dropdown-settings-display-bug.mp4

Notes

  • This is only a "display" bug. The selected options continue to work as expected.
  • There is a side effect of not being able to easily go back to "Title Case" as your preferred option. You have to:
    • Choose a different option (e.g. "ALL CAPS")
    • Now choose "Title Case" (i.e. make sure the settings window is not closed)
  • I'll be putting up a pull request to propose a fix for this shortly
muya added a commit to muya/obsidian-linter that referenced this issue Jun 4, 2022
For dropdown settings, show the currently active (user-chosen) one as the selected one on the UI.

Fixes platers#216
platers pushed a commit that referenced this issue Jun 4, 2022
For dropdown settings, show the currently active (user-chosen) one as the selected one on the UI.

Fixes #216
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 a pull request may close this issue.

1 participant