Skip to content

Commit d5f7692

Browse files
committed
chore: clean up
1 parent 7e2ffc6 commit d5f7692

File tree

2 files changed

+2
-27
lines changed

2 files changed

+2
-27
lines changed

src/BaseSelect/index.tsx

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import type { SelectInputRef } from '../SelectInput';
2727
import SelectInput from '../SelectInput';
2828
import type { ComponentsConfig } from '../hooks/useComponents';
2929
import useComponents from '../hooks/useComponents';
30+
3031
export type BaseSelectSemanticName = 'prefix' | 'suffix' | 'input' | 'clear';
3132

3233
/**
@@ -46,20 +47,6 @@ export type {
4647
RenderNode,
4748
RawValueType,
4849
};
49-
50-
const DEFAULT_OMIT_PROPS = [
51-
'value',
52-
'onChange',
53-
'removeIcon',
54-
'placeholder',
55-
'maxTagCount',
56-
'maxTagTextLength',
57-
'maxTagPlaceholder',
58-
'choiceTransitionName',
59-
'onInputKeyDown',
60-
'onPopupScroll',
61-
'tabIndex',
62-
] as const;
6350
export interface RefOptionListProps {
6451
onKeyDown: React.KeyboardEventHandler;
6552
onKeyUp: React.KeyboardEventHandler;
@@ -322,18 +309,6 @@ const BaseSelect = React.forwardRef<BaseSelectRef, BaseSelectProps>((props, ref)
322309
// const mergedShowSearch =
323310
// (showSearch !== undefined ? showSearch : multiple) || mode === 'combobox';
324311

325-
const domProps = {
326-
...restProps,
327-
};
328-
329-
DEFAULT_OMIT_PROPS.forEach((propName) => {
330-
delete domProps[propName];
331-
});
332-
333-
omitDomProps?.forEach((propName) => {
334-
delete domProps[propName];
335-
});
336-
337312
// ============================== Refs ==============================
338313
const containerRef = React.useRef<SelectInputRef>(null);
339314
const triggerRef = React.useRef<RefTriggerProps>(null);

src/SelectInput/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ export default React.forwardRef<SelectInputRef, SelectInputProps>(function Selec
204204
const { root: RootComponent } = components;
205205

206206
// ===================== Render =====================
207-
const domProps = omit(restProps, DEFAULT_OMIT_PROPS);
207+
const domProps = omit(restProps, DEFAULT_OMIT_PROPS as any);
208208

209209
// Create context value with wrapped callbacks
210210
const contextValue = {

0 commit comments

Comments
 (0)