@bsol-oss/react-datatable5 13.0.1-beta.5 → 13.0.1-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -3
- package/dist/index.mjs +4 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5909,10 +5909,10 @@ const useIdPickerData = ({ column, schema, prefix, isMultiple, }) => {
|
|
|
5909
5909
|
const { watch, getValues, formState: { errors }, setValue, } = reactHookForm.useFormContext();
|
|
5910
5910
|
const { idMap, setIdMap, idPickerLabels, insideDialog } = useSchemaContext();
|
|
5911
5911
|
const { renderDisplay, loadInitialValues, foreign_key, variant } = schema;
|
|
5912
|
-
// loadInitialValues
|
|
5912
|
+
// loadInitialValues should be provided in schema for id-picker fields
|
|
5913
5913
|
// It's used to load the record of the id so the display is human-readable
|
|
5914
5914
|
if (variant === 'id-picker' && !loadInitialValues) {
|
|
5915
|
-
|
|
5915
|
+
console.warn(`loadInitialValues is recommended in schema for IdPicker field '${column}'. Please provide loadInitialValues function in the schema to load records for human-readable display.`);
|
|
5916
5916
|
}
|
|
5917
5917
|
const { table, column: column_ref, customQueryFn, } = foreign_key;
|
|
5918
5918
|
const [searchText, setSearchText] = React.useState('');
|
|
@@ -6133,7 +6133,8 @@ const useIdPickerData = ({ column, schema, prefix, isMultiple, }) => {
|
|
|
6133
6133
|
idPickerLabels,
|
|
6134
6134
|
insideDialog: insideDialog ?? false,
|
|
6135
6135
|
renderDisplay,
|
|
6136
|
-
loadInitialValues: loadInitialValues
|
|
6136
|
+
loadInitialValues: loadInitialValues ??
|
|
6137
|
+
(async () => ({ data: { data: [], count: 0 }, idMap: {} })), // Fallback if not provided
|
|
6137
6138
|
column_ref,
|
|
6138
6139
|
errors,
|
|
6139
6140
|
setValue,
|
package/dist/index.mjs
CHANGED
|
@@ -5889,10 +5889,10 @@ const useIdPickerData = ({ column, schema, prefix, isMultiple, }) => {
|
|
|
5889
5889
|
const { watch, getValues, formState: { errors }, setValue, } = useFormContext();
|
|
5890
5890
|
const { idMap, setIdMap, idPickerLabels, insideDialog } = useSchemaContext();
|
|
5891
5891
|
const { renderDisplay, loadInitialValues, foreign_key, variant } = schema;
|
|
5892
|
-
// loadInitialValues
|
|
5892
|
+
// loadInitialValues should be provided in schema for id-picker fields
|
|
5893
5893
|
// It's used to load the record of the id so the display is human-readable
|
|
5894
5894
|
if (variant === 'id-picker' && !loadInitialValues) {
|
|
5895
|
-
|
|
5895
|
+
console.warn(`loadInitialValues is recommended in schema for IdPicker field '${column}'. Please provide loadInitialValues function in the schema to load records for human-readable display.`);
|
|
5896
5896
|
}
|
|
5897
5897
|
const { table, column: column_ref, customQueryFn, } = foreign_key;
|
|
5898
5898
|
const [searchText, setSearchText] = useState('');
|
|
@@ -6113,7 +6113,8 @@ const useIdPickerData = ({ column, schema, prefix, isMultiple, }) => {
|
|
|
6113
6113
|
idPickerLabels,
|
|
6114
6114
|
insideDialog: insideDialog ?? false,
|
|
6115
6115
|
renderDisplay,
|
|
6116
|
-
loadInitialValues: loadInitialValues
|
|
6116
|
+
loadInitialValues: loadInitialValues ??
|
|
6117
|
+
(async () => ({ data: { data: [], count: 0 }, idMap: {} })), // Fallback if not provided
|
|
6117
6118
|
column_ref,
|
|
6118
6119
|
errors,
|
|
6119
6120
|
setValue,
|