MantineServerAutoComplete#

@palmyralabs/rt-forms-mantine · form/MantineServerAutoComplete.tsx

Overview#

Free-text field with server-suggested completions. Unlike MantineServerLookup, the final stored value is a string typed/selected by the user — suggestions guide without constraining.

Props — IServerAutoCompleteDefinition & (AutocompleteProps & { onChange?(value, data) })#

Common field props + queryOptions (same shape as MantineServerLookup) + Mantine AutocompleteProps with a custom onChange(value, data) that also receives the matched record.

Ref — IServerLookupField#

Same as MantineServerLookup.

Example#

<MantineServerAutoComplete
  attribute="cityName"
  label="City"
  queryOptions={{
    endPoint: '/mstCity',
    queryAttribute: 'name',
    labelAttribute: 'name',
    idAttribute: 'id',
  }}
  onChange={(value, record) => console.log('chose', value, record)}
/>