Module: NfgUi::Components::Utilities::DisableWithable

Included in:
Elements::Button, Elements::DropdownItem
Defined in:
lib/nfg_ui/components/utilities/disable_withable.rb

Overview

Allows components to be setup to utilize disable_with

Instance Method Summary collapse

Instance Method Details

#dataObject



6
7
8
# File 'lib/nfg_ui/components/utilities/disable_withable.rb', line 6

def data
  disable_with ? super.merge!(disable_with: disable_with) : super
end

#disable_withObject



10
11
12
# File 'lib/nfg_ui/components/utilities/disable_withable.rb', line 10

def disable_with
  options.fetch(:disable_with, nil)
end