remove unsued props, try to improve error feedback #306
This commit is contained in:
parent
2a12bd733b
commit
a9d12f31f3
|
@ -5,7 +5,8 @@
|
|||
size="is-small"
|
||||
@input="validate_values()"
|
||||
:step="options.step"
|
||||
v-model="valueInit"/>
|
||||
v-model="valueInit"
|
||||
/>
|
||||
<p class="is-size-7 has-text-centered is-marginless">{{ $i18n.get('label_until') }}</p>
|
||||
<b-numberinput
|
||||
:aria-labelledby="labelId"
|
||||
|
@ -35,6 +36,7 @@
|
|||
collectionId: '',
|
||||
metadatum: '',
|
||||
options: [],
|
||||
withError: false
|
||||
}
|
||||
},
|
||||
props: {
|
||||
|
@ -48,16 +50,15 @@
|
|||
validate_values: _.debounce( function (){
|
||||
if ( parseFloat( this.valueInit ) > parseFloat( this.valueEnd )) {
|
||||
//this.valueEnd = parseFloat( this.valueInit ) + 1;
|
||||
//this.error_message();
|
||||
//this.withError = true;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//this.withError = false;
|
||||
this.emit();
|
||||
}, 600),
|
||||
// message for error
|
||||
error_message(){
|
||||
if ( !this.isTouched ) return false;
|
||||
|
||||
this.$buefy.toast.open({
|
||||
duration: 3000,
|
||||
message: this.$i18n.get('info_error_first_value_greater'),
|
||||
|
|
|
@ -15,8 +15,7 @@ class Numeric_Interval extends Filter_Type {
|
|||
$this->set_form_component('tainacan-filter-form-numeric-interval');
|
||||
$this->set_use_max_options(false);
|
||||
$this->set_default_options([
|
||||
'step' => 1,
|
||||
'input-mode' => 'custom'
|
||||
'step' => 1
|
||||
]);
|
||||
$this->set_preview_template('
|
||||
<div>
|
||||
|
|
Loading…
Reference in New Issue