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
When notfy is used with modern Multi page applications e.g. Rails, using Stimulus, Stimulus Reflex or Turbo - it is often required to have elements persist throughout page refreshes or DOM diff replacements.
Currently NotyfView adds the .notyf container dynamically when first instantiated, and only once, however this does not survive page reloads even through a memoized instance of Notyf would.
Therefore it's beneficial that the notyf element is able to survive DOM replacements by turbo or otherwise, this is accomplished with data-reflex-permanent, or data-turbo-permanent respectively. While these attributes can be added dynamically Notyf adds/removes this element seemingly at will
Would you be open to a PR that allows data attributes to be passed to the .notyf and .notyf-announcer container elements?
The text was updated successfully, but these errors were encountered:
scottbarrow
changed the title
allow adding of data attributes
allow adding of data attributes (for Turbo/Stimulus Reflex)
Mar 9, 2021
When notfy is used with modern Multi page applications e.g. Rails, using Stimulus, Stimulus Reflex or Turbo - it is often required to have elements persist throughout page refreshes or DOM diff replacements.
Currently
NotyfView
adds the.notyf
container dynamically when first instantiated, and only once, however this does not survive page reloads even through a memoized instance of Notyf would.Therefore it's beneficial that the notyf element is able to survive DOM replacements by turbo or otherwise, this is accomplished with
data-reflex-permanent
, ordata-turbo-permanent
respectively. While these attributes can be added dynamically Notyf adds/removes this element seemingly at willWould you be open to a PR that allows data attributes to be passed to the .notyf and .notyf-announcer container elements?
The text was updated successfully, but these errors were encountered: