-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom component properties override remove ref
#2721
Comments
ref
I did a quick check and seems there are more components, that seem to need a similar fix:
I checked with this code: interface myAutoCompleteProps extends AutoCompleteProps {};
export const myAutoComplete = (props: myAutoCompleteProps) => <AutoComplete {...props} />;
interface myCascadeSelectProps extends CascadeSelectProps {};
export const myCascadeSelect = (props: myCascadeSelectProps) => <CascadeSelect {...props} />;
interface myCheckboxProps extends CheckboxProps {};
export const myCheckbox = (props: myCheckboxProps) => <Checkbox {...props} />;
interface myDataTableProps extends DataTableProps {};
export const myDataTable = (props: myDataTableProps) => <DataTable {...props} />;
interface myDropdownProps extends DropdownProps {};
export const myDropdown = (props: myDropdownProps) => <Dropdown {...props} />;
interface myListBoxProps extends ListBoxProps {};
export const myListBox = (props: myListBoxProps) => <ListBox {...props} />;
interface myMultiSelectProps extends MultiSelectProps {};
export const myMultiSelect = (props: myMultiSelectProps) => <MultiSelect {...props} />;
interface myRadioButtonProps extends RadioButtonProps {};
export const myRadioButton = (props: myRadioButtonProps) => <RadioButton {...props} />;
interface mySelectButtonProps extends SelectButtonProps {};
export const mySelectButton = (props: mySelectButtonProps) => <SelectButton {...props} />;
interface myTreeSelectProps extends TreeSelectProps {};
export const myTreeSelect = (props: myTreeSelectProps) => <TreeSelect {...props} />;
interface myTreeTableProps extends TreeTableProps {};
export const myTreeTable = (props: myTreeTableProps) => <TreeTable {...props} />; |
I'm not sure about this change. I'll check it tomorrow. |
Just to follow up I think I am going for "the element of least surprise". if I do this... interface myAutoCompleteProps extends AutoCompleteProps {};
export const myAutoComplete = (props: myAutoCompleteProps) => <AutoComplete {...props} />; I would not expect the component to fail because the |
Based on: #2708
Components Affected:
I have a custom component that I wrap PrimeReact AutoComplete like this...
However now when I am passing
{...props}
to do property expansion its failing to compile with... This works in 7.2.1 but now doesn't like it even though above I amextends AutoCompleteProps
.React version:
17.0.2
PrimeReact version:
8.0.0-rc1
Language: Typecript
The text was updated successfully, but these errors were encountered: