1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-24 17:51:14 +02:00
unleash.unleash/frontend/src/component/feature/strategy/EditStrategyModal/user-with-id-strategy.jsx
Fredrik Strand Oseberg dbed06f300 Feat/material UI (#250)
Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com>
Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
Co-authored-by: Christopher Kolstad <git@chriswk.no>
2021-03-30 15:14:02 +02:00

24 lines
613 B
JavaScript

import React from 'react';
import strategyInputProps from './strategy-input-props';
import InputList from './input-list';
export default function UserWithIdStrategy({ editable, parameters, updateParameter }) {
const value = parameters.userIds;
let list = [];
if (typeof value === 'string') {
list = value
.trim()
.split(',')
.filter(Boolean);
}
return (
<div>
<InputList name="userIds" list={list} disabled={!editable} setConfig={updateParameter} />
</div>
);
}
UserWithIdStrategy.propTypes = strategyInputProps;