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?
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 withdata-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?