mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
fixed assign tag issue
This commit is contained in:
@ -71,6 +71,7 @@ class AssignTagDialog extends StatelessWidget {
|
|||||||
child: DataTable(
|
child: DataTable(
|
||||||
headingRowColor: WidgetStateProperty.all(
|
headingRowColor: WidgetStateProperty.all(
|
||||||
ColorsManager.dataHeaderGrey),
|
ColorsManager.dataHeaderGrey),
|
||||||
|
key: ValueKey(state.tags.length),
|
||||||
border: TableBorder.all(
|
border: TableBorder.all(
|
||||||
color: ColorsManager.dataHeaderGrey,
|
color: ColorsManager.dataHeaderGrey,
|
||||||
width: 1,
|
width: 1,
|
||||||
@ -120,6 +121,7 @@ class AssignTagDialog extends StatelessWidget {
|
|||||||
final controller = controllers[index];
|
final controller = controllers[index];
|
||||||
final availableTags = getAvailableTags(
|
final availableTags = getAvailableTags(
|
||||||
allTags ?? [], state.tags, tag);
|
allTags ?? [], state.tags, tag);
|
||||||
|
|
||||||
return DataRow(
|
return DataRow(
|
||||||
cells: [
|
cells: [
|
||||||
DataCell(Text((index + 1).toString())),
|
DataCell(Text((index + 1).toString())),
|
||||||
@ -158,6 +160,8 @@ class AssignTagDialog extends StatelessWidget {
|
|||||||
.add(DeleteTag(
|
.add(DeleteTag(
|
||||||
tagToDelete: tag,
|
tagToDelete: tag,
|
||||||
tags: state.tags));
|
tags: state.tags));
|
||||||
|
|
||||||
|
controllers.removeAt(index);
|
||||||
},
|
},
|
||||||
tooltip: 'Delete Tag',
|
tooltip: 'Delete Tag',
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
@ -255,6 +259,7 @@ class AssignTagDialog extends StatelessWidget {
|
|||||||
spaceTags: processedTags,
|
spaceTags: processedTags,
|
||||||
isCreate: false,
|
isCreate: false,
|
||||||
onSave: onSave,
|
onSave: onSave,
|
||||||
|
allTags: allTags,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@ -265,10 +270,10 @@ class AssignTagDialog extends StatelessWidget {
|
|||||||
Expanded(
|
Expanded(
|
||||||
child: DefaultButton(
|
child: DefaultButton(
|
||||||
borderRadius: 10,
|
borderRadius: 10,
|
||||||
backgroundColor: state.isSaveEnabled
|
backgroundColor: ColorsManager.secondaryColor,
|
||||||
? ColorsManager.secondaryColor
|
foregroundColor: state.isSaveEnabled
|
||||||
: ColorsManager.grayColor,
|
? ColorsManager.whiteColors
|
||||||
foregroundColor: ColorsManager.whiteColors,
|
: ColorsManager.whiteColorsWithOpacity,
|
||||||
onPressed: state.isSaveEnabled
|
onPressed: state.isSaveEnabled
|
||||||
? () async {
|
? () async {
|
||||||
final updatedTags = List<Tag>.from(state.tags);
|
final updatedTags = List<Tag>.from(state.tags);
|
||||||
|
@ -82,6 +82,7 @@ class AssignTagModelsDialog extends StatelessWidget {
|
|||||||
child: DataTable(
|
child: DataTable(
|
||||||
headingRowColor: WidgetStateProperty.all(
|
headingRowColor: WidgetStateProperty.all(
|
||||||
ColorsManager.dataHeaderGrey),
|
ColorsManager.dataHeaderGrey),
|
||||||
|
key: ValueKey(state.tags.length),
|
||||||
border: TableBorder.all(
|
border: TableBorder.all(
|
||||||
color: ColorsManager.dataHeaderGrey,
|
color: ColorsManager.dataHeaderGrey,
|
||||||
width: 1,
|
width: 1,
|
||||||
@ -176,6 +177,7 @@ class AssignTagModelsDialog extends StatelessWidget {
|
|||||||
.add(DeleteTagModel(
|
.add(DeleteTagModel(
|
||||||
tagToDelete: tag,
|
tagToDelete: tag,
|
||||||
tags: state.tags));
|
tags: state.tags));
|
||||||
|
controllers.removeAt(index);
|
||||||
},
|
},
|
||||||
tooltip: 'Delete Tag',
|
tooltip: 'Delete Tag',
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
@ -302,10 +304,10 @@ class AssignTagModelsDialog extends StatelessWidget {
|
|||||||
Expanded(
|
Expanded(
|
||||||
child: DefaultButton(
|
child: DefaultButton(
|
||||||
borderRadius: 10,
|
borderRadius: 10,
|
||||||
backgroundColor: state.isSaveEnabled
|
backgroundColor: ColorsManager.secondaryColor,
|
||||||
? ColorsManager.secondaryColor
|
foregroundColor: state.isSaveEnabled
|
||||||
: ColorsManager.grayColor,
|
? ColorsManager.whiteColors
|
||||||
foregroundColor: ColorsManager.whiteColors,
|
: ColorsManager.whiteColorsWithOpacity,
|
||||||
onPressed: state.isSaveEnabled
|
onPressed: state.isSaveEnabled
|
||||||
? () async {
|
? () async {
|
||||||
final updatedTags =
|
final updatedTags =
|
||||||
|
Reference in New Issue
Block a user