app/components/lookbook/params/field/component.rb in lookbook-1.1.1 vs app/components/lookbook/params/field/component.rb in lookbook-1.2.0
- old
+ new
@@ -57,11 +57,11 @@
def escaped_value
json_escape(value.to_json)
end
def input_options
- config_options = @config.fetch(:input_options, {})
+ config_options = @config.fetch(:opts, {})
opts = config_options.merge(@input_options).symbolize_keys
opts[:id] = "param-#{@name}"
opts
end
@@ -77,21 +77,17 @@
}
end
def render_input
target = @config[:partial]
-
if target
render(target, **render_props)
else
input_error "No param input defined for input type '#{@input_name}'."
end
rescue ::ActionView::MissingTemplate => exception
Lookbook.logger.error exception
input_error "Param input partial '#{@config[:partial]}' could not be found."
- rescue => exception
- Lookbook.logger.error exception
- input_error exception.message
end
def alpine_component
"paramsFieldComponent"
end