Formatting
This commit is contained in:
parent
7edc3427e1
commit
e1bd364278
@ -148,18 +148,26 @@
|
|||||||
class="block text-sm font-medium text-gray-700">{$_('organization')}</label>
|
class="block text-sm font-medium text-gray-700">{$_('organization')}</label>
|
||||||
<Select
|
<Select
|
||||||
containerClasses="rounded-l-md mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 rounded-md p-2"
|
containerClasses="rounded-l-md mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 rounded-md p-2"
|
||||||
getSelectionLabel={(option) => {return option.name}}
|
getSelectionLabel={(option) => {
|
||||||
getOptionLabel={(option) => {return option.name}}
|
return option.name;
|
||||||
itemFilter={(label, filterText, option) =>
|
}}
|
||||||
label.toLowerCase().includes(filterText.toLowerCase()) ||
|
getOptionLabel={(option) => {
|
||||||
option.id.toString().startsWith(filterText.toLowerCase())}
|
return option.name;
|
||||||
|
}}
|
||||||
|
itemFilter={(label, filterText, option) => label
|
||||||
|
.toLowerCase()
|
||||||
|
.includes(
|
||||||
|
filterText.toLowerCase()
|
||||||
|
) || option.id
|
||||||
|
.toString()
|
||||||
|
.startsWith(filterText.toLowerCase())}
|
||||||
items={orgs}
|
items={orgs}
|
||||||
showChevron={true}
|
showChevron={true}
|
||||||
placeholder={$_('search-for-an-organization-by-name-or-id')}
|
placeholder={$_('search-for-an-organization-by-name-or-id')}
|
||||||
noOptionsMessage={$_('no-organizations-found')}
|
noOptionsMessage={$_('no-organizations-found')}
|
||||||
on:select={(selectedValue) => (parentGroup = selectedValue.detail.id)}
|
on:select={(selectedValue) => (parentGroup = selectedValue.detail.id)}
|
||||||
on:clear={()=>(parentGroup = null)} />
|
on:clear={() => (parentGroup = null)} />
|
||||||
{#if !parentGroup}
|
{#if !parentGroup}
|
||||||
<span
|
<span
|
||||||
class="flex items-center font-medium tracking-wide text-red-500 text-xs mt-1 ml-1">
|
class="flex items-center font-medium tracking-wide text-red-500 text-xs mt-1 ml-1">
|
||||||
{$_('you-have-to-provide-an-organization')}
|
{$_('you-have-to-provide-an-organization')}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user