You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
We have a component in our Drupal project which is using the new drupal/once library instead of jQuery/once.
This works fine when added as a dependency in the Drupal theme but we have trouble getting the code to work in the Storybook.
Describe the solution you'd like
I would like to be able to include the drupal/once library in the Storybook components and use the JS function for example in accordion.js to make sure the element is triggered only once.
Probably something like the usual Drupal.behaviors might work but there is of course the NPM package for drupal/once available so it could even be a more robust solution to support the functionality in the storybook js file.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
We have a component in our Drupal project which is using the new drupal/once library instead of jQuery/once.
This works fine when added as a dependency in the Drupal theme but we have trouble getting the code to work in the Storybook.
What would be the best solution to include https://www.npmjs.com/package/drupal/once in the Storybooks and be able to use the new JS functions in Storybooks?
Describe the solution you'd like
I would like to be able to include the drupal/once library in the Storybook components and use the JS function for example in accordion.js to make sure the element is triggered only once.
Probably something like the usual Drupal.behaviors might work but there is of course the NPM package for drupal/once available so it could even be a more robust solution to support the functionality in the storybook js file.
The text was updated successfully, but these errors were encountered: