An open source alternative to Tableau. Embeddable visual analytic
TypeScript bidatadata-analysisdata-miningdata-visualizationedak6skanarieslow-codepivot-tablereacttableautableau-alternativetypescriptvegavega-litevisualization
feat: input enter with ime (#414)
islxyqwe9d0c30a53e85
diff --git a/packages/graphic-walker/src/components/askViz/index.tsx b/packages/graphic-walker/src/components/askViz/index.tsxindex 2a24c3ee..d4c8f343 100644--- a/packages/graphic-walker/src/components/askViz/index.tsx+++ b/packages/graphic-walker/src/components/askViz/index.tsx@@ -112,7 +112,7 @@ const AskViz: React.FC<{value={query}onChange={(e) => setQuery(e.target.value)}onKeyDown={(e) => {- if (e.key === 'Enter' && loading === false && query.length > 0) {+ if (e.key === 'Enter' && !e.nativeEvent.isComposing && loading === false && query.length > 0) {startQuery();}}}diff --git a/packages/graphic-walker/src/components/chat/index.tsx b/packages/graphic-walker/src/components/chat/index.tsxindex da5f8b8b..7bca7338 100644--- a/packages/graphic-walker/src/components/chat/index.tsx+++ b/packages/graphic-walker/src/components/chat/index.tsx@@ -219,7 +219,7 @@ export const VegaliteChat = observer(function VegaliteChat(props: {rows={1}value={query}onKeyDown={(e) => {- if (e.key === 'Enter' && !e.shiftKey && loading === false && query.length > 0) {+ if (e.key === 'Enter' && !e.nativeEvent.isComposing && !e.shiftKey && loading === false && query.length > 0) {e.preventDefault();submit();}diff --git a/packages/graphic-walker/src/components/painter/components.tsx b/packages/graphic-walker/src/components/painter/components.tsxindex d64b0a66..80faeca9 100644--- a/packages/graphic-walker/src/components/painter/components.tsx+++ b/packages/graphic-walker/src/components/painter/components.tsx@@ -172,7 +172,7 @@ export const ClickInput = (props: { value: string; onChange: (v: string) => voiddefaultValue={props.value}onBlur={doChange}onKeyUp={(e) => {- if (e.key === 'Enter') {+ if (e.key === 'Enter' && !e.nativeEvent.isComposing) {doChange(e as unknown as { target: HTMLInputElement });return false;} else {diff --git a/packages/graphic-walker/src/fields/filterField/slider.tsx b/packages/graphic-walker/src/fields/filterField/slider.tsxindex 620b2f78..9e347e2b 100644--- a/packages/graphic-walker/src/fields/filterField/slider.tsx+++ b/packages/graphic-walker/src/fields/filterField/slider.tsx@@ -66,7 +66,7 @@ const ValueInput: React.FC<ValueInputProps> = (props) => {onChange={(e) => setInnerValue(e.target.value)}onBlur={handleSubmitValue}onKeyDown={(e) => {- if (e.key === 'Enter') {+ if (e.key === 'Enter' && !e.nativeEvent.isComposing) {handleSubmitValue();}}}