Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/wincloud_gateway/node_modules/strapi-admin/admin/src/components/Users/SelectRoles/ drwxr-xr-x | |
| Viewing file: Select action/file-type: import React from 'react';
import { components } from 'react-select';
import PropTypes from 'prop-types';
import StyledOption from './StyledOption';
const MultiValueContainer = ({ data, selectProps }) => {
const Component = components.MultiValueContainer;
const handleClick = () => {
const newValue = selectProps.value.filter(option => option.id !== data.id);
selectProps.onChange(newValue);
};
return (
<Component {...data} {...selectProps}>
<StyledOption
label={data.name}
height="24px"
lineHeight="26px"
margin="2px 5px 0px 0"
onClick={handleClick}
/>
</Component>
);
};
MultiValueContainer.defaultProps = {
data: {},
selectProps: {
value: [],
},
};
MultiValueContainer.propTypes = {
data: PropTypes.object,
selectProps: PropTypes.shape({
onChange: PropTypes.func.isRequired,
value: PropTypes.array,
}),
};
export default MultiValueContainer;
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0047 ]-- |