Class: FloatInput

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



321
322
323
324
325
326
327
# File 'lib/bull/ui_core.rb', line 321

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

#update_state(event) ⇒ Object



329
330
331
# File 'lib/bull/ui_core.rb', line 329

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