set default values on prompts

This commit is contained in:
Keith Grant
2020-03-27 16:34:16 -07:00
parent 7f4bbbe5c5
commit 55356ebb51
5 changed files with 12 additions and 13 deletions

View File

@@ -18,7 +18,7 @@ const QS_CONFIG = getQSConfig('inventory', {
function InventoryStep({ i18n }) {
const history = useHistory();
const [field, meta, helpers] = useField('inventory');
const [field, , helpers] = useField('inventory');
const {
isLoading,
@@ -29,9 +29,6 @@ function InventoryStep({ i18n }) {
useCallback(async () => {
const params = parseQueryString(QS_CONFIG, history.location.search);
const { data } = await InventoriesAPI.read(params);
if (!field.value && data.results.length) {
helpers.setValue(data.results[0]);
}
return {
inventories: data.results,
count: data.count,