Closed renanboni closed 1 month ago
Hey, I noticed that when we have a select component, the list that is open when I click on it doesn't have the same size as the parent:
ResponsiveRowColumnItem( child: ResponsiveRowColumn( layout: ResponsiveBreakpoints.of(context).smallerThan(DESKTOP) ? ResponsiveRowColumnType.COLUMN : ResponsiveRowColumnType.ROW, rowSpacing: 12, columnSpacing: 12, children: [ ResponsiveRowColumnItem( rowFlex: 1, child: ShadSelectFormField<Category>( id: 'category', minWidth: double.infinity, placeholder: const Text(""), label: const Text('Categories (optional)'), initialValue: null, onChanged: (value) {}, options: categories .map( (e) => ShadOption( value: e, child: Text(e.name), ), ) .toList(), selectedOptionBuilder: (context, value) => Text(value.name), ), ), ResponsiveRowColumnItem( rowFlex: 1, child: ShadSelectFormField<String>( id: 'tags', minWidth: double.infinity, label: const Text('Tags (optional)'), initialValue: "", onChanged: (value) {}, options: [], selectedOptionBuilder: (context, value) => const Text(""), ), ), ], ), )
Don't use minWidth: double.infinity, leave the default, or wrap with LayoutBuilder and use constraints.maxWidth
wrapping it with LayoutBuilder solves this, closing!
Hey, I noticed that when we have a select component, the list that is open when I click on it doesn't have the same size as the parent: