Select to view content in your preferred language

Hide Editor Widget Back Button

474
1
01-19-2023 11:34 AM
dcarson1661
Occasional Contributor

Hello, 

I'm working in 4.25

Does anyone know how to hide the back button on the editor widget? I imagine this can be achieved with CSS?

dcarson1661_0-1674156627204.png

Thanks in advance for any help!

 

0 Kudos
1 Reply
dcarson1661
Occasional Contributor

Thanks for the response. I'm not sure I fully understand though.

From what I can tell the Editor widget is housed inside a Calcite Flow component which has a Calcite Flow Item nested in it. This is where the back button comes from. The Calcite Flow Item does have a property for "show-back-button" which I can set to false, but only after the element is actually added to the page.

My current work-around is to watch for any changes to the page and then set this property to false if the tag name is "calcite-flow-item".

This feels very hacky and I'd prefer a solution that sets the CSS  to hide this element, but I'm not sure how to go about that.

  //listen for dom changes and update the show-back-button
  var observer = new MutationObserver(function(mutations) {
    mutations.forEach(function(mutation) {
      mutation.addedNodes.forEach(function(addedNode) {
        var flowItems = document.getElementsByTagName('calcite-flow-item');
        setTimeout(() => {
            for (let item of flowItems) {
                item.showBackButton=false
            }
          }, "50")
      });
    });
  });
  observer.observe(document.body, {childList: true, subtree: true}); 
0 Kudos