-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Typescript: Unable to use Sensors in Droppable #498
Comments
Git-Hub-User-0
changed the title
Unable to use Sensors in Droppable
Typescript: Unable to use Sensors in Droppable
Jul 15, 2021
Thank you for your bug report. I can't find a temporary way to fix class type define. It seems that it can only be temporarily fixed by setting the import { Droppable, DragSensor } from "@shopify/draggable";
const droppable = new Droppable(document.querySelectorAll(".app"), {
draggable: ".item",
dropzone: ".dropzone",
sensors: [DragSensor as any],
}); I will create a PR to fix it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi
I am getting while adding Sensors to Droppable(using Typescript):
Error: 'Sensors' only refers to a type, but is being used as a value here
If i try to add DragSensor directly, then i getting following error:
Type 'typeof DragSensor' is missing the following properties from type 'Sensor': attach, detach, addContainer, removeContainer, trigger
"@shopify/draggable": "^1.0.0-beta.12"
Please help with this.
Thanks in advance.
@zjffun
The text was updated successfully, but these errors were encountered: