mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-24 17:51:14 +02:00
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>
24 lines
613 B
JavaScript
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;
|