Class: IntegerInput

Inherits:
React::Component::Base
  • Object
show all
Includes:
AbstractNumeric
Defined in:
lib/bull/ui_core.rb

Instance Method Summary collapse

Methods included from AbstractNumeric

#format, #render

Methods included from ClassesInput

#dirty_class, #valid_class

Instance Method Details

#parse(val) ⇒ Object



249
250
251
252
253
254
255
# File 'lib/bull/ui_core.rb', line 249

def parse val
  begin
    Integer(val)
  rescue
    nil
  end
end

#update_state(event) ⇒ Object



257
258
259
# File 'lib/bull/ui_core.rb', line 257

def update_state event
  params.on_change parse(event.target.value)
end