Skip to content

Commit

Permalink
fix: Components slider and treeSelect drag (#1837)
Browse files Browse the repository at this point in the history
# Description

Please include a summary of the change and which issue is fixed. Please
also include relevant motivation and context. List any dependencies that
are required for this change.

# How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration

# Snapshots:

Include snapshots for easier review.

# Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have already rebased the commits and make the commit message
conform to the project standard.
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] Any dependent changes have been merged and published in downstream
modules
  • Loading branch information
Dreammy23 authored Aug 16, 2024
2 parents 1bc6d26 + 6ad7199 commit ec42162
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/components/flow/node-renderer/slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ export const RenderSlider = (params: TextAreaProps) => {
{data?.ui?.show_input ? (
<Row>
<Col span={12}>
<Slider {...attr} onChange={onChangeSlider} value={typeof inputValue === 'number' ? inputValue : 0} />
<Slider className="w-full nodrag" {...attr} onChange={onChangeSlider} value={typeof inputValue === 'number' ? inputValue : 0} />
</Col>
<Col span={4}>
<InputNumber {...attr} style={{ margin: '0 16px' }} value={inputValue} onChange={onChangeSlider} />
</Col>
</Row>
) : (
<Slider {...attr} onChange={onChangeSlider} value={typeof inputValue === 'number' ? inputValue : 0} />
<Slider className="w-full nodrag" {...attr} onChange={onChangeSlider} value={typeof inputValue === 'number' ? inputValue : 0} />
)}
</>
);
Expand Down
1 change: 1 addition & 0 deletions web/components/flow/node-renderer/tree-select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const RenderTreeSelect = (params: TextAreaProps) => {
return (
<div className="p-2 text-sm">
<TreeSelect
className="w-full nodrag"
fieldNames={{ label: 'label', value: 'value', children: 'children' }}
{...attr}
style={{ width: '100%' }}
Expand Down

0 comments on commit ec42162

Please sign in to comment.