Class: FloatCommaInput
- Inherits:
-
React::Component::Base
- Object
- React::Component::Base
- FloatCommaInput
show all
- Includes:
- AbstractNumeric
- Defined in:
- lib/bull/ui_core.rb
Instance Method Summary
collapse
#render
#dirty_class, #valid_class
Instance Method Details
344
345
346
|
# File 'lib/bull/ui_core.rb', line 344
def format value
format_float value
end
|
#parse(val) ⇒ Object
348
349
350
351
352
353
354
|
# File 'lib/bull/ui_core.rb', line 348
def parse val
begin
Float(val.gsub(',', ''))
rescue
nil
end
end
|
#update_state(event) ⇒ Object
356
357
358
|
# File 'lib/bull/ui_core.rb', line 356
def update_state event
params.on_change parse(event.target.value)
end
|