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

share: highlight anchored field on page load #59

Closed
pamfilos opened this issue Jul 1, 2024 · 0 comments · Fixed by #63
Closed

share: highlight anchored field on page load #59

pamfilos opened this issue Jul 1, 2024 · 0 comments · Fixed by #63
Assignees
Labels
enhancement New feature or request

Comments

@pamfilos
Copy link
Collaborator

pamfilos commented Jul 1, 2024

e.g.:

diff --git a/src/forms/templates/Field/FieldTemplate.jsx b/src/forms/templates/Field/FieldTemplate.jsx
index 1f04f1d..86c277a 100644
--- a/src/forms/templates/Field/FieldTemplate.jsx
+++ b/src/forms/templates/Field/FieldTemplate.jsx
@@ -121,6 +121,14 @@ const FieldTemplate = ({
     </WrapIfAdditional>
   );
 
+  if ( window.location.hash.replace("#", "") === id) {
+    content = (
+      <span style={{width: "100%", backgroundColor: '#d0a95b94', display: 'block'}}>
+        {content}
+      </span>
+    )
+  }
+
   if (id != "root" || uiSchema["ui:object"] == "tabView") return content;
   else {
     return (

@miguelgrc miguelgrc self-assigned this Jul 2, 2024
@miguelgrc miguelgrc added the enhancement New feature or request label Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants