如何避免在 React Native 的 Picker 中重复输入?

问题描述 投票:0回答:0

我在 map() 循环和另一个 map 循环中使用 Picker,但是项目在重复如何避免这种任何解决方案

 {
            mainCategory ? 
            Object.keys(subCategory).map((y, i) => { 
              let findsub = subCategory[mainCategory].productsType;
              return Object.values(findsub).map ((findsub1, k) => {
                return <Picker.Item key={k} label={findsub1} value={findsub1} />;
              })
              // console.log(findsub)
            })
            : null
          }
javascript reactjs react-native expo
© www.soinside.com 2019 - 2024. All rights reserved.