mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-08-25 15:09:41 +00:00
Bugfix/assign tags to devices table overflow (#364)
<!-- Thanks for contributing! Provide a description of your changes below and a general summary in the title Please look at the following checklist to ensure that your PR can be accepted quickly: --> ## Description Fixed overflow in assign tags to devices table. ## Type of Change <!--- Put an `x` in all the boxes that apply: --> - [ ] ✨ New feature (non-breaking change which adds functionality) - [x] 🛠️ Bug fix (non-breaking change which fixes an issue) - [ ] ❌ Breaking change (fix or feature that would cause existing functionality to change) - [ ] 🧹 Code refactor - [ ] ✅ Build configuration change - [ ] 📝 Documentation - [ ] 🗑️ Chore
This commit is contained in:
@ -31,19 +31,24 @@ class AssignTagsTable extends StatelessWidget {
|
|||||||
|
|
||||||
DataColumn _buildDataColumn(BuildContext context, String label) {
|
DataColumn _buildDataColumn(BuildContext context, String label) {
|
||||||
return DataColumn(
|
return DataColumn(
|
||||||
label: SelectableText(label, style: context.textTheme.bodyMedium),
|
label: Expanded(
|
||||||
|
child: FittedBox(
|
||||||
|
alignment: AlignmentDirectional.centerStart,
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
child: SelectableText(label, style: context.textTheme.bodyMedium),
|
||||||
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return BlocProvider<TagsBloc>(
|
return BlocProvider<TagsBloc>(
|
||||||
create: (BuildContext context) => TagsBloc(
|
create: (context) => TagsBloc(
|
||||||
RemoteTagsService(HTTPService()),
|
RemoteTagsService(HTTPService()),
|
||||||
)..add(const LoadTags()),
|
)..add(const LoadTags()),
|
||||||
child: BlocBuilder<TagsBloc, TagsState>(
|
child: BlocBuilder<TagsBloc, TagsState>(
|
||||||
builder: (context, state) {
|
builder: (context, state) => switch (state) {
|
||||||
return switch (state) {
|
|
||||||
TagsLoading() || TagsInitial() => const Center(
|
TagsLoading() || TagsInitial() => const Center(
|
||||||
child: CircularProgressIndicator(),
|
child: CircularProgressIndicator(),
|
||||||
),
|
),
|
||||||
@ -73,7 +78,9 @@ class AssignTagsTable extends StatelessWidget {
|
|||||||
DataRow(
|
DataRow(
|
||||||
cells: [
|
cells: [
|
||||||
DataCell(
|
DataCell(
|
||||||
Center(
|
FittedBox(
|
||||||
|
alignment: AlignmentDirectional.centerStart,
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
child: SelectableText(
|
child: SelectableText(
|
||||||
'No Devices Available',
|
'No Devices Available',
|
||||||
style: context.textTheme.bodyMedium?.copyWith(
|
style: context.textTheme.bodyMedium?.copyWith(
|
||||||
@ -105,8 +112,7 @@ class AssignTagsTable extends StatelessWidget {
|
|||||||
)
|
)
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
final currentLocationUuid =
|
final currentLocationUuid = productLocations[allocationUuid];
|
||||||
productLocations[allocationUuid];
|
|
||||||
final currentLocationName = currentLocationUuid == null
|
final currentLocationName = currentLocationUuid == null
|
||||||
? 'Main Space'
|
? 'Main Space'
|
||||||
: subspaces
|
: subspaces
|
||||||
@ -197,7 +203,6 @@ class AssignTagsTable extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
_ => const SizedBox.shrink(),
|
_ => const SizedBox.shrink(),
|
||||||
};
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user