[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] 01/02: -fix: autocomplete check
From: |
gnunet |
Subject: |
[taler-wallet-core] 01/02: -fix: autocomplete check |
Date: |
Tue, 25 Jan 2022 14:29:50 +0100 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a commit to branch master
in repository wallet-core.
commit a06f7f7cbbbcbe5c3d34fc534c0fb681a009b0fe
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Tue Jan 25 09:26:12 2022 -0300
-fix: autocomplete check
---
packages/anastasis-webui/.storybook/preview.js | 8 ++++++--
packages/anastasis-webui/src/pages/home/AttributeEntryScreen.tsx | 2 +-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/packages/anastasis-webui/.storybook/preview.js
b/packages/anastasis-webui/.storybook/preview.js
index 9ab4d940..4b61856e 100644
--- a/packages/anastasis-webui/.storybook/preview.js
+++ b/packages/anastasis-webui/.storybook/preview.js
@@ -23,8 +23,12 @@ export const parameters = {
controls: { expanded: true },
options: {
storySort: (a, b) => {
- return (a[1].args.order ?? 0) - (b[1].args.order ?? 0)
- // return a[1].kind === b[1].kind ? 0 : a[1].id.localeCompare(b[1].id,
undefined, { numeric: true })
+ if (!a || !a[1]) {
+ //
https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#v7-style-story-sort
+ console.log(a, b)
+ return (a?.args.order ?? 0) - (b?.args.order ?? 0)
+ }
+ return (a?.[1]?.args?.order ?? 0) - (b?.[1]?.args?.order ?? 0)
}
},
}
diff --git a/packages/anastasis-webui/src/pages/home/AttributeEntryScreen.tsx
b/packages/anastasis-webui/src/pages/home/AttributeEntryScreen.tsx
index a1f38474..c14365d2 100644
--- a/packages/anastasis-webui/src/pages/home/AttributeEntryScreen.tsx
+++ b/packages/anastasis-webui/src/pages/home/AttributeEntryScreen.tsx
@@ -40,7 +40,7 @@ export function AttributeEntryScreen(): VNode {
function addAutocomplete(newValue: string): string {
const ac = spec.autocomplete;
- if (!ac || ac.length < newValue.length || ac[newValue.length] === "?")
+ if (!ac || ac.length <= newValue.length || ac[newValue.length] === "?")
return newValue;
if (!value || newValue.length < value.length) {
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.