Skip to content

Commit

Permalink
Merge pull request #355 from shizhe2018/feature/TDCascader_new
Browse files Browse the repository at this point in the history
新增第一层点击选择功能
  • Loading branch information
Luozf12345 authored Oct 21, 2024
2 parents 70eab7b + 4241db3 commit a61953d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ class _TDMultiCascaderState extends State<TDMultiCascader> with TickerProviderSt
return GestureDetector(
onTap: () {
int level = 0;
if (_tabListData.length > 2 && _currentTabIndex == 0) {
if (item.level ==0 && _currentTabIndex == 0) {
_tabListData.clear();
_tabListData.add(MultiCascaderListModel(
labelFun: ()=>context.resource.cascadeLabel,
Expand Down Expand Up @@ -440,7 +440,7 @@ class _TDMultiCascaderState extends State<TDMultiCascader> with TickerProviderSt

void _getChildrenListData(int level, String value) {
//查询层级数据
var selectLevelData = _listData.where((element) => element.level == (level)).toList();
var selectLevelData = _listData.where((element) => element.level == (level)&&element.parentValue==value).toList();
//判断下级是否存在
if (selectLevelData.isNotEmpty) {
//获取下级数据
Expand Down

0 comments on commit a61953d

Please sign in to comment.