|
@@ -147,21 +147,15 @@ class JobListEditController extends GetxController with DioCancelableMixin {
|
|
|
selectedIndex++;
|
|
|
}
|
|
|
|
|
|
- List<String> list = ["Position"];
|
|
|
+ List<String> list = [];
|
|
|
list.addAll(state.editEntity!.positionList.map((e) => e.txt!).toList(growable: false));
|
|
|
|
|
|
OptionPickerUtil.showCupertinoOptionPicker(
|
|
|
items: list,
|
|
|
initialSelectIndex: selectedIndex,
|
|
|
onPickerChanged: (_, index) {
|
|
|
- if (index == 0) {
|
|
|
- state.selectPositionId = null;
|
|
|
- state.selectPositionName = null;
|
|
|
- } else {
|
|
|
- state.selectPositionId = state.editEntity!.positionList[index - 1].value!.toString();
|
|
|
- state.selectPositionName = state.editEntity!.positionList[index - 1].txt!.toString();
|
|
|
- }
|
|
|
-
|
|
|
+ state.selectPositionId = state.editEntity!.positionList[index].value!.toString();
|
|
|
+ state.selectPositionName = state.editEntity!.positionList[index].txt!.toString();
|
|
|
update();
|
|
|
},
|
|
|
);
|