fix: cannot change the state if it's the only state in group (#1358)

* fixed loohole with groups and added tooltip

* muted text when dropdown disabled
This commit is contained in:
M. Palanikannan 2023-06-26 18:28:12 +05:30 committed by GitHub
parent 3f22ccc528
commit 5914240290
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 21 deletions

View file

@ -98,6 +98,7 @@ const StatesSettings: NextPage = () => {
<div className="divide-y divide-brand-base rounded-[10px] border border-brand-base">
{key === activeGroup && (
<CreateUpdateStateInline
groupLength={orderedStateGroups[key].length}
onClose={() => {
setActiveGroup(null);
setSelectedState(null);
@ -128,6 +129,7 @@ const StatesSettings: NextPage = () => {
setActiveGroup(null);
setSelectedState(null);
}}
groupLength={orderedStateGroups[key].length}
data={
statesList?.find((state) => state.id === selectedState) ?? null
}