Skip to content

Added memoization to minimize re-rendering #1159

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

Merged
merged 9 commits into from
Sep 12, 2024
Prev Previous commit
Next Next commit
expose autoIncrement from OptionControl
  • Loading branch information
raheeliftikhar5 committed Sep 12, 2024
commit bf383d2d3bd07e3e098b97e8e463a8548e428ad5
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ export function optionsControl<T extends OptionsControlType>(
uniqField?: keyof ConstructorToView<T>;
// manual mode list title
title?: string;
autoIncField?: keyof PickNumberFields<ConstructorToView<T>>;
}
) {
type OptionViewType = ConstructorToView<T>;
Expand All @@ -369,6 +370,7 @@ export function optionsControl<T extends OptionsControlType>(
manual: manualOptionsControl(VariantComp, {
initOptions: config.initOptions,
uniqField: config.uniqField,
autoIncField: config.autoIncField,
}),
mapData: mapOptionsControl(VariantComp, config.uniqField),
},
Expand Down