Skip to content
This repository has been archived by the owner on Feb 7, 2025. It is now read-only.

fix(ui-markdown-editor): styleblock refresh - #276 #283

Merged
merged 1 commit into from
Mar 8, 2021

Conversation

d-e-v-esh
Copy link
Contributor

Signed-off-by: d-e-v-esh 59534570+d-e-v-esh@users.noreply.github.com

Closes #276

Before this, the styles block would not refresh when we changed the cursor position. It would only refresh when we started writing. Now the styles block gets updated when the cursor position changes.

Changes

  • New currentStyle value gets initiated in useState hook. That currentStyle now gets updated inside the onChange function which makes this work.
  • Then currentStyle value gets passed down to the StyleDropdown menu through props.

Flags

Screenshots or Video

fcXbp2C2D0

Related Issues

Author Checklist

  • Ensure you provide a DCO sign-off for your commits using the --signoff option of git commit.
  • Vital features and changes captured in unit and/or integration tests
  • Commits messages follow AP format
  • Extend the documentation, if necessary
  • Merging to master from fork:branchname
  • Manual accessibility test performed
    • Keyboard-only access, including forms
    • Contrast at least WCAG Level A
    • Appropriate labels, alt text, and instructions

Signed-off-by: d-e-v-esh <59534570+d-e-v-esh@users.noreply.github.com>
Copy link
Contributor

@dselman dselman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great. Thank you!

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Styles block not updating as we move our cursor
4 participants