The name resetter should also be run after each render.
This commit is contained in:
parent
c9a1ba2f39
commit
0608bcce19
|
@ -33,6 +33,11 @@
|
||||||
source: data.states,
|
source: data.states,
|
||||||
minLength: 3
|
minLength: 3
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Postcode and city don't have `name` values by default. They're only created if the contents changes, to save on database queries (I think)
|
||||||
|
$tbody.find( 'td.postcode input, td.city input').change(function() {
|
||||||
|
$(this).attr( 'name', $(this).data( 'name' ) );
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
renderTableContents( data.rates );
|
renderTableContents( data.rates );
|
||||||
|
@ -125,12 +130,5 @@
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
|
||||||
* Postcode and city don't have `name` values by default. They're only created if the contents changes, to save on database queries (I think)
|
|
||||||
*/
|
|
||||||
$('.wc_tax_rates td.postcode, .wc_tax_rates td.city').find('input').change(function() {
|
|
||||||
$(this).attr( 'name', $(this).attr( 'data-name' ) );
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
});
|
||||||
})(jQuery, htmlSettingsTaxLocalizeScript, wp);
|
})(jQuery, htmlSettingsTaxLocalizeScript, wp);
|
||||||
|
|
Loading…
Reference in New Issue