feat: quick add support sort (#1175)
Co-authored-by: sealday <sealday@gmail.com> Reviewed-on: daoyoucloud/tachybase#1175
This commit is contained in:
		
							parent
							
								
									45edb084b7
								
							
						
					
					
						commit
						7118423925
					
				@ -207,11 +207,15 @@ export const InternalTabs = observer((props) => {
 | 
			
		||||
          {options.length ? (
 | 
			
		||||
            <Tabs
 | 
			
		||||
              tabPosition="left"
 | 
			
		||||
              items={options.map((item) => ({
 | 
			
		||||
              items={options
 | 
			
		||||
                .sort((a, b) => (a.sort != null ? a.sort - b.sort : a.id - b.id))
 | 
			
		||||
                .map((item) => ({
 | 
			
		||||
                  ...item,
 | 
			
		||||
                  children: (
 | 
			
		||||
                    <Space style={{ maxHeight: '30vh', overflow: 'auto', padding: '10px 0px 20px 0px' }}>
 | 
			
		||||
                    {item?.childrenItems?.map((childrenitem, index) => (
 | 
			
		||||
                      {item?.childrenItems
 | 
			
		||||
                        ?.sort((a, b) => (a.sort != null ? a.sort - b.sort : a.id - b.id))
 | 
			
		||||
                        .map((childrenitem, index) => (
 | 
			
		||||
                          <Button
 | 
			
		||||
                            key={index}
 | 
			
		||||
                            onClick={() => {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user