forked from eatvio/eatvio_app
feat: create AddProductModal for adding and editing diary product portions with glossary search functionality.
This commit is contained in:
@@ -166,7 +166,7 @@ class _AddProductModalState extends State<AddProductModal> {
|
|||||||
InkWell(
|
InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
// Автоматически выбираем первый элемент, если текст точно совпадает
|
// Автоматически выбираем первый элемент, если текст точно совпадает
|
||||||
if (selectedGlossary == null && glossariesList.isNotEmpty && productNameController.text.trim() == glossariesList[0].name) {
|
if (selectedGlossary == null && glossariesList.isNotEmpty && productNameController.text.trim().toLowerCase() == glossariesList[0].name.toLowerCase()) {
|
||||||
selectedGlossary = glossariesList[0];
|
selectedGlossary = glossariesList[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user