Skip to content

Commit

Permalink
Merge pull request #48 from getpingback/fix/variable-input
Browse files Browse the repository at this point in the history
Fix/variable input
  • Loading branch information
Jessmartins91 authored Dec 5, 2024
2 parents eac0689 + 13aaf40 commit 60a477a
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 7 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,27 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [0.0.279](https://github.com/getpingback/ui/compare/v0.0.276...v0.0.279) (2024-12-04)


### Bug Fixes

* onVariablesEndReached ([e68bacf](https://github.com/getpingback/ui/commits/e68bacf78b152eb94ffa2e3e51dbee7cbb571808))

### [0.0.278](https://github.com/getpingback/ui/compare/v0.0.276...v0.0.278) (2024-12-04)


### Bug Fixes

* onVariablesEndReached ([e68bacf](https://github.com/getpingback/ui/commits/e68bacf78b152eb94ffa2e3e51dbee7cbb571808))

### [0.0.277](https://github.com/getpingback/ui/compare/v0.0.276...v0.0.277) (2024-12-04)


### Bug Fixes

* onVariablesEndReached ([e68bacf](https://github.com/getpingback/ui/commits/e68bacf78b152eb94ffa2e3e51dbee7cbb571808))

### [0.0.275](https://github.com/getpingback/ui/compare/v0.0.274...v0.0.275) (2024-12-03)


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@getpingback/ui",
"author": "Pingback Team",
"version": "0.0.276",
"version": "0.0.280",
"license": "MIT",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
Expand Down
11 changes: 9 additions & 2 deletions src/components/variable-input/variable-input.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,20 @@ const options = [
},
{
heading: 'Custom Variables',
items: [{ label: 'Custom Variable', value: 'customVariable' }]
items: [
{ label: 'Custom Variable', value: 'customVariable' },
{ label: 'Custom Variable 2', value: 'customVariable2' },
{ label: 'Custom Variable 3', value: 'customVariable3' },
{ label: 'Custom Variable 4', value: 'customVariable4' },
{ label: 'Custom Variable 5', value: 'customVariable5' }
]
}
];

export const Default: Story = {
args: {
options
options,
onVariablesEndReached: () => console.log('End Reached')
}
};

Expand Down
5 changes: 1 addition & 4 deletions src/components/variable-input/variable-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,7 @@ export function VariableInput({
}, [isFocused, text, placeholder, initialContent]);

React.useEffect(() => {
if (!open) {
onVariablesEndReached?.();
return;
}
if (!open) return;

let observer: IntersectionObserver;
setTimeout(() => {
Expand Down

0 comments on commit 60a477a

Please sign in to comment.