question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Selecting multiple elements

See original GitHub issue

I was wondering if it was possible to select multiple elements for a step; I couldn’t see any options for it nor did using an array as the selector.

My use-case is selecting a subset of <td> within a <tr>, i.e. something like this where the x’s denote the cells that are highlighted.

1 2 3 4 5
x x x

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:19 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
JCLimpidecommented, Sep 22, 2021

Just leaving a comment for @fostimus or others who are using class component.

I didn’t test the highlighting itself, but I wrote a small workaround: a Higher-order-component, allowing to use all the tour hooks in class components. The code is fairly simple:

import { useTour } from '@reactour/tour'

const withTour = (Component) => (props) => {
  const /*{ isOpen, currentStep, steps, setIsOpen, setCurrentStep }*/ propsTour = useTour();

  return <Component { ...props } { ...propsTour } />
}
export default withTour;
1reaction
elrumordelaluzcommented, Sep 15, 2021

Our codebase still relies heavily on class based components, so 2.0.0 won’t work for us.

I’m sorry, but happy that v1.x works for you!

Is it possible to highlight separately

Not now, it should be making more calculations to customize the Mask with more complexity.

Leaving here as feature request: custom Mask with multiple “holes” for different ´elements´.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CSS: Select Multiple Elements - Campsite Coders
Select Multiple Elements. It is possible to give several items on your page the same style even when they don't have the same...
Read more >
Revit - Select Multiple Elements - Autodesk Knowledge Network
Select Multiple Elements · While pressing Ctrl , click each of the elements. · Draw a selection box by placing the cursor on...
Read more >
jQuery Multiple Elements Selector - W3Schools
Use the * selector to select all elements in a document. ❮ jQuery Selectors · Video Tutorial · COLOR PICKER.
Read more >
Multiple Selector (“selector1, selector2, selectorN”) - jQuery API
This multiple expression combinator is an efficient way to select disparate elements. The order of the DOM elements in the returned jQuery object...
Read more >
How to select multiple elements using CSS - Stack Overflow
You don't need the other elements in the selector, unless you only want to match .c3 if it is within div.c1 .c2 :...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found