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.

Possibility to disable elements?

See original GitHub issue

Hi,

I have a table and for a specific reasons I have to use tbody as sortable items. So the container is the table and sortable items are tbody. I also have thead element in a table and when I sort tbody elements I can drop them above thead which is not what I want.

Is there way to prevent that? If not, that would be a nice feature to disable certain elements.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
dword-designcommented, Nov 15, 2018

Hey, you can do that by setting non-drag-area-selector in the Container to some class like “.drag-disabled” and then setting the class conditionally in the Draggable.

0reactions
ispalcommented, Nov 20, 2018

For the specific reasons my structure is like demonstrated below where I have multiple tbody elements that contain 2 rows. It means that the draggable items are tbody elements so I can’t use them as a container. I know this is a bit unusual situation, but I thought I’ll ask to see if there’s a way to go around it.

<table>
  <thead>
    <tr></tr>
  </thead>
   <tbody>
     <tr></tr>
     <tr></tr>
   </tbody>
   <tbody>
      <tr></tr>
      <tr></tr>
   </tbody>
</table>

I’ll close this issue for know. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Disable HTML elements - Orange digital accessibility guidelines
It is still possible to disable a link by following 3 steps: remove the href attribute so that it can no longer receive...
Read more >
HTML disabled Attribute - W3Schools
The disabled attribute is a boolean attribute. When present, it specifies that the element should be disabled. A disabled element is unusable.
Read more >
HTML attribute: disabled - HTML: HyperText Markup Language
The Boolean disabled attribute, when present, makes the element not mutable, focusable, or even submitted with the form.
Read more >
Best approach to disable elements - Stack Overflow
The old-fashioned way which I used to disable these buttons was to apply the following CSS to every and each one of them....
Read more >
Idea - Disable elements in actions - OutSystems
In this case it would be an addition to the already existing possibility of disabling the elements. 07 Nov 2019.
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