INNER CODE UNIT · JavaScript

remove

infrahq/infra · ui/pages/access-control/index.js:376

                        const remove = selectedRoles.filter(x => !v.includes(x))
                        if (add.length) {
                          setSelectedRoles([...selectedRoles, ...add])
                        }
                        if (remove.length) {
                          setSelectedRoles(
                            selectedRoles.filter(x => !remove.includes(x))
                          )
                        }
                      }}
                      multiple
                    >
                      <div className='relative'>
                        <Listbox.Button className='relative w-full cursor-default rounded-md border border-gray-300 bg-white py-2 pl-3 pr-8 text-left text-xs shadow-sm hover:cursor-pointer hover:bg-gray-100 focus:border-blue-500 focus:ring-blue-50'>
                          <div className='flex space-x-1 truncate'>
                            <span className='pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2'>
                              <ChevronDownIcon
                                className='h-4 w-4 stroke-1 text-gray-700'

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…